Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using firstname of assignee instead of firstname and lastname

Martin Hechinger July 28, 2021

Hello,

I would like to use the first name in email notifications and try to remove the last name.

So if I use the smart value {{issue.assignee.displayName}} I receive the whole name, first and second name.

With {{issue.assignee.first.name.asJsonString}} a get nothing.

Is there any way to parse the string until the first space?

Thanks

1 answer

1 accepted

9 votes
Answer accepted
Martin Hechinger July 28, 2021

Just figured it out. It works fine with

{{issue.assignee.displayName.split(" ").first}}

roberto.mory April 4, 2022

Oh My God... Is command perfect

Like Jan Herzog likes this
Sebastián Gonzalez April 4, 2022

Es perfeeeecto!!!!

Like roberto.mory likes this
Martin Hechinger April 4, 2022

Yes, this really works. :-)

Like roberto.mory likes this
Martin Hechinger April 4, 2022

thanks for the replay

Cheers Martin

Like roberto.mory likes this
Jan Herzog August 3, 2022

I can also confirm that this works. Great, thank you, Martin! :)

However, in our case, since in our Active Directory the name ordering is reversed and separated by a comma (i.e. <last name>, <first name>), the adapted syntax to get only the first name is as follows:

{{issue.assignee.displayName.split(", ").last}}

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events