Archive | jira4r RSS feed for this section

JIRA & Confluence Starter Licenses – 5 users for $5

Atlassian Stimulus Package

For this week only, Atlassian is offering a special 5-user “starter” license of JIRA and Confluence for only $5 each. It’s called the Atlassian Stimulus Package. Best of all, they’re going to donate every penny to charity.

There is no catch and no strings attached. You’ll get fully functional, supported copies of JIRA and Confluence for only $5 each. After a year, you can renew support and maintenance of your license for just $5.

Automatically posting JIRA defects links to PresentlyApp.com

On our team we thought it’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 it. ‘jiradmin’ in this example

3. Create a user on presently to post from. ‘jira’ in this example

4. Create a cron or windows tasks to run the following ruby code once per hour:

jira_presently.rb

#!/usr/bin/env ruby
require ‘rubygems’
require ‘httparty’
require ‘rexml/document’
require ‘jira4r/jira4r’

# make a HTTParty object for integrating with presentlyapp.com
class Presently
include HTTParty
# Presently api url
base_uri ‘https://[EXAMPLE].presentlyapp.com/api/twitter’
#jira presently user credentials
basic_auth ‘jira’, ‘[PRESENTLY PASSWORD]‘
default_params :output => ‘json’
format :json
end

# link to your JIRA server and credentials
JIRA_URL = “[http://jira.url.com/]“
jira = Jira::JiraTool.new(2, JIRA_URL)
jira.login(“jiraadmin”, “[JIRA PASSWORD]“)

#  Look at key in JIRA filter URL to get ID for the filter
issues = jira.getIssuesFromFilter(10112)

issues.each do |issue|
# post for the last 1 hour
if Time.parse(issue.created.to_s) > (Time.now – 60*60)
issue_post = “Blocker: ” + issue.key + ” – ” + issue.summary[0..75] + ” #{JIRA_URL}/browse/” + issue.key
puts Presently.post(‘/statuses/update.json’, :query => {:status => issue_post}).inspect
else
puts issue.key + ” is older than 1 hour”
end
end


Follow

Get every new post delivered to your Inbox.