Wednesday, April 4, 2012

Migrating Your Bugtracker Database to Jira

I have been working on this new project, It's a bug database migration.  Not necessarily simple but pretty straight forward.  Take the entire contents of a BugTracker.net DB and migrate it to a new DB, Jira.   


Step one, analyze the DB for current fields, number of records, organization of date and export capability.  Although the BugTracker.net (BT) has export to excel and some backup capabilities it doesn't look all the smart or convenient or easy, in terms of exporting the entire DB.  I start by reading the docs on Bugtracker and searching for info from other folks that have done.  I ask the guy the who wrote it, Corey Trager.  He's happy to help, if I pay him (Gee, thanks guy).   There's not that much info about it out there. 


So I start looking around -- find the front-end code and reverse engineer it -- pull out the connect string for the DB.  Its a SQL Server 2005 Database (it could have been Mysql, just as well)  running on XP or whatever.  I download a SQL Server Management Studio and connect to the DB.  Pick it apart. 


The initial take, ~6500 records, ~70000 comments and updates, 3211 attachments.   


Next I analyze the target, Jira.  Jira has a great and robust import tool.  If you have to do this project.  By all means use it.  The only convenient way, though, from the BT was to use the comma seperated value method of the Import Tool.  So that became my target.

Create a tab delimited file containing the BT database in it entirety.  Programmatiaclly and reliably extract the entire content of the BT and convert it into a tab delimited file to be ingested by the Jira Import Plug-In. 


I wrote three queries to extract the data from the BT backend SQL Server DB.   I wrote 6 tcl scripts that assemble the BT data into a huge tab delimited file.   


For the comments, attachments, updates, and emails:

set nocount on SELECT a.bp_bug, a.bp_type, b.us_username, a.bp_date, a.bp_comment,
        a.bp_email_from,
        a.bp_email_to, a.bp_file, a.bp_size, a.bp_content_type, a.bp_id,
        (select '#@#@#@#' newcol) #@#@#@#
    FROM dbo.bug_posts a, dbo.users b
    WHERE b.us_id = bp_user
    ORDER BY a.bp_bug, a.bp_type, a.bp_date;

For the bug relationships:

set nocount on SELECT re_bug1, re_bug2, re_type 
    FROM dbo.bug_relationships 
    ORDER BY re_bug1;

For the issues:

set nocount on SELECT bg_id bugtrackerID,
        (select pj_name from dbo.projects where bg_project = pj_id) project,
        (select 'projectKey' newcol) projectKey,
        bg_short_desc summary,
        (select us_username from dbo.users
              WHERE bg_reported_user = us_id) reporter,
        (select ct_name from dbo.categories 
              WHERE bg_category = ct_id) issueType,
        (select pr_name from dbo.priorities 
              WHERE bg_priority = pr_id) priority,
        (select pr_name from dbo.priorities 
               WHERE bg_priority = pr_id) urgency,
        "Custom Field 1" customField1,
        "Custom Field 2" customField2,
        (select us_username from dbo.users 
               WHERE bg_assigned_to_user = us_id) assignee,
        (select st_name from dbo.statuses 
               WHERE bg_status = st_id) status,
        (select 'newcol' newcol) resolution,
        bg_reported_date reported_date,
        bg_last_updated_date lastUpdatedDate,
        (select udf_name from dbo.user_defined_attribute 
                WHERE bg_user_defined_attribute = udf_id)
        component from bugs,projects
WHERE bg_project = pj_id
ORDER BY bg_id ;

That should get you started. 

Ultimately Corey Trager did give me a one interesting clue, asking me "what are you going to do about attachments, like screenshots, if they were posted as blobs into the db?"  I looked all over for evidence of inline attachements, blobs in the db, or a way to post them.   I didn't find that at all.  I did find the attachments in a very unusual place on the file system for the Web front end to Bugtraacker.  They were in c:\Temp\Uploads.   Basically these were copied into a place were the Jira import tool could find them and poof ... it was done. 

