Class StatisticFieldHelper
java.lang.Object
com.atlassian.greenhopper.web.rapid.issue.StatisticFieldHelper
Helper methods for creating
RapidIssueEntry.StatisticFieldValue
representation of an estimate statistic StatisticsField
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCurrentEstimateStatistic
(com.atlassian.jira.issue.Issue issue, HistoricalEstimateStatisticValueResolver issueStatisticValueResolver) Creates a current estimation of aRapidIssueEntry.StatisticFieldValue
for the given issue andIssueStatisticValueResolver
.createEstimateStatistic
(com.atlassian.jira.issue.Issue issue, IssueStatisticValueResolver issueStatisticValueResolver) Creates a representation of aRapidIssueEntry.StatisticFieldValue
for the given issue andIssueStatisticValueResolver
.createEstimateStatistic
(Long projectId, String issueTypeId, String documentValue, DocumentStatisticValueResolver documentStatisticValueResolver) Creates a representation of aRapidIssueEntry.StatisticFieldValue
for the given document value andDocumentStatisticValueResolver
.Shortcut for creating aRapidIssueEntry.StatisticFieldValue
when we know the configuredStatisticsField
is of typeStatisticsFieldConfig.Type.ISSUE_COUNT
.createTrackingStatistic
(StatisticsField estimateStatistic, Long projectId, String issueTypeId, com.atlassian.greenhopper.web.rapid.issue.StatisticFieldHelper.EnclosedValueResolver enclosedValueResolver) createTrackingStatistic
(Long projectId, String issueTypeId, String documentValue, DocumentStatisticValueResolver documentStatisticValueResolver) Creates a representation of aRapidIssueEntry.StatisticFieldValue
for the given document value andDocumentStatisticValueResolver
.createTrackingStatisticValue
(DocumentStatisticValueResolver documentStatisticValueResolver, Long projectId, String issueTypeId, Double value) Renders the tracking statistic for an already calculated value, such as aggregated statistic value (e.g. time tracking in plan mode)getEstimateStatisticFieldId
(StatisticsField estimateStatistic, com.atlassian.jira.issue.Issue issue) Get the field ID of the estimate statistic for the specified issue.getTrackingStatisticFieldId
(StatisticsField trackingStatistic, com.atlassian.jira.issue.Issue issue) Get the field ID of the tracking statistic for the specified issue.
-
Constructor Details
-
StatisticFieldHelper
public StatisticFieldHelper()
-
-
Method Details
-
getEstimateStatisticFieldId
public String getEstimateStatisticFieldId(StatisticsField estimateStatistic, com.atlassian.jira.issue.Issue issue) Get the field ID of the estimate statistic for the specified issue. This is used when building up a representation of a single issue for the Details View, so that the UI can know whichFieldEntry
represents the estimate statistic.- Parameters:
estimateStatistic
- the estimate statistic for the boardissue
- the issue- Returns:
- the ID of the field; null if the
StatisticsField
is invalid, not enabled or not applicable.
-
getTrackingStatisticFieldId
public String getTrackingStatisticFieldId(StatisticsField trackingStatistic, com.atlassian.jira.issue.Issue issue) Get the field ID of the tracking statistic for the specified issue. This is used when building up a representation of a single issue for the Details View, so that the UI can know whichFieldEntry
represents the tracking statistic.- Parameters:
trackingStatistic
- the tracking statistic of the boardissue
- the issue- Returns:
- the ID of the field; null if the
StatisticsField
is invalid, not enabled or not applicable.
-
createEstimateStatistic
public RapidIssueEntry.StatisticFieldValue createEstimateStatistic(com.atlassian.jira.issue.Issue issue, IssueStatisticValueResolver issueStatisticValueResolver) Creates a representation of aRapidIssueEntry.StatisticFieldValue
for the given issue andIssueStatisticValueResolver
.- Parameters:
issue
- the issueissueStatisticValueResolver
- the resolver for retrieving the value of theStatisticsField
of interest from the issue- Returns:
- the entry representation; null if the
StatisticsField
is invalid, not enabled or not applicable. - See Also:
-
createCurrentEstimateStatistic
public RapidIssueEntry.StatisticFieldValue createCurrentEstimateStatistic(com.atlassian.jira.issue.Issue issue, HistoricalEstimateStatisticValueResolver issueStatisticValueResolver) Creates a current estimation of aRapidIssueEntry.StatisticFieldValue
for the given issue andIssueStatisticValueResolver
.- Parameters:
issue
- the issueissueStatisticValueResolver
- the resolver for retrieving the value of theStatisticsField
of interest from the issue- Returns:
- a current estimation; null if the
StatisticsField
is invalid, not enabled or not applicable. - See Also:
-
createEstimateStatistic
public RapidIssueEntry.StatisticFieldValue createEstimateStatistic(Long projectId, String issueTypeId, String documentValue, DocumentStatisticValueResolver documentStatisticValueResolver) Creates a representation of aRapidIssueEntry.StatisticFieldValue
for the given document value andDocumentStatisticValueResolver
.- Parameters:
projectId
- the ID of the project that the document belongs toissueTypeId
- the ID of the issue type of the documentdocumentValue
- the value that we are expecting to resolve to a statistic value from the documentdocumentStatisticValueResolver
- the resolver for retrieving the value of theStatisticsField
of interest from the document value- Returns:
- the entry representation; null if the
StatisticsField
is invalid, not enabled or not applicable. - See Also:
-
createTrackingStatistic
public RapidIssueEntry.StatisticFieldValue createTrackingStatistic(Long projectId, String issueTypeId, String documentValue, DocumentStatisticValueResolver documentStatisticValueResolver) Creates a representation of aRapidIssueEntry.StatisticFieldValue
for the given document value andDocumentStatisticValueResolver
.- Parameters:
projectId
- the ID of the project that the document belongs toissueTypeId
- the ID of the issue type of the documentdocumentValue
- the value that we are expecting to resolve to a statistic value from the documentdocumentStatisticValueResolver
- the resolver for retrieving the value of theStatisticsField
of interest from the document value- Returns:
- the entry representation; null if the
StatisticsField
is invalid, not enabled or not applicable. - See Also:
-
createTrackingStatisticValue
public RapidIssueEntry.StatisticFieldValue createTrackingStatisticValue(DocumentStatisticValueResolver documentStatisticValueResolver, Long projectId, String issueTypeId, Double value) Renders the tracking statistic for an already calculated value, such as aggregated statistic value (e.g. time tracking in plan mode) -
createTrackingStatistic
public RapidIssueEntry.StatisticFieldValue createTrackingStatistic(StatisticsField estimateStatistic, Long projectId, String issueTypeId, com.atlassian.greenhopper.web.rapid.issue.StatisticFieldHelper.EnclosedValueResolver enclosedValueResolver) -
createIssueCountEstimateStatistic
Shortcut for creating aRapidIssueEntry.StatisticFieldValue
when we know the configuredStatisticsField
is of typeStatisticsFieldConfig.Type.ISSUE_COUNT
.- Returns:
- the representation of the value of a statistic field when the configured statistic is issue count
-