Epic Sum Up provides it's user with a Java API. You can use this API to extract data from Epic Sum Up to use with other business components however needed.
This enables vast varieties of customization.
To access this data you can use a script extension like Scriptrunner within your Jira instance.
We do support the following provider classes and functions:
The ProgressResolutionResult is a class that can be used to display the progress of issues. It contains the amount of issues as well as the number of resolved or unresolved issues.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.ApplicationUser; import com.onresolve.scriptrunner.runner.customisers.PluginModule import com.onresolve.scriptrunner.runner.customisers.WithPlugin import aptis.plugins.epicSumUp.api.ProgressProvider import aptis.plugins.epicSumUp.api.model.ProgressResolutionResult @WithPlugin("aptis.plugins.epicSumUp") @PluginModule ProgressProvider progressProvider ApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(); ProgressResolutionResult progress = progressProvider.getProgressByResolution( event.issue, currentUser ); return progress.getResolved();
You can use any of the following functions to get the result you need:
function | Output | explanation |
---|---|---|
Integer getTotal(); | 5 | Number of all issues in this scope |
Integer getResolved(); | 1 | Number of all issues in this scope with status resolved |
Integer getUnresolved(); | 4 | Number of all issues in this scope with status unresolved |
The ProgressNumberWithStatusResult can be used to process the results of number custom fields (e.g. StoryPoints).
In contrast to ProgressResolutionResult, ProgressNumberWithStatusResult will return a decimal number and even a budget, if possible.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.ApplicationUser; import com.atlassian.jira.issue.CustomFieldManager; import com.atlassian.jira.issue.fields.CustomField; import com.onresolve.scriptrunner.runner.customisers.PluginModule import com.onresolve.scriptrunner.runner.customisers.WithPlugin import aptis.plugins.epicSumUp.api.ProgressProvider import aptis.plugins.epicSumUp.api.model.ProgressNumberWithStatusResult @WithPlugin("aptis.plugins.epicSumUp") @PluginModule ProgressProvider progressProvider CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager(); ApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(); CustomField storyPointsField = customFieldManager.getCustomFieldObject("customfield_10106") ProgressNumberWithStatusResult progress = progressProvider.getNumberProgress( event.issue, storyPointsField, currentUser ); return (double)progress.getResolved();
You can use any of the following functions to get the result you need:
function | Output | explanation |
---|---|---|
Double getTotal(); | 5.0 | Process the result of all number fields in a given scope |
Double getResolved(); | 1.0 | Process the result of all number fields of resolved issues in a given scope |
Double getUnresolved(); | 4.0 | Process the result of all number fields of unresolved issues in a given scope |
Double @Nullable getBudget(); | 15.5 | Process the budget of the given issue(s) |
String getText(); | 5 / 10 | Process the number of values in resolved issues in relation to the total number |
ProgressTimeResult is used to access values that are specifically used as time values.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.user.ApplicationUser; import com.onresolve.scriptrunner.runner.customisers.PluginModule import com.onresolve.scriptrunner.runner.customisers.WithPlugin import aptis.plugins.epicSumUp.api.ProgressProvider import aptis.plugins.epicSumUp.api.model.ProgressTimeResult @WithPlugin("aptis.plugins.epicSumUp") @PluginModule ProgressProvider progressProvider ApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(); ProgressTimeResult progress = progressProvider.getTimeProgress( event.issue, currentUser ); return (long)progress.getTimeSpent();
You can use any of the following functions to get the result you need:
function | Output | explanation |
---|---|---|
Long getTimeSpent(); | Time in seconds | Process the result of all number fields in a given scope |
Long getOriginalEstimate(); | Time in seconds | Process the result of all number fields of resolved issues in a given scope |
Long getRemainingEstimate(); | Time in seconds | Process the result of all number fields of unresolved issues in a given scope |
Long @Nullable getBudget(); | Time in seconds | Process the budget of the given issue(s) |
When using JMCF, you have to define the progressProvider as follows:
def progressProvider = getComponent(ProgressProvider.class);