The import tool for the Jira went extremetely well.  There were issues around the organization of data and arranging the file for the successful import of comments, and attachments, but overall the tools is well designed and works quite well.  Error reporting is good and the process can be a bit tedious, but that is just the way it is with delimited files. 

Here's a snippet from a conversation about the import between my colleague and I:

4:50 PM L: Ah no
4:50 PM Shawn Kielty:ok
4:50 PM L: it's shows up correctly in the wizard !
4:50 PM Shawn Kielty:yeah ... stunning thing -- that wizard
4:51 PM L: Ok, importing issues is in progress
4:52 PM Shawn Kielty: sweet
4:52 PM L:Yes, this wizard is very good

Sunday, January 22, 2012

Johnny's Cookies



These are a big hit around my family at Christmas and originally came from my grandmother Gertrude Kielty.

1 cup shortening (I use butter)
1 cup brown sugar
1 egg
1 3/4 cup sifted flour
1/2 teaspoon salt
1/2 teaspoon soda
1/4 cup thick sour milk (I use sour cream)
3/4 cup pecan haves broken into pieces
1 cup candied cherries (a small container) cut into pieces.
1 pecan half for the top of each cookie

Mix all the ingredients together reserving the pecan halves for the cookie tops. Drop small teaspoonfuls of dough onto a greased cookie sheet. Place a pecan halve on top of each cookie. Bake @ 400 degrees for about 10-11 minutes.

Makes 3 dozen cookies or so.

Wednesday, January 18, 2012

Zipfizz

Near the end of last year, someone at zipfizz contacted me to ask if I would consider reviewing their product.  Since this is not really the kind of product I would normally use, I was somewhat reluctant.  I agreed. 

It came in the mail, and got mixed in with Christmas.  It was basically their Multi-pack deal with an addition in the form of a zipdrive containing promotional materials.  So, nice water bottle, small free zipdrive, and some sample flavors of the energy drink mix. 

Everyone, you know me.  Good food, good tasting and hearty.  That's what I like.  Foods with names like eggs, butter, cream, meat, fries, rice.  Wholesome foods.  During an expedition in the desert, I might drink a 50% solution of Gatorade™ and water.  But Gatorade™ is this huge success story, a victory of the mind over the failings of the body.  In a crazy pinch on a bike ride or wicked hike where I need some real calories I might use a Honey Stinger™.  Typically, I am opposed to this kind of food.    Like Dr. David Agus, I am opposed to vitamins, prefer "a good fat diet, olive oil, canola oil, heart healthy eggs, cold water fish."  Real food.  Good food.  On a regular schedule.

Skeptically, I unwrap the package, look at the stuff.  Go to the web site and look at the ingredients.  A little scary.  There's a lot of what I call science ingredients. I notice a couple of foods I recognize, ginger root, ginseng, caffeine.  I mix it up.  Taste is good.   Generally good, a bit vitaminey. 

I have a formula for fueling my body during extreme activities, It's an extension of my normal diet. Nothing is quite as good as a pint of ice cream to overcome a major calorie deficit. Possibly, I will keep a few of these zipfizz around for those moments when I need an extra shot of caffeine.

If you like this sort of thing, zipfizz™ is probably a good choice. 

Saturday, November 19, 2011

Temple Man

9/24/2011, Anshan, Liaoning, China. Near the temple of the largest jade Buddha in the world. 

Wednesday, November 16, 2011

Fox Parang XL


This is a jungle knife, that I just got from Fox Knives.  It's made in Italy, I guess, or the USA since there are lots of flags on the website. Nether place has all that much jungle.  I have several different jungle knives.  Maybe I'll write some reviews, but first I will have to test this one out.  Since I don't have a jungle or forest right here in the yard ... well, it might be a few days. 

Typically, jungle knives fall into one of two general categories, slashers, and choppers.  With a fairly thin blade and knife like edge, this appears true to it's name.  A parang is a jungle knife from Borneo, and it's a slasher. 

The sheath on this knife is comfortable and has nice features, and appears to be thoughtful.  It appears cozy even while wearing it around the office.  More later ...

Saturday, November 5, 2011

