I am doing a presentation at the Canberra Atlassian User Group on 13 Feb 2014 titled “JIRA Integration: Using JIRA Without Using JIRA”. This idea of this presentation is to give some insight into the the various integration points that JIRA offers and how they can be used. You can take a look at the slides here.
For those of you that don’t know JIRA is a product by an Australian company called Atlassian and is primarily for bug tracking within software although people are often finding new and innovative ways to use it.
JIRA includes three main points of integration outside of using the software itself, these are the Issue Collector, the web service APIs and the (fairly) new Webhooks. Each of which are outlined below.
JIRA provides several options for automating repetitive tasks and allows strong integration with other systems. Find out what these options are and use them to your advantage.
The issue collector (introduced in JIRA 5.1) allows a “Create Issue” type form to be embedded in any web system. This is by far the easy way to integrate with JIRA.
Example of a JIRA issue collector.
Issue collectors are incredibly simply to use, you set up some basic config such as the name and description of your collector and importantly you specify what type of issue is to be raised when a user submits the form. My advice here is to create a fairly generic issue type for use with only issue collectors in order to easily filter them. After the initial configuration you specify which fields you want to display on the form – this allows you to choose from any fields you have specified for that issue type based on the configuration schemes.
- Limits the double-entry of data – rather than issues/feedback being submitted by email or in spreadsheets or similar the issues can go directly into JIRA.
- There is no need to write you own feedback functionality within your application when JIRA can provide it out-of-the-box.
- Avoids losing information – once the data is in JIRA is can be categorised and closed if required but at least it saves endless hours searching through old emails.
Web Service APIs
JIRA includes a very extensive set of APIs in the form of web services. Both SOAP/XML-RPC and REST web services exist but the SOAP webservices were deprecated in JIRA 6.0 in favour of REST which was introduced in JIRA 4.2.
Nearly everything that can be done using the JIRA front end can also be achieved using a web service API from creating and updating issues to transitioning workflow stages. This allows for very tight integration with other systems and easy automation of repetitive tasks.
To make the use of the JIRA APIs easy the online documentation is fantastic and several libraries exist to abstract away from using the API directly, this includes Atlassians own REST Java Client for JIRA as well as a number of 3rd party libraries for other languages including .NET and python.
The APIs are available both in the self hosted versions and the “On-Demand” cloud based version that are hosted by Atlassian.
In order to demonstrate the capability of the web service APIs her are some examples showing how they could be used.
Example 1 – Automating Workflow
Use with Jenkins
Example 2 – Automating Release Notes
I wont write much here as I have written an entire blog post on this here.
Webhooks are a feature introduced in JIRA 5.2 that allow a one way communication from JIRA to another system. Webhooks are a fairly new and emerging technology on the internet and work by an event in one system triggering a one way notification to another system. This basically eliminates the need to constant polling and provides a very simple method of integration – receiving a webhook notification is no more complex that receiving a submitted HTML form.
JIRA allows webhooks to be trigger for issues that conform to a certain JQL query and will issue notifications for newly created issues, deleted issues, updated issues and as work is logged against an issue.
Webhooks are easily configured via the JIRA front end using the form shown above. The core part of this configuration is the URL in which JIRA will send the notification to. Along with the notification will be information contained within the issue unless the “Exclude issue details from the POST to URL” option is checked.
As with the APIs an example might help to understand the value of Webhooks.
Example – Issuing an Assessment
Recruitment can easily be managed within JIRA. A heavily customised issue type of “Applicant” could be created to store all the information about an applicant and a workflow could be made to have stages such as “New Applicant”, “Awaiting Assessment”, “Phone Interview”, “Face-to-Face Interview”, etc. This works very well when combined with JIRA Agile and viewing all these applicants on a Rapid Board.
However, as part of the above process there is an assessment stage. This is in the form of an online assessment used as an initial screening of applicants to assess their ability to carry out the job. Obviously, JIRA is not capable of issuing and managing tests, this would have to be done by another system. Using web hooks the assessment system can be notified every time that a new “Applicant” issue type is created and immediately issue them a test. This therefore eliminates the need to have the assessment system constantly polling JIRA for new applicants or asking the user to enter the information once into JIRA and once in the assessment system.
Using the APIs the assessment system can even write information back to JIRA such as the URL of the online assessment and the score that the applicant achieved.