<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>One Man's Walk in work &#187; cruisecontrolrb</title>
	<atom:link href="http://onemanswalk.com/work/tag/cruisecontrolrb/feed/" rel="self" type="application/rss+xml" />
	<link>http://onemanswalk.com/work</link>
	<description>jeremy lightsmith on agile, ruby, and consulting</description>
	<lastBuildDate>Wed, 04 May 2011 04:29:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cruise Control.rb is moving to Lighthouse</title>
		<link>http://onemanswalk.com/work/2008/04/23/cruise-control-rb-is-moving-to-lighthouse/</link>
		<comments>http://onemanswalk.com/work/2008/04/23/cruise-control-rb-is-moving-to-lighthouse/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 16:12:00 +0000</pubDate>
		<dc:creator>jeremy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cruisecontrolrb]]></category>
		<category><![CDATA[lighthouse]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[	So, following rSpec&#8217;s example, we&#8217;re moving from JIRA to Lighthouse.  Check us out at http://cruisecontrolrb.lighthouseapp.com/

	I have to say I wasn&#8217;t thrilled about Jira.  It does everything, and it does it slowly, with a UI that is bloated at best.  Lighthouse, on the other hand, keeps it REALLY simple.  And does not [...]]]></description>
			<content:encoded><![CDATA[	<p>So, following rSpec&#8217;s example, we&#8217;re moving from <span class="caps">JIRA</span> to Lighthouse.  Check us out at <a href="http://cruisecontrolrb.lighthouseapp.com/" title="">http://cruisecontrolrb.lighthouseapp.com/</a></p>

	<p>I have to say I wasn&#8217;t thrilled about Jira.  It does everything, and it does it slowly, with a UI that is bloated at best.  Lighthouse, on the other hand, keeps it <span class="caps">REALLY</span> simple.  And does not a lot more than what we need.  It also just opened itself up for <span class="caps">OSS</span> projects (which is cool).</p>

	<p>How did we migrate all of our stories from <span class="caps">JIRA</span> to Lighthouse?  I thought you&#8217;d never ask.</p>

	<p>Lighthouse exposes a slick <span class="caps">RES</span>Tful <span class="caps">API</span> for managing your data.  I exported the <span class="caps">JIRA</span> issues into a csv file, wrote a short ruby script, waited about 5 minutes for it to run, and I was done.</p>

	<p>Here&#8217;s the script:</p>

	<p>
<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'csv'</span>
&nbsp;
JiraIssue = <span style="color:#CC00FF; font-weight:bold;">Struct</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:issue_type</span>, <span style="color:#ff3333; font-weight:bold;">:key</span>, <span style="color:#ff3333; font-weight:bold;">:status</span>, <span style="color:#ff3333; font-weight:bold;">:assign_to</span>, 
                       <span style="color:#ff3333; font-weight:bold;">:summary</span>, <span style="color:#ff3333; font-weight:bold;">:description</span>, <span style="color:#ff3333; font-weight:bold;">:fix_version</span>, 
                       <span style="color:#ff3333; font-weight:bold;">:reporter</span>, <span style="color:#ff3333; font-weight:bold;">:priority</span>, <span style="color:#ff3333; font-weight:bold;">:original_estimate</span>, 
                       <span style="color:#ff3333; font-weight:bold;">:votes</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> load_issues<span style="color:#006600; font-weight:bold;">&#40;</span>csv_file<span style="color:#006600; font-weight:bold;">&#41;</span>
  header = <span style="color:#0000FF; font-weight:bold;">true</span>
  issues = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  CSV.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>csv_file, <span style="color:#996600;">'r'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>row<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#9966CC; font-weight:bold;">if</span> header
      header = <span style="color:#0000FF; font-weight:bold;">false</span>
    <span style="color:#9966CC; font-weight:bold;">else</span>
      issues <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> JiraIssue.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>row<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  issues
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
issues = load_issues<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;/jiraissues.csv&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># this code is just to examine what our JIRA data looks like</span>
<span style="color:#9966CC; font-weight:bold;">def</span> show<span style="color:#006600; font-weight:bold;">&#40;</span>issues, field<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;#{field} = #{issues.map{|i| i.send(field)}.uniq.inspect}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
show issues, <span style="color:#ff3333; font-weight:bold;">:issue_type</span>
show issues, <span style="color:#ff3333; font-weight:bold;">:status</span>
show issues, <span style="color:#ff3333; font-weight:bold;">:assign_to</span>
show issues, <span style="color:#ff3333; font-weight:bold;">:fix_version</span>
show issues, <span style="color:#ff3333; font-weight:bold;">:reporter</span>
show issues, <span style="color:#ff3333; font-weight:bold;">:priority</span>
show issues, <span style="color:#ff3333; font-weight:bold;">:original_estimate</span>
show issues, <span style="color:#ff3333; font-weight:bold;">:votes</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># these hashes translate between JIRA and Lighthouse</span>
states = <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#996600;">&quot;Open&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'open'</span>,
  <span style="color:#996600;">&quot;Resolved&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'resolved'</span>,
  <span style="color:#996600;">&quot;Closed&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'invalid'</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
users = <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#996600;">&quot;Unassigned&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">nil</span>,
  <span style="color:#996600;">&quot;Alexey Verkhovsky&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">10545</span>, 
  <span style="color:#996600;">&quot;Rolf Russell&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">17992</span>, 
  <span style="color:#996600;">&quot;Jeremy Stell-Smith&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">10638</span>, 
  <span style="color:#996600;">&quot;Zhang Lin&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">nil</span>, 
  <span style="color:#996600;">&quot;Jeff Xiong&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">nil</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
milestones = <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#996600;">&quot;1&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">9885</span>,
  <span style="color:#996600;">&quot;1.1&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">9886</span>, 
  <span style="color:#996600;">&quot;1.2&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">9887</span>, 
  <span style="color:#996600;">&quot;1.3&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">9888</span>, 
  <span style="color:#996600;">&quot;1.4&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">9889</span>, 
  <span style="color:#996600;">&quot;<span style="color:#000099;">\3</span>02<span style="color:#000099;">\2</span>40 &quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">nil</span>, 
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;/lib/lighthouse&quot;</span>
<span style="color:#9966CC; font-weight:bold;">include</span> Lighthouse
&nbsp;
Lighthouse.<span style="color:#9900CC;">account</span> = <span style="color:#996600;">&quot;cruisecontrolrb&quot;</span>
<span style="color:#008000; font-style:italic;"># enter your own user, password here...</span>
Lighthouse.<span style="color:#9900CC;">authenticate</span> <span style="color:#996600;">&quot;jeremystellsmith@gmail.com&quot;</span>, <span style="color:#996600;">&quot;*******&quot;</span> 
&nbsp;
issues.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>i<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#008000; font-style:italic;"># enter your own project id here...</span>
  ticket = Ticket.<span style="color:#9900CC;">new</span> <span style="color:#ff3333; font-weight:bold;">:project_id</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">9150</span>
&nbsp;
  ticket.<span style="color:#9900CC;">title</span> = i.<span style="color:#9900CC;">summary</span>
  ticket.<span style="color:#9900CC;">body</span> = i.<span style="color:#9900CC;">description</span>
  ticket.<span style="color:#9900CC;">state</span> = states<span style="color:#006600; font-weight:bold;">&#91;</span>i.<span style="color:#9900CC;">status</span>.<span style="color:#9900CC;">to_s</span>.<span style="color:#9900CC;">strip</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  ticket.<span style="color:#9900CC;">assigned_user_id</span> = users<span style="color:#006600; font-weight:bold;">&#91;</span>i.<span style="color:#9900CC;">assign_to</span>.<span style="color:#9900CC;">to_s</span>.<span style="color:#9900CC;">strip</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  ticket.<span style="color:#9900CC;">milestone_id</span> = milestones<span style="color:#006600; font-weight:bold;">&#91;</span>i.<span style="color:#9900CC;">fix_version</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  ticket.<span style="color:#9900CC;">tags</span></pre></div></div>
</p>



	<p>There was another step.  I ran the first part of the script a couple times to tell me what the different issue_types, statuses, assigned users, fix versions, etc were that my <span class="caps">JIRA</span> data was using.  I then found or created the appropriate data in Lighthouse and added some hashes to translate for me.</p>

	<p>All in all, I&#8217;m pretty thrilled with how easy this was.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://onemanswalk.com/work/2008/04/23/cruise-control-rb-is-moving-to-lighthouse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