Hey, Did You Ever Ask Yourselves ...

Dear  readers, 

Andy Rooney died today.  An icon of our generation has passed.  Sad, albeit true.  He's gone.

... so I have to ask.  Did you ever wonder why t-shirts and other comfortable clothes have those irritating little labels on them?  Don't you find it unusual that the only part of a  100% cotton t-shirt that isn't cotton is the hive inducing label which says same.  There ought be a law.

All my life I am with the shirt trying to figure out how to remove the label with out destroying the shirt. Im my opinion the best tool is the razor blade.  I remove all labels from all clothes.  Seriously.  If I don't remove the label, I get a small square rash direclty under it.  Amazing.  2 square inches of hives on the back of the neck.  Really not fun. 

I understand that dissident spies alway take their labels off all their clothes.  I saw that on television.  I uderstand that regular spies do this as well.  Alledgedly, they take the labels off thier clothes so that no one knows where they shop.  I once even had a woman I know ask me if I was a spy because I had no labels on any of my clothes.  I don't know why she noticed that, but she did. 

I suspect though, that spies actually remove the labels from their clothes because they are so freaking irritating.  Imagine James Bond doing his spy job, suddenly having to stop and uncontrollably scratch his label itch.  I don't think so.  So he removes the labels

There ought to be a law, seriously.  Write your congressmen and congresswomen and ask them to pass a law prohibiting irritating label materials and expressly prohibiting labeling which claims "100% cotton" unless the entire shirt including the label is cotton. 

Do it now.  And save the spies of the world from having to cut the labels out of all their clothes. 



Thursday, October 20, 2011

Re-Entry

Re-entry is interesting. I landed in San Francisco in the morning (October 10) and had lost some of my normal sensibilities. I had grown weary of dense crowds, pushy Asianess. Once I had reached San Francisco, I found myself comfortably shoving some overly pushy Asian guy out of the way so I could gather my bag. I am sure he felt that it was reasonable to shove me into the person behind me repeatedly to create a large open space in front of himself, and didn't realize that I might find this objectionable. Regardless, I felt guilty after I shoved him into his precious space to make some room for me and my bag.

I felt miserable from the eleven hours of plane discomfort and the extenuating test of patience that it is, and was dehydrated from the air conditioning ... I was parched and stripped of my well being by the tragic environment of flight. I was also coming down with strep or pneumonia, or some other contagion..Thirty-six hours after my arrival, I will be in the doctor's office with scarlet fever and a thirty-nine degree temp.

I slipped into a cab for the quiet ride home, and a series of joyous reunions. Eighteen days in Asia leaves me wanting for my own bath mat, a bar of soap and drinking water from the tap. The dog runs up and tries to be cordial, but is angry, and doesn't really greet me. It will be days before the dog will greet me properly. I am tired of travel, and glad to be home to the scowling dog.

The comforts of Asia unfold from my satchel. The shorts I wore for days on end work their way toward the laundry ... the shoes that I still haven't put on since my return come out. The camera and 15 or so compact flash cards, it will be a week before I look closely at these. For now, I am afraid to look at my work, fearing the worst.. There's tea, Anxi Tie Guanyin, Iron Goddess, Steel Buddha, Oolong; it comforts me. Sunflower seeds, which will still be on my desk a week later, flavored with some substance, clearly marked on the package in perfect Chinese, wholly unidentifiable to me by taste or other means, feed me. Peanuts, which my mother reminds me are fertilized with “human excrement,” feed me.

This culturalism I hear from my friends and family plagues me. “They use human excrement for fertilizer there.” It's a disease of misinformation. Of misunderstanding. I call it culturalism because it's not directed against the Asian Race, only against the culture of China. The Chinese people are reasonable healthy today, the agricultural practices may be different than ours, but centralization of sewage treatment and composting of wastes, help to make the foods safer to eat.

