Class ResolutionTimeResource
java.lang.Object
com.atlassian.jira.gadgets.system.AbstractResource
com.atlassian.jira.gadgets.system.SearchQueryBackedResource
com.atlassian.jira.gadgets.system.ResolutionTimeResource
@Path("resolutiontime")
@Produces("application/json")
public class ResolutionTimeResource
extends SearchQueryBackedResource
REST endpoint to validate and retreive the Resolution Time chart.
- Since:
- v4.0
-
Field Summary
Fields inherited from class com.atlassian.jira.gadgets.system.SearchQueryBackedResource
authenticationContext, chartUtils, permissionManager, QUERY_STRING, searchService
-
Constructor Summary
ConstructorsConstructorDescriptionResolutionTimeResource
(ChartFactory chartFactory, ChartUtils chartUtils, JiraAuthenticationContext authenticationContext, SearchService searchService, PermissionManager permissionManager, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, TimeZoneManager timeZoneManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
getChart
(String queryString, String days, String periodName, boolean returnData, int width, int height, boolean inline) Generate a bar chart of the time required to resolve issues.javax.ws.rs.core.Response
Ensures all parameters are valid for the resolution time graph.Methods inherited from class com.atlassian.jira.gadgets.system.SearchQueryBackedResource
getFilterTitle, getFilterUrl, getSearchRequestAndValidate, validateSize
Methods inherited from class com.atlassian.jira.gadgets.system.AbstractResource
createErrorResponse, createIndexingUnavailableResponse, createValidationResponse
-
Constructor Details
-
ResolutionTimeResource
@Inject public ResolutionTimeResource(ChartFactory chartFactory, ChartUtils chartUtils, JiraAuthenticationContext authenticationContext, SearchService searchService, PermissionManager permissionManager, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, TimeZoneManager timeZoneManager)
-
-
Method Details
-
getChart
@GET @Path("/generate") public javax.ws.rs.core.Response getChart(@QueryParam("projectOrFilterId") String queryString, @QueryParam("daysprevious") @DefaultValue("30") String days, @QueryParam("periodName") @DefaultValue("daily") String periodName, @QueryParam("returnData") @DefaultValue("false") boolean returnData, @QueryParam("width") @DefaultValue("450") int width, @QueryParam("height") @DefaultValue("300") int height, @QueryParam("inline") @DefaultValue("false") boolean inline) Generate a bar chart of the time required to resolve issues.- Parameters:
queryString
- a filter id (starts with "filter-") or project id (starts with "project-") or jql (starts with "jql-")days
- The number of days previous to go back for. Must be positive.periodName
- The name of the period. See -ChartFactory.PeriodName
returnData
- if true, the detailed data will be returned.width
- the width of the chart in pixels (defaults to 400px)height
- the height of the chart in pixels (defaults to 300px)- Returns:
- a response that represents the view for the bar chart.
-
validate
@GET @Path("validate") public javax.ws.rs.core.Response validate(@QueryParam("projectOrFilterId") String queryString, @QueryParam("daysprevious") @DefaultValue("30") String days, @QueryParam("periodName") @DefaultValue("daily") String periodName) Ensures all parameters are valid for the resolution time graph.- Parameters:
queryString
- a filter id (starts with "filter-") or project id (starts with "project-") or jql (starts with "jql-")days
- the number of days over which the bar chart is to be drawn.periodName
- the name of a period See -ChartFactory.PeriodName
- Returns:
- a failure response if the parameters are not valid for producing a bar chart.
-