Overview
This plug-in is designed to build expose a contribution report APIs which extract data representing the effort, typically in time logged, contributed by JIRA each user.
Building this software was tested with version 3.2 of the Atlassian plug-in SDK.
Examples
As this is really just a couple of REST based resource interfaces at the moment it is easiest to illustrate it’s function through some examples.
All URL’s used to address this plug-in begin with the following:
http://localhost:2990/jira/rest/tribs-rest/1.0/
Adding the following fragment will retrieve a summary of contributions:
- This URL will retrieve all contributions to projects by all users.
contributions/all.xml?os_username=admin&os_password=admin
Adding the following fragment will retrieve a summary of contributions for a given period:
contributions/period.xml?os_username=admin&os_password=admin&startDate=2010-01-01&endDate=2010-02-01
This sample below illustrates two users, with one having time spent against two projects and the other with only time spent against a single project.
{ "status-code":200, "message":"Success", "userContributions":[ { "userid":"admin", "fullName":"admin", "projectTimeSpentList":[ { "projectName":"STAR4 Application", "projectKey":"STAR", "timespent":7200 }, { "projectName":"fxassetman", "projectKey":"FXA", "timespent":7200 } ] }, { "userid":"mark", "fullName":"Mark Wolfe", "projectTimeSpentList":[ { "projectName":"fxassetman", "projectKey":"FXA", "timespent":14400 } ] } ] }
worklog/period.xml?os_username=admin&os_password=admin&startDate=2010-01-01&endDate=2011-02-01&userid=admin&projectKey=FXA
TODO
- Need to document the work log interface
- Need to make endDate optional for all period based methods, if not supplied this will be defaulted to now. DONE
- Need to make user id optional for the work log method, so all work log entries can be retrieved for a given project. DONE
- Also need to make project key optional to enable retrieval for all work log entries for a give user. DONE
- Change the description in the work log entry to the value of Issue Title. DONE
- Need to make the startDate optional for all the period based methods, so it acts as all, with the other filters. DONE
Other stuff:
- getUserProjectWorkLogsForPeriod should have it’s parameters reordered for consistency.
- Need a better strategy to deal with optional parameters in some of the projects.