When I mentioned that I had been to China,. Even my doctor was quick to associate my illness with China, claiming that, after all, ”They are still living close to the animals there,” as a justification for his assertions. His assumption that I was the vector binging disease from China into the US seemed disturbing. Everyone, it seems, knows a lot about China. I think back, and I don't remember these things from my trips to China, from my experiences. I don't remember that anything I was taught about China was necessarily true once I got there. I can't make the stereotypes stick.

By now it's ten days later. I crave for the companionship of my friend in China. I want saucy foods with rice and fish with bones in them. I miss the drone of conversation in another language that I don't even need to try to decipher. I miss that smell of the street, the interesting chatter and compelling noise that is the street in China, interesting places like the Beijing's Hutong, where quiet neighborhood charm and narrow streets make some essential life spill out of the doorways and alleys.

Here it's quiet, the keyboard chatters as I write, David Letterman idles in the background. I am no longer (extremely) sick. I am tuning up my bicycle and the noises of suburbia surround me. And it's a bit boring right at the moment. I am eating with a fork and contemplating stealing some red plastic chopsticks that say “Tsing Tao” on their sides. My culture shock has passed. Welcome to America. Re-entry is complete.

Friday, October 14, 2011

Bikes in Yingkou, China

Dear Canon, ...

Here's a copy of a letter I received from Canon today regarding my inquiry about repairing my Canon 17-85mm lens:

Dear Shawn Kielty:
Customer service is our number-one priority at Canon U.S.A., Inc. We take great pride in providing you with the best service possible and strive to make your Canon ownership experience enjoyable.

Please take a few minutes to complete a brief online survey and tell us about your experience when you phoned our Technical Support Center on 10/13/2011 14:04:51regarding your Canon product. To access the survey click on the link below, or copy and paste the address into your browser.

https://www.customersat3.com/e.asp?IID=84DBA0FFFD72F0C08357C63910FE1D79

You must be 18 years of age or older to participate. Thank you for your feedback and for being a valued Canon customer.

Sincerely,

Canon U.S.A., Inc.
Customer Support
Please do not reply to this e-mail unless you are having difficulties completing the survey.

That's right, please do not reply ... yeta, yeta, yeta.  I don't want to complete your survey.  What I want to do is take a few moments to tell you about my experience with your camera on my recent trip to China.  During my trip I carried one camera, a Canon 20D, and two lenses, A 10-22mm zoom and a 17-85mm zoom.  I'd like to be able to tell you that I made this decision because your gear has been so reliable in the past, but it wouldn't be true. 

Last year just before my trip to China, I had to rent a 17-85mm zoom because mine failed miserably, just a few days before I left.  

So off I went to China for 18 days with a stripped down version of my normal gear, and a few days into my trip, my 17-85mm lens stops working all together, producing repeatedly the oft reported "err99".   Done.   Epic Fail.  I don't want to hear and talk how good your customer service is. 

I want to hear and talk about how good your product is.  I want to hear you tell me that the quality of your product is your number one priority.  I want to brag to my friends about how great your camera is.  The way I used to.      

Alas, I cannot!

Sunday, October 9, 2011

China, Goodbye

This trip has been amazing, I saw some of the greatest landmarks the world has to offer, the Great Wall, Tiananmen Square. I went to a hospital in China. I was on a tour boat, probably inside the borders of North Korea, I saw several cities, including Beijing. I saw great things, met great people, ate outstanding food and have a myriad of new stories to tell. I was fire cupped. Plus what, I caught a fish! I have been to farms and out to the coast, literally, in every way, off the map (well, my map anyways). I enjoyed reconnecting with the folks I met last year. I think every aspect of my comfort zone was stretched on this trip. It was a good adventure.

Tomorrow, I will say goodbye to China with a tear in my eye. It will be sad to leave my friends. It will be sad to leave the good food, good health, and vibrant energy that I have seen and felt on this trip.

Huge thanks to my friends here in China, who have opened up their lives to share with me and make my stay so enjoyable. So much hospitality. So welcoming and friendly. Thank you.

Saturday, October 8, 2011

Yak Bone Pendant

So the other night I was wandering around in the Hutong with my friend and her friend when we went into theis Tibetan shop. where I spotted a pendant I thought looked cool and right. I asked, he said, "50 yuan," I said "Done."

