Missed Team ’24? Catch up on announcements here.

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

Jira Smart value to extract first name from email address and then capitalise first letter

Sami Ullah May 8, 2024

We use automation to send reminder emails (ITIL 3 strike rule) to customer/ticket reporter. The email message starts with "Hi Firstname". Below code does that for us.

{{issue.reporter.emailAddress.substring(0,1).toUpperCase()}}{{issue.reporter.emailAddress.substring(1, issue.reporter.emailAddress.indexOf("."))}}

 

Cheers,
Sami

1 comment

Bill Sheboy
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.
May 8, 2024

Hi @Sami Ullah 

If your email addresses are in the format of firstName.lastName@domain then you could split on the period and take the first entry:

{{issue.reporter.emailAddress.split(".").get(0)}}

Please look here to learn more about those rule features:

Kind regards,
Bill

Sami Ullah May 8, 2024

Thanks @Bill Sheboy How do you capitalise first letter in this code?

Bill Sheboy
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.
May 9, 2024

You may use the capitalize() function, adding it to the end of the expression:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#capitalize--

Like Sami Ullah likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events