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

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.

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