Forums

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

JIRA Automation based upon the variable value of Ecosystem

Arvind
Contributor
July 26, 2025

Hello All,

I have JIRA custom field (Ecosystem) where values are available in Dropdown menu. Which needs to be updated according to Ecosystem values present in JIRA description field. I,e If description field having Ecosystem: Google. The Custom field should have updated as "Google". 

I am using below steps to get this update. However its not working:

1. Variable Name: Ecosystem

2. Smart Value:{{issue.description.match("Ecosystem:\\s*([^\\n]+)").toString().trim()}}

 

3 answers

0 votes
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.
July 26, 2025

Hi @Arvind 

First thing: What is the source of your created work items?  Having a person (or system) provide the Ecosystem directly in the field may be less error-prone than trying to parse it.

But if you still need to parse, what is an example of a complete Description you expect?  It appears you expect the Ecosystem indicator to perhaps be on the same line or lines below the "field label".

 

Next, the Work Item Created trigger has a known racetrack timing problem which can start the rule before all data is available.  This could cause your condition and field parsing to not work as expected.  The workaround for this is to always add the Re-fetch Work Item Data action immediately after that trigger.  This will slow the rule slightly, reloading the data before the steps proceed.

 

Next, back to the syntax you show for the parsing...

  • There is no toString() function for automation smart values.  There is a text function to remove some markup syntax.
  • The Description field is already text (although it can have markup) and so no conversion to text is likely needed at the end of the expression
  • Finally, the match function documentation states (with emphasis added by me) the "underlying implementation is based on Java's Pattern class".  But nowhere does it describe exactly what is or is not supported.  There are several community articles showing differences with the Java spec.  And so...
    • I recommend using the simplest regex expression that will meet your needs, testing that, and then adding edge-cases, etc. to it
    • The match function can have trouble with both newlines and double-slashes to add tokens.  Use experimentation to confirm what does / does not work, or remove / replace all newlines before parsing, such as with:
      • {{issue.description.replace("\n", "").match(...
      • Or better still, split on newlines to reduce the scope the match needs to check with {{issue.description.split("\n").match(...  This approach depends upon what you actually expect in the Description.
    • Or, using the other text functions such as substringBetween() to parse

 

Kind regards,
Bill

0 votes
Gor Greyan
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.
July 26, 2025

Hi @Arvind

Thanks for the question.

Why do you not doing it via a simple condition for description?

conditi.pnggoogle.pngAm I right that,for example, Google value is available in the Ecosystem field. If yes, you can try the following, via If/Else blocks.



0 votes
Arvind
Contributor
July 26, 2025

JIRA Automation.jpg

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events