How do i retrieve the second element of the multiple assignees field?

Jar Lady April 4, 2024

Hi i have a multiple user assignees field which can consist as multiple assignees e.g. user1, user2, user3, user4

How do i retrieve each element from the assignee field? I try to split and get but failed :( help pls. 

1 answer

1 accepted

0 votes
Answer accepted
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2024

Hello @Jar Lady 

Are your trying to do this in Automation?  If so, can you tell what are you trying to do?

In DC edition, if 

{{issue.Additional Assignees}} gives me list of assignees,

I can get the size using and {{issue.Additional Assignees.size}} and,

I can access each an item using index like {{issue.Additional Assignees.get(0)}}, or

I can iterate the list using {{#issue.Additional Assignees}}{{name}}{{/}}, and

I can extract a value using lookup like below:

{{#issue.Additional Assignees}}{{#if(equals(name,"U657451"))}}{{displayName}}{{/}}{{/}}

If its Automation rule, maybe share what you are trying to do so community can pitch in.

Hope it helps.

Jar Lady April 4, 2024

I just need to retrieve each assignee. But accessing each item using {{issue.Additional Assignees.get(0)}} doesn't work. I'm using 8.20.10 Jira software.

Jar Lady April 4, 2024

does {{issue.Additional Assignees.get(0)}} work on custom field (configuring to use multi-user picker) and in jira 8.20.10?

Jar Lady April 5, 2024

oh sorry {{issue.Additional Assignees.get(0)}} works! some typo on my end. thank you so much!

Like Kalyan Sattaluri likes this
Jar Lady April 7, 2024

Sry 1 more question, how do I access displayName for each element? is it {{issue.Additional Assignees.get(0).displayName}}?

Kalyan Sattaluri April 7, 2024

Yes, that should work 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
This widget could not be displayed.
TAGS
AUG Leaders

Atlassian Community Events