Hi @Souki_Akhdim,
Although the fields in Jira use the same set of versions within the project, the custom field data coming to eazyBI only retains the version name.
Therefore, retrieving version properties the same way as for the user dimensions is impossible.
The expression needs to filter the versions of the relevant project to retrieve the one matching the planned version to retrieve the required properties.
It is also possible to assign multiple fix versions for the issue. Therefore, you might need a filter for the first or the last version. Sometimes, the versions might be assigned in a mixed order and the last one in the list might not be the one with the latest date.
I created an expression that checks if the issue has both Fix version and Planned version populated and then finds the Start date of the last fix version and compares that to the Start date of the Planned version.
The expression returns the following results.
“no planned version” - when the planned version is not selected
“early” - when the planned version date is less than the latest assigned fix version date
“match” - when versions have the same start date
“late” - when the planned version start date is later than the latest fix version date
Please see the expression below.
CASE
WHEN
IsEmpty([Issue].CurrentHierarchyMember.Get('Planned version'))
OR
[Issue].CurrentHierarchyMember.Get('Planned version') = "(none)"
THEN
--no planned version set
"no planned version"
WHEN
NOT IsEmpty([Issue].CurrentHierarchyMember.Get('Fix version IDs'))
AND
NOT
IsEmpty([Issue].CurrentHierarchyMember.Get('Planned version'))
AND
NOT
([Issue].CurrentHierarchyMember.Get('Planned version') = "(none)")
THEN
CASE WHEN
CACHE(
DateCompare(
--last assigned fix version start date
Tail(
Order(
--set of related fix versions
[Fix Version].[Version].GetMembersByKeys(
[Issue].CurrentHierarchyMember.Get('Fix version IDs')),
--value for order - fix version start date
DateToTimestamp([Fix Version].CurrentHierarchyMember.Get('Start date')),
--order direction
BASC),
--taking last one item in Tail and retrieving its property
1).Item(0).Get('Start date'),
--committed planned version start date
Filter(
DescendantsSet(
[Fix Version].[Project].GetMemberByKey(
[Issue].CurrentHierarchyMember.Get('Project key')),
[Fix Version].[Version]),
[Fix Version].CurrentHierarchyMember.Name = [Issue].CurrentHierarchyMember.Get('Planned version')
).Item(0).Get('Start date')
)) >0
THEN "early"
WHEN
DateCompare(
--last assigned fix version start date
Tail(
Order(
--set of related fix versions
[Fix Version].[Version].GetMembersByKeys(
[Issue].CurrentHierarchyMember.Get('Fix version IDs')),
--value for ordering - fix version start date
DateToTimestamp([Fix Version].CurrentHierarchyMember.Get('Start date')),
--order direction
BASC),
--taking last one item in Tail and retrieving its property
1).Item(0).Get('Start date'),
--planned version start date
Filter(
DescendantsSet(
[Fix Version].[Project].GetMemberByKey(
[Issue].CurrentHierarchyMember.Get('Project key')),
[Fix Version].[Version]),
[Fix Version].CurrentHierarchyMember.Name = [Issue].CurrentHierarchyMember.Get('Planned version')
).Item(0).Get('Start date')
) = 0
THEN "match"
WHEN
DateCompare(
--last assigned fix version start date
Tail(
Order(
--set of related fix versions
[Fix Version].[Version].GetMembersByKeys(
[Issue].CurrentHierarchyMember.Get('Fix version IDs')),
--value for order - fix version start date
DateToTimestamp([Fix Version].CurrentHierarchyMember.Get('Start date')),
--order direction
BASC),
--taking last one item in Tail and retrieving its property
1).Item(0).Get('Start date'),
--planned version start date
Filter(
DescendantsSet(
[Fix Version].[Project].GetMemberByKey(
[Issue].CurrentHierarchyMember.Get('Project key')),
[Fix Version].[Version]),
[Fix Version].CurrentHierarchyMember.Name = [Issue].CurrentHierarchyMember.Get('Planned version')
).Item(0).Get('Start date')
) <0
THEN "late"
END
END
You might then use conditional formatting for this measure to color the cells according to their value.
Please read more about conditional formatting here - Conditional cell formatting.
Regards,
Oskars / support@eazyBI.com