The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Automation: Take substring in summary

Soporte
September 20, 2023

We receive requests through an email, and it always has the same structure:

Summary = Voicemail message (666666666> 7768) From: 666666666

I am creating an automation to extract that phone number and check if it exists among our clients.

In the JQL, I have used: project = SOPLEX AND summary ~ '{{issue.summary}}'

to obtain a list with that phone number in {{lookupIssues}} and perform the initial check.

However, in the Logging Action, I am trying to display the phone number like this:

The customer's phone number is: {{lookupIssues.substringAfter("From:")}}

and I am not getting the result: The customer's phone number is:

Is this how the substring is obtained, or is there another way?

Thank you in advance.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Riley Sullivan
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 Champions.
September 25, 2023

Hello @Soporte 

 

Super close, and you were on the right track. For this scenario, you would not need to use lookup issue. You can just use the Jira smart value for the issue.

{{issue.summary.substringAfter("From: ")}}

The customer's phone number is: {{issue.summary.substringAfter("From: ")}}

 

Hope this helps!

Soporte
September 26, 2023

And can I tell you to be a maximum of characters? that is, from "From: " +9 characters

Thx 4 all

Note: 

putting it in lookupIssues, is to then take a list of previous calls and assign previous values to the new issue

Riley Sullivan
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 Champions.
September 26, 2023

This is possible:

{{issue.summary.substringAfter("From: ").left(9)}}

 

There are a few ways you can mix some of these logics together from this article.

Soporte
October 4, 2023

Perfect, thank you very much!

Like • Riley Sullivan likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events