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:Ā 

Fetch the value from description into custom field

Archana Mattoo
May 30, 2023

I have a field name Account name and I want to fetch the value for it from the "Account Name" in the ticket description (example below) into the custom field.

Example ticket description:

Entity Type: VirtualMachine
Status: Failed
Policy Name: creationrule
Rule Description: Install security for all virtual machines.
Severity: High
Account Name: mmc-pdg-dmc-ra

 

I used below logic to edit field but it is throwing error:

{{issue.description.split("\n").match"Account name: (.*)").last}}

 

 

Output expectation:

Account name mmc-pdg-dmc-ra

 

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Aron Gombas _Midori_
Community Champion
May 30, 2023

Your approach is correct.

Was it working before? What is the error now?

Archana Mattoo
May 30, 2023

No i added it today. 

 

Getting following error:

Error rendering smart-values when executing this rule:

Failed to get value for issue.description.split("\n").match"Account name: (.*)").last: {{issue.description.split("\n").match"Account name: (.*)").last}}

Aron Gombas _Midori_
Community Champion
May 30, 2023

There is at least one syntax error in your expression.

Correctly it should be:

{{issue.description.split("\n").match("Account name: (.*)").last}}

I added a missing opening parentheses in front of the "Account name..." string!

Like • Archana Mattoo likes this
Archana Mattoo
May 30, 2023

Thanks a lot Aron.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events