<?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>Brent Sordyl's blog &#187; ruby</title>
	<atom:link href="http://www.sordyl.info/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sordyl.info</link>
	<description>Daily links to e-Learning and Web Technology resources</description>
	<lastBuildDate>Tue, 07 Sep 2010 15:00:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Automatically posting JIRA defects links to PresentlyApp.com</title>
		<link>http://www.sordyl.info/2008/12/30/automatically-posting-jira-defects-links-to-presentlycom/</link>
		<comments>http://www.sordyl.info/2008/12/30/automatically-posting-jira-defects-links-to-presentlycom/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 02:37:11 +0000</pubDate>
		<dc:creator>BrentSordyl</dc:creator>
				<category><![CDATA[collaboration]]></category>
		<category><![CDATA[httparty]]></category>
		<category><![CDATA[jira4r]]></category>
		<category><![CDATA[present.ly]]></category>
		<category><![CDATA[presentlyapp]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://newsmavens.wordpress.com/?p=322</guid>
		<description><![CDATA[On our team we thought it&#8217;d be useful to auto-post Blocker defects from Jira to our presently stream. The gems httparty and jira4r made it easy.
Here are the steps:
1. Install JIRA, create a user
2. Create a Filter for the defects you want to auto-post, get the ID for that filter from the URL when viewing [...]]]></description>
			<content:encoded><![CDATA[<p>On our team we thought it&#8217;d be useful to auto-post Blocker defects from Jira to our presently stream. The gems httparty and jira4r made it easy.</p>
<p>Here are the steps:</p>
<p>1. Install JIRA, create a user</p>
<p>2. Create a Filter for the defects you want to auto-post, get the ID for that filter from the URL when viewing it. &#8216;jiradmin&#8217; in this example</p>
<p>3. Create a user on presently to post from. &#8216;jira&#8217; in this example</p>
<p>4. Create a cron or windows tasks to run the following ruby code once per hour:</p>
<p style="padding-left:30px;"><strong>jira_presently.rb</strong></p>
<p style="padding-left:30px;">
<p style="padding-left:30px;">#!/usr/bin/env ruby<br />
require &#8216;rubygems&#8217;<br />
require &#8216;httparty&#8217;<br />
require &#8216;rexml/document&#8217;<br />
require &#8216;jira4r/jira4r&#8217;</p>
<p style="padding-left:30px;"><strong># make a HTTParty object for integrating with presentlyapp.com</strong><br />
class Presently<br />
include HTTParty<br />
# Presently api url<br />
base_uri &#8216;https://[EXAMPLE].presentlyapp.com/api/twitter&#8217;<br />
#jira presently user credentials<br />
basic_auth &#8216;jira&#8217;, &#8216;[PRESENTLY PASSWORD]&#8216;<br />
default_params :output =&gt; &#8216;json&#8217;<br />
format :json<br />
end</p>
<p style="padding-left:30px;"><strong># link to your JIRA server and credentials</strong><br />
JIRA_URL = &#8220;[http://jira.url.com/]&#8221;<br />
jira = Jira::JiraTool.new(2, JIRA_URL)<br />
jira.login(&#8221;jiraadmin&#8221;, &#8220;[JIRA PASSWORD]&#8220;)</p>
<p style="padding-left:30px;"><strong>#  Look at key in JIRA filter URL to get ID for the filter</strong><br />
issues = jira.getIssuesFromFilter(10112)</p>
<p style="padding-left:30px;">issues.each do |issue|<br />
<strong># post for the last 1 hour</strong><br />
if Time.parse(issue.created.to_s) &gt; (Time.now &#8211; 60*60)<br />
issue_post = &#8220;Blocker: &#8221; + issue.key + &#8221; &#8211; &#8221; + issue.summary[0..75] + &#8221; #{JIRA_URL}/browse/&#8221; + issue.key<br />
puts Presently.post(&#8217;/statuses/update.json&#8217;, :query =&gt; {:status =&gt; issue_post}).inspect<br />
else<br />
puts issue.key + &#8221; is older than 1 hour&#8221;<br />
end<br />
end</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sordyl.info/2008/12/30/automatically-posting-jira-defects-links-to-presentlycom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
