Interface TrackingStatisticService
- All Known Implementing Classes:
TrackingStatisticServiceImpl
public interface TrackingStatisticService
Service for accessing
StatisticsFieldConfig and StatisticsField objects relating to the
Tracking Statistic(s) of a RapidView.- Since:
- v5.9.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe JIRA Field ID that representsTimeEstimateSystemFieldwhen used in aStatisticsFieldConfig. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list ofStatisticsFields which represent the availableStatisticsFieldConfigs.getInstanceOf(StatisticsFieldConfig config) Retrieve the StatisticsField configured in the StatisticFieldConfiggetInvalidTrackingStatistic(RapidView rapidView) Returns aStatisticsFieldinstance which represents an invalidStatisticsFieldConfig.getTrackingStatistic(RapidView rapidView) Will always return aStatisticsField, which may or may not be valid.getTrackingStatisticStrict(RapidView rapidView) Attempts to get theStatisticsFieldof a rapid view.booleanisRemainingEstimateStatisticsField(StatisticsField statisticsField) Is the passed StatisticsField of type remaining estimate?booleanisTrackingStatisticFieldAndApplicable(StatisticsField trackingStatistic, com.atlassian.jira.issue.Issue issue) Is theStatisticsFieldfield based and applicable for the given issue?booleanisTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic, com.atlassian.jira.issue.Issue issue) Is theStatisticsFieldfield based but not applicable for the given issue?booleanisTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic, Long projectId, String issueTypeId) Is theStatisticsFieldfield based but not applicable for the given project and issue type?booleanisTrackingStatisticValidAndEnabled(StatisticsField trackingStatistic) Is theStatisticsFieldvalid and enabled (i.e. should it take part in accumulating statistics over issues)?updateTrackingStatistic(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, StatisticsFieldConfig trackingStatistic) Updates the specified rapid view to a new configuration.
-
Field Details
-
REMAINING_ESTIMATE_FIELD_ID
The JIRA Field ID that representsTimeEstimateSystemFieldwhen used in aStatisticsFieldConfig.- See Also:
-
-
Method Details
-
getAvailableTrackingStatistics
Returns the list ofStatisticsFields which represent the availableStatisticsFieldConfigs.- Returns:
- the list.
-
updateTrackingStatistic
@Nonnull ServiceResult updateTrackingStatistic(com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView, @Nonnull StatisticsFieldConfig trackingStatistic) Updates the specified rapid view to a new configuration.- Parameters:
user- the userrapidView- the rapid viewtrackingStatistic- the new configuration- Returns:
- the outcome; possibly with errors
-
getTrackingStatisticStrict
Attempts to get theStatisticsFieldof a rapid view. Outcome will contain errors if the configured tracking statistic is invalid. You may wish to callgetInvalidTrackingStatistic(com.atlassian.greenhopper.model.rapid.RapidView)in that case. If you just want either the valid or invalidStatisticsFieldto be returned, callgetTrackingStatistic(com.atlassian.greenhopper.model.rapid.RapidView).- Parameters:
rapidView- the rapid view- Returns:
- strict outcome of valid statistics field; or errors
- See Also:
-
getTrackingStatistic
Will always return aStatisticsField, which may or may not be valid.- Parameters:
rapidView- the rapid view- Returns:
- the statistic field
-
getInvalidTrackingStatistic
Returns aStatisticsFieldinstance which represents an invalidStatisticsFieldConfig. This only really makes sense to call if you have previously calledgetTrackingStatisticStrict(com.atlassian.greenhopper.model.rapid.RapidView)and were returned errors.- Parameters:
rapidView- the rapid view- Returns:
- the invalid instance representing the configuration
-
getInstanceOf
Retrieve the StatisticsField configured in the StatisticFieldConfig- Parameters:
config- for the field- Returns:
- StatisticField if can be found.
-
isTrackingStatisticFieldAndApplicable
boolean isTrackingStatisticFieldAndApplicable(StatisticsField trackingStatistic, com.atlassian.jira.issue.Issue issue) Is theStatisticsFieldfield based and applicable for the given issue? (Due to Custom Field configuration contexts, for example.)- Parameters:
trackingStatistic- the tracking statisticissue- the issue- Returns:
- the result
-
isTrackingStatisticFieldAndNotApplicable
boolean isTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic, com.atlassian.jira.issue.Issue issue) Is theStatisticsFieldfield based but not applicable for the given issue? (Due to Custom Field configuration contexts, for example.)- Parameters:
trackingStatistic- the tracking statisticissue- the issue- Returns:
- the result
- See Also:
-
isTrackingStatisticFieldAndNotApplicable
boolean isTrackingStatisticFieldAndNotApplicable(StatisticsField trackingStatistic, Long projectId, String issueTypeId) Is theStatisticsFieldfield based but not applicable for the given project and issue type? (Due to Custom Field configuration contexts, for example.)- Parameters:
trackingStatistic- the tracking statisticprojectId- the ID of the projectissueTypeId- the ID of the issue type- Returns:
- the result
- See Also:
-
isTrackingStatisticValidAndEnabled
Is theStatisticsFieldvalid and enabled (i.e. should it take part in accumulating statistics over issues)?- Parameters:
trackingStatistic- the tracking statistic- Returns:
- the result
- See Also:
-
isRemainingEstimateStatisticsField
Is the passed StatisticsField of type remaining estimate?
-