Pull First Name Last Name from Last Name, First Name

Mathew Lederman
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.
February 5, 2025

Can somebody help me with the automation smart value to create 2 variables for a user with a DisplayName of "Jones, Bob" where variable 1 is Bob's first name, and variable 2 is Bob's last name, "Jones"

 

Here's what I have so far 

{{issue.assignee.displayName.split(",").second}} - this returns no results

{{issue.assignee.displayName.split(",").first}} - this returns Jones

1 answer

1 accepted

0 votes
Answer accepted
Bharat Kalia
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.
February 5, 2025

Hey @Mathew Lederman - it seems to work like this - {{issue.assignee.displayName.split(" ").last}} || {{issue.assignee.displayName.split(" ").first}}

 

Please try and let me know.

Thanks,

Bharat Kalia
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.
February 5, 2025

you can store that in each variable. 

Mathew Lederman
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.
February 5, 2025

Ahhh, perfect thank you! I was racking my brain trying to figure out '2' or 'second' or two'... Never thought of 'last'.

Like Bharat Kalia likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events