Brief summary of this article:
These custom formula metrics calculate planned dates for hierarchical entities.
Max Date value for a feature is calculated as max value across its nested user stories and bugs.
Max values are selected as max Planned End Dates [1].
Additionally, if you use Sprints / Releases / Team Iterations, you may set up custom calculations for user stories and bugs. Set calculated max date value for a user story and bug as max of its own Planned End Date and End Date of parent Sprint / Release / Team Iteration. [2]
Metrics for Features
Calculate Planned Date as max of planned dates of User Stories and Bugs.
Add 3 Date System custom fields to Feature entity.
Then configure 3 corresponding custom formula metrics.
[1] Use these formulas if you inherit dates from planned dates of work items only.
Field Name | Field Type | Custom Formula Metric |
US Max Date | Date, System | UserStories.MAX(PlannedEndDate) |
B Max Date | Date, System | Bugs.MAX(PlannedEndDate) |
Max Date | Date, System | [beta] IIF(BMaxDate = null or USMaxDate > BMaxDate, USMaxDate, BMaxDate)
IIF(CustomValues.Date("B Max Date") = null or CustomValues.Date("US Max Date") > CustomValues.Date("B Max Date"), CustomValues.Date("US Max Date"), CustomValues.Date("B Max Date")) |
[2] Use these formulas if you additionally inherit dates from Sprints / Releases / Team Iterations.
Field Name | Field Type | Custom Formula Metric |
US Max Date | Date, System | [beta] UserStories.MAX(MaxDate)
UserStories.MAX(CustomValues.Date("Max Date")) |
B Max Date | Date, System | [beta] Bugs.MAX(MaxDate)
Bugs.MAX(CustomValues.Date("Max Date")) |
Max Date | Date, System | [beta] IIF(BMaxDate = null or USMaxDate > BMaxDate, USMaxDate, BMaxDate)
IIF(CustomValues.Date("B Max Date") = null or CustomValues.Date("US Max Date") > CustomValues.Date("B Max Date"), CustomValues.Date("US Max Date"), CustomValues.Date("B Max Date")) |
Metrics for User Stories, Bugs
These metrics are required if you use Sprints, and you require to calculate custom Planned Date for User Stories and Bugs as max of own Planned End Date and Sprint End Date [2].
Add a Date System custom field to both User Story and Bug entity.
Then configure related custom formula metric for these two entity types.
This example works for TeamIteration entity. Use references to Iteration, Release objects instead of TeamIteration object when required.
Field Name | Field Type | Custom Formula Metric |
Max Date | Date, System | IIF(TeamIteration != null and (PlannedEndDate = null or TeamIteration.EndDate > PlannedEndDate), TeamIteration.EndDate, PlannedEndDate) |
Additional Notes
Coming soon! In one of the next Targetprocess releases (v3.12.10+) it will be possible to refer to custom field vales by short alias labels. It won't be longer required to specify CustomValues.Type references. Remove spaces from field label to use it in custom formulas.
Math.MAX(a, b) method is not supported yet in custom formulas in Targetprocess. This is why IIF-based formulas are used instead.
Blank value cases must be checked and handled properly.
Still have a question?
We're here to help! Just contact our friendly support team.