My friend looked at me in amazement. I had caved immediately without so much as a whimper, violating every tenet of succesful bargaining in a fell swoop.

I said, " what s that. like 8 bucks?" He just offered me a handmade, yak bone, silver and gold plus other stuff pendant that wards off evil and brings good luck in the form of money to a person who wears it, for all of 8 dollars. How could I argue with that. It seems unconsionable to weasel him down to 4 bucks.

Friday, October 7, 2011

Yanjing Beer, Delivered in Bottles by Bicycle.

Yanjing is the largest beer producer in China. If you made a single beer for everyone in Beijing each day, that would be 22 million bottles of beer a day. Not that Yanjing does that, but according to the wikipedia, "The company has approximately 20,000 employees, and is one of the largest beer manufacturers in China. They produced 3.11 million tons of beer in 2005 alone. "

I have been noticing a phenomena around town, especially in the Hutong, and other areas with very narrow streets. Bicycles are out in numbers delivering large amounts of beer, most of it Yanjing. In the store across the street from my new hotel, I noticed the bottles of Nanjing were all pretty significantly abraded in the widest part of the bottle near the top. I am pretty sure this is from delivering it by bike, especially since I've never seen it delivered any other way.

Now – I am thinking that if you make 3.11 million tons of beer a year, and you deliver it by bicycle, you'll need at least 20,000 employees. They also deliver it by plane I here, to your seat. And to some other countries in the world.

I'll see if I can get a photo of a bike loaded with beer.

Sleeper to Beijing

6 October 2011, near Shanhaiguan, Qinglong, China

It's dawn. I am on the sleeper from Anshan, Liaoning, China to Beijing. Rivulets of sweat stream down the windows and across the floor. A night times worth of perspiration. A person above me is stirring and little bits of movement rise in sound from around the room. Train personnel sweep through the cabin opening the curtains. A green countryside unfolds, blurred by the sweat condensed on the glass. I am excited to be going to Beijing.

The loud speaker begins it's Mandarin rhythm, a female voice droning on about something unintelligible, to me at least. I am the only Caucasian I have seen for many days on my trip. Bodies begin to unfurl themselves from unbleached white sheets, and gradually it develops in to a cacaphony of unquietness, destroying the peace of my sleep.

There is tea being made. A young woman deftly unfolds down the ladder from somewhere in the sky to artfully find her shoes crammed under the bed below me, without ever touching the floor. The food vendor starts a melodic slow mantra and rolls his cart into the car. My companion stirs. The train is awake.

This could easily be the Nineteenth century, except that the train is very modern. One white guy on a train with 20 coaches of Asia; uniformed train people ply the hall with there goods; their servitude. It could be 100 years ago except the sounds in the room are the smart phones, nooks, kindles, Ipads, PC's of a new generation of China. The sounds of technology enchanting the present. Corn and rice fields arise out of the blurry landscape. The smells of breakfasts being eaten fill the coach. Beijing is in the distance.

Tuesday, October 4, 2011

REI Flash 18

This bag is awesome! Ultralight with hydration capability, waterproofed bulletin cloth and comfortable straps, plus a waist band, make this bag an all around success when you need to carry a few things for a day trip from your hotel. It's an excellent bag to take along empty on your vacation. It's strong and comfortable so could useful on extended ultralight hikes, runs or climbs.

As we know, when travelling, the amount of stuff you ultimately take home can increase, especially if you make friends along the way. Having an extra lightweight bag lets you throw some extra things in to this bag and carry it on to the plane.

On this particular trip, I was planning to ditch my worn out duffel after I delivered all the gifts I carried here to China. The things I carry home as gifts, hopefully will fit into the ultralight bag, making my trip home extra smooth, and without any baggage fees. We will see if I can actually come home with less stuff than I brought.

Four Stars, and So Much More

This is clearly a four star hotel. It says so everywhere. The trappings are well done, the furnishing appropriate. Grand and stately. Looks great all the way around.

