Wednesday, January 22, 2014

JIRA custom reports from your current BI platform

Granted you can build plugins in JIRA, in fact you can even sell them. You are not supposed to hit the database directly as there is a JIRA REST API which should take care of certain isolation to maintain backward compatibility. However in a team where separation of concerns is respected, and specially if it is implemented through team specialization I am reluctant to think that middle tier developers will be providing reports while backend developers cannot. Furthermore, company wide reports while in part based on WIP and work done are usually generated from outside of JIRA so it makes sense to have a way to provide JIRA reports from outside of it, in other words from your custom BI platform.

Data analysts exist for a reason. Their skills concentrate on data manipulation rather than UX/UI and middle tier programming like Java.

Consuming JSON from their ETL tools should allow Data Analysts to mashup information and present it through their Report Engine* in Excel, PDF etc.

Below are some important API entry points to help you build such reports:
  1. /rest/api/2/project/${project}: Information about ${project}. Note that you might have to use the description field if you want to add custom metadata to the project
  2. /rest/api/latest/field: Find out how the custom field is actually named by the API, for example customfield_10013 could be a custom field representing a custom "department" field.
  3. /rest/api/latest/search?jql=&expand=customfield_10013: Return all tickets matching the JQL provided adding our custom "department" field.
  4. /rest/api/2/search?jql=issueFunction in workLogged('by admin on 2014/03/11'): This works only if you install the free plugin named "script runner". Another non-free way would be with /rest/api/latest/search?jql=key%20in%20workedIssues(%222013/1/20%22,%222014/1/20%22,%22jira-users%22)&fields=worklog: List tickets with worklog fields including the timespent on them. It requires the installation of the jiratimesheet plugin.
  5. Search for your issue and if there are no clues for it then open a question in Jira Answers. The main question for reports will mainly be "How do I do ... through the REST API"
So while I see value in designing reports within JIRA I believe those should be easily exposed via JSON REST API (as jiratimesheet does) if the work spent there is expected to be reused from outside JIRA.

*If you ask me I would prefer Front End Engineers to take care of the layout of reports but at the time of this writing report engines are still a concern of Data Analysts.

No comments: