Report Data
It is possible to access report data via REST call to a JIRA endpoint introduced by Time in Status. The parameters of the REST call correspond to Time in Status report parameters.
Rest Call Format
The REST call should be made in the following format
<base_url>/rest/tis/report/1.0/out/file?filterType=<filterType>&user=<user>&projectKey=<projectKey>&jqlFilterID=<jqlFilterID>&customjql=<customjql>&sprintID=<sprintID>&columnsBy=<columnsBy>&fields=<fields>&statuses=<statuses>&groups=<groups>&includeDeletedStatuses=<includeDeletedStatuses>&startDate=<startDate>&endDate=endDate&dateRangeField=<dateRangeField>&calendar=<calendar>&dayLength=<dayLength>&viewFormat=<viewFormat>&outputType=<outputType>&groupByFields=<groupByFields>&dateFormat=<dateFormat>&dateTimeFormat=<dateTimeFormat>
Parameters
Token | Description | Required | Value Samples |
---|---|---|---|
base_url | The baseURL of your JIRA instance. | Yes | |
outputType | The output file format of the report. Possible options are:
| Yes |
|
filterType | Defines how the issues to be included in the report will be selected. Possible options are:
| Yes |
|
user | If filterType is user, system expects a user name in the form user=<some_user_name> | Only when filterType = user |
|
projectkey | If filterType is project, system expects a project key in the form projectKey=<project_key> | Only when filterType = project |
|
jqlfilterID | If filterType is jqlfilter, system expects a JQL filter ID in the form jqlFilterID=<jqlFilterID> | Only when filterType = jqlfilter |
|
customjql | If filterType is customjql, system expects a JQL Query in the form customjql=<customJQL> | Only when filterType = customjql |
|
sprintID | If filterType is sprint, system expects a Sprint ID in the form sprintID=<sprintID> | Only when filterType = sprint |
|
columnsBy | Defines the column structure of the report. Possible options are:
| Yes |
|
fields | The IDs of fields (separated by commas) on JIRA Issue that will be added to report output as columns. Both system and custom fields are supported. | assignee,customfield_10020,customfield_10007,description,duedate, fixVersions | |
groupByFields | The IDs of fields (separated by commas) on JIRA Issue that will be used to group issues for average data. Both system and custom fields are supported. Some fields are intentionally excluded. Date fields are included in a speacial format that allows data parts to be used. For further information look at "Field Names for REST Reporting" page. | assignee,customfield_10140,date:year:resolutiondate,date:week:resolutiondate | |
statuses | The IDs of statuses of which the durations will be included in the report. System expects you to provide existing status IDs. It is possible to leave this parameter empty but then the report will include issue rows without any duration columns. For assignee based reports, durations of unselected statuses will be excluded from durations of assignee columns. If not provided, the report will include all statuses in issues' histories. |
| |
groups | The names of user groups (separated by commas) that will be included in Group Time report. If not provided or empty, the report will included all durations in a column named "Not a member of selected groups" |
| |
includeDeletedStatuses | Sets whether included statuses in issues' histories will be included in the report or not: Possible options are:
In not provided, "true" is assumed. |
| |
startDate | The start date of report interval in "yyyy-MM-dd" or "yyyy-MM-dd hh:mm" format. If time parameter is no given default time "00:00" will be process | Yes | 2017-07-01 00:00 |
endDate | The end date of report interval in "yyyy-MM-dd" or "yyyy-MM-dd hh:mm" format. If time parameter is no given default time "00:00" will be process | Yes | 2017-08-31 23:59 |
dateRangeField | The dateConditionField type that startDate and endDate parameters will be based on. Possible options are:
| Yes |
|
calendar | The calendar that report durations will be calculated based on. Possible options are:
| Yes |
|
dayLength |
|
| |
viewFormat | The format of duration data in the report. Possible options are:
| Yes |
|
dateFormat | The string format to use for displaying values of fields of type Date Default JIRA date format is used if parameter is empty of missing. You can refer to the Java Documentation for more information about Date Format Strings. |
| |
dateTimeFormat | The string format to use for displaying values of fields of type DateTime Default JIRA datetime format is used if parameter is empty of missing. You can refer to the Java Documentation for more information about Date Format Strings. |
|
Examples:
http://192.168.0.71:7500/jira75/rest/tis/report/1.0/out/file?filterType=user&user=admin&columnsBy=statusDuration&fields=assignee&statuses=3,10000,10001&includeDeletedStatuses=true&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=normalHours&dayLength=24HourDays&viewFormat=minutes&outputType=xls&groupByFields=assignee,date:year:resolutiondate,date:week:resolutiondate
http://192.168.0.71:7500/jira75/rest/tis/report/1.0/out/file?filterType=project&projectKey=PMP&columnsBy=statusDuration&fields=assignee&statuses=3,10000,10001&includeDeletedStatuses=true&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=0&dayLength=24HourDays&viewFormat=minutes&outputType=xlsx&groupByFields=assignee,date:year:resolutiondate,date:week:resolutiondate&dateFormat=yyyy-MM-dd&dateTimeFormat=yyyy-MM-dd hh:mm a
http://192.168.0.71:7500/jira75/rest/tis/report/1.0/out/file?filterType=jqlfilter&jqlFilterID=10004&columnsBy=statusDuration&fields=assignee&statuses=3,10000,10001&includeDeletedStatuses=true&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=1&dayLength=businessDays&viewFormat=minutes&outputType=csv&dateFormat=yy-MM-dd&dateTimeFormat=yyyy-MM-dd HH:mm:ss
http://192.168.0.71:7500/jira75/rest/tis/report/1.0/out/file?filterType=customjql&customjql=project=ABC&columnsBy=statusDuration&fields=assignee&statuses=3,10000,10001&includeDeletedStatuses=true&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=1&dayLength=businessDays&viewFormat=minutes&outputType=csv&dateFormat=yy-MM-dd&dateTimeFormat=yyyy-MM-dd HH:mm:ss
http://192.168.0.71:7500/jira75/rest/tis/report/1.0/out/file?filterType=sprint&sprintID=2&columnsBy=statusDuration&fields=assignee&statuses=3,10000,10001&includeDeletedStatuses=true&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=1&dayLength=businessDays&viewFormat=minutes&outputType=csv&dateFormat=yy-MM-dd&dateTimeFormat=yyyy-MM-dd HH:mm:ss
Return
The REST call returns an XLS, XLSX or CSV file that contains all the data in the report.
Calendars
A list of calendars defined in the system with their IDs can be requsted through the following REST endpoint.
<base_url>/rest/tis/report/1.0/data/calendars
Example:
http://192.168.0.74:8080/rest/tis/report/1.0/data/calendars
Return
The call returns a JSON text that contains all calendar definitions in the system.