Tomorrow morning I will check out of this place, which has been my home for a few days now. I know which of the staff speak English well, how to get enough water for my needs without using the minibar, when they will ask me for a new deposit. I know how to get to and from the place.

I've learned a few things while I am here. I've learned not to push all the buttons to call elevators, but instead to pick the elevator that looks like it's coming towards me, and push one button. It's like sharing only slightly more complicated. When the clerk asks me for money for a deposit, I immediately claim, "That's too much." It is now what I will do anytime any Chinese person quotes me a price for anything.

He asked me if I'd like to pay 1000 Yuan, I said, "That's too much." He said, "How about 800?" Much better. It doesn't matter, when the charges are all settled they will have charged me what they want and I will have paid it. I can't really resist, and I can't really quite get what they are doing, so I just agree and they charge me.

It doesn't really matter, except I suspect that he expects me to try to negotiate the price down. So from now on. "That's too much" is going to be my mantra.

My room was pretty cozy, two double beds with no heat or air and a toilet who's seat would not stay up. I gently tried to adjust it, and it snapped off in my hands. Yes, I broke the toilet seat off the toilet in my room (awesomely, they fixed it immediately). The shower was pretty good, but there was no way to not be pretty much in the stream. They never once filled the mini bar or washed a glass, or vacuumed. In their defense, they did buy my breakfast every day and make the bed, and they did my laundry about four different times. The fan in the room was exceptionally noisy the first few days, and there was a drain in the floor that was venting sewer gases into the room. These two things combined to make me feel like I was in Asia. Once I learned the trick about the fan the stench from the sewer went away.

Leave the fan on all the time. The noise stops, the smell goes away.
One day with not enough to do I looked at the services, which include a bath house and massage … neither of these were actually available. I was pretty disappointed actually, actually, because I was imagining my self James Bond in Hong Kong with the young Asian masseuse coming to my room to attempt to to seduce me to my death. No. No massage, no bath. They did offer to secure someone from the neighborhood for the massage. I declined. No seduction.

I am not complaining. Just pointing out the features of a four star hotel in China. Once I got accustomed to the idiosyncrasies, I was pretty much delighted. The staff are friendly and helpful, one of the elevators comically announces the wrong floor in English. There's plenty to talk about, I can sit it the empty bar and have a coke or a coffee, and write in my notebook. It is much better than many of the places I've stayed. There's a store that sells the same stuff as the mini bar, for about 25% of the price. It feels like home already.

And now I am leaving. Soon, I will be on a sleeper to Beijing. And I will be at a new hotel. With some stars I hope.

Trouble in Cameraland

Problem, my 17-85mm Canon zoom lens is hosed. Last year, about 1 day before leaving for China, my 17-85 zoom stopped working – so I rented a similar lens and sent mine to Canon for repair. This year it's a "err99" every time I try to shoot, which is entirely irritating and unproductive. So that leaves me here in China with one lens, a 10-22mm. Great lens, but not so versatile. So now I have 4 days in Beijing, 10 gigabytes of card space, and 1 extreme wide angle lens.

Lets see what I can do with that. It's a big place, wide lens … it might be OK.

P.S. If you want to comment on how to fix this, that's great, but first we can eliminate some things. It's prolly not the camera body, the battery, or the connection on the camera side, or the camera operating software. These all have worked fine to date. And they work flawlessly with the newer wide angle lens. From the research I did, it might be the connection to the lens from the camera, or it might be a failing shutter. I think the err99 is a bad communication with the lens, a problem I once had while shooting under a waterfall in Zion. Apparently getting the camera damp doesn't help it work correctly. The "err99" seems somewhat nebulous as far as problems go, so may not be easy to solve on the road.

I packed somewhat sparsely on this trip, so didn't bring a lot of extras. Note to self: Next time bring the 50mm prime lens. Next time in China I want it to be 4 stars all around and 4x5's.

P.P.S. Ironically, right after I wrote this I went through the lens and cleaned it and worked all the controls and put it on the camera … and it's working. A hunch. One of the switches for IS or auto-focus was in a position exactly between the fully switched locations.