Get current (last) assignee of issue

Hello,
I am creating a report where I need to display in a measure the current/ last assignee of an issue.

I am using the formula below, but when I select the label as a filter in the dimension, the measure returns me the first transferee that were already part of the issue and I need the last one.

CASE WHEN
[Measures].[Issues created]>0
THEN
"Label: <span style='color:#30BBBE'>" || [Label].[Label].GetMemberByKey(
Filter(
Descendants([Label].CurrentHierarchyMember,[Label].[Label]),
[Measures].[Issues created]>0
).item(0).Key
).Name
|| '</span><br>' || 
CASE WHEN
[Measures].[Issues created]>0
THEN
"TPMO: <span style='color:#30BBBE; font-size:20px'>" || [Assignee].[User].getMemberbyKey(
Filter(
Descendants([Assignee].CurrentMember, [Assignee].[User]),
[Measures].[Issues created]>0
).item(0).Key
).Name
|| '</span><br>' 
|| "<span style='color:blue; font-size:15px'> [*see more details in confluence post*](https://docktech.atlassian.net/wiki/spaces/TPMO/pages/24248443/TPMO+Team)</span><br>"
END
END

Hello @Patricia,

Welcome to the eazyBI community.

The current expression goes through the Label and Assignee dimensions and looks for the assignees and labels of the issues within the Issues hierarchy.
Since the dimensions are sorted alphabetically by default - the returned filtered assignee and label sets are also sorted alphabetically. Therefore, item(0) will always return the alphabetically first label or assignee for the descendant issues within the current issue hierarchy.

If you are looking for the latest/current assignee and label of the current displayed issue - you might use the relevant issue properties from the Measures dimension.
Since “Label” is usually a multi-value field - the issue property might hold all current values.

The current/last Assignee of an issue is imported as an issue property “Issue assignee”.
You might read more about the core Issue properties here - Jira core properties.

The simple version to show the current labels and assignee of the displayed issue within the standard Issue hierarchy might look like this.

CASE WHEN
 [Measures].[Issues created]>0
THEN
 "Label: <span style='color:#30BBBE'>" || [Measures].[Issue labels]
 || '</span><br>' ||
 "TPMO: <span style='color:#30BBBE; font-size:20px'>" || [Measures].[Issue assignee]
 || '</span><br>' 
 || "<span style='color:blue; font-size:15px'> [*see more details in confluence post*] (https://docktech.atlassian.net/wiki/spaces/TPMO/pages/24248443/TPMO+Team)</span><br>"
END

However, please get in touch with support directly with more details if you do not use the Issue dimension in report rows or have specific rules to determine the last assignee or the label for the issue.
You might as well provide the report definition to allow understanding of the expected report context.

Regards,
Oskars / support@eazyBI.com

1 Like