JIRA: Hassle Free Tracking
Author : Geetu Sadana
Many organizations rely on Jira to run their work operations. Jira is used for creating, managing and planning tasks. Jira provides custom fields to track various tasks in dashboard.
However, manually tracking and managing future releases alongside bugs in existing systems for each and every team can be a tough job and when it comes to manual tracking, there can be loss of accuracy. One of the scenarios here can be managing various dashboards or maintaining reports in excel.
Now, to get accurate and efficient results, we need to automate these manual task tracking using Jira API. It saves our manual effort that needs to be performed throughout the release cycle.

Challenges faced during JIRA API Automation :
1. Authentication -
For Authentication, extensive R&D was performed so as to make it work smoothly since JIRA API is inherently not open source.
A successful R&D yielded the below result -
There is a rest assured class viz. PreemptiveBasicAuthScheme which is used for authentication by setting username and password.
In the JIRA Profile, under Security section one can find Create and Manage API tokens link which is used to generate a token that can be used as password with email-id as username.
By using the above authentication, we can now have access to all JIRA APIs for building task tracking systems.
2. Finding the relevant APIs to extract desired result -
JIRA APIs which we used for automation of task tracker along with their usage are shared below -
https://infoedge.atlassian.net/rest/greenhopper/latest/sprintquery/+boardid
In the above API, board id would be your project id i.e. whenever a project is created there is one rapid view id generated for that, this rapid view id is used as board id.
Now by using this rapid view id in the above API, we can get a list of all the sprints of that project, from which we can find the current active sprint of the project. This sprint id can be used further to get all the details of that sprint.
https://infoedge.atlassian.net/rest/agile/latest/sprint/+SprintId+/issue
The sprint id which we found in our first API can be used in this API to get a list of all the issues/stories of that particular sprint.
Using this, we can calculate the total story points of the sprint and we can also check for “QA only”, “Dev only” tasks.
https://infoedge.atlassian.net/rest/api/latest/issue/+storyid
The story ids which we have derived in our second API can now be used in this API to get status of tasks in various states — Ready For QA / Open / In progress / Start In Test etc. and the corresponding round of each task.
If we further need to apply filters/search functionality, then we can use this API with JQL query as parameter. The JQL query can be modified as per our requirements.
JIRA APIs are used in Shiksha for generation of following reports:
We have used APIs to generate Current Sprint Status with respect to percentage delivery and percentage completeness grouped by Module/Team.
We have used JIRA APIs to generate Quality Report containing -
- Shiksha Overall (Combined) Stats
- Team wise stats
Various parameters used in the Quality Report are -
a) Team Velocity , Story Points committed & Points Complete
b) Valid Functional & UI Bugs logged during Sprint cycle
c) Bugs / Story Points
d) Production issues
References: