Ian Sheridan's Homepage

Jira and Ruby sitt'n in a tree...

Well here I am Using Jira at work and planing on adding Jira support to BluPlate. I had to look around a little but was eventually pointed to Jira4R. The documentation is terrible inline commenting is not really anything to write home about but it works. I was at first at a loss as to figuring out what the hell to do to get the data i needed out of my install of Jira. I also need to create issues in Jira.

I hunted around and found the exact list of functions that are exposed to me threw the web service here. The RPC documentation that Atlassian created. What Jira4R does is just expose those methods for use in ruby. Well! That's great for me as not all I need to do to do the following:

require 'jira4r'

jira = Jira4R::JiraTool.new(2, "http://jira.atlassian.com")
jira.login "soaptester", "soaptester"

puts jira.getProject(“DEMO”).inspect

# and to create an issue
issue = Jira4R::V2::RemoteIssue.new
issue.project = “DEMO”
issue.type = “1”
issue.summary = “Test from Ruby”
issue.assignee = “soaptester”

jira.createIssue(issue)

Well we want install this gem for use. You need Soap4R also for this to work so here:

sudo gem install soap4r jira4r

whelp that should do it for you. Good luck in your adventures with Jira!

© 2012 Ian Sheridan, all rights reserved.