Forums

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

Reference Fields Using Variable in Automation for Jira

Haddon Fisher
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.
August 21, 2025

To support our quarterly planning process, our "roadmap item" issues have two sets of custom fields for each development team: one to hold their involvement in that roadmap item ([Team Name] Delivery Commitment), and the other to hold the size of that involvement ([Team Name] SWAGfest Estimate).

I have several automation rules which set one or the other field...for example:

  • If a team is identified as the owner or a dependency for that roadmap item, that team's "involvement" field is set to "Estimate Needed".
  • When a team provides an estimate, their "involvement" field is set to "Decision Pending".

This involves moving "between" the fields, and to avoid needing to maintain a lookup table per-rule, I am using regex string manipulation. This is hard to screenshot, but I've attached an example of how I am dropping\adding the right strings to create the name of the field I want to set, and then how I am making another variable called "JSON" which I then invoke in the third screenshot.

I've hit some edge cases that require me to look up the value of one field for a check before doing some action on the other. For example, if someone sets their "estimate" field to empty, I'd like to see if their commitment is set to "Tracking Only" or "Not Accepted" and if not, ask the team to review and re-set their commitment (i.e. you can't accept a roadmap item if you don't know how much effort it'll take).

My question is this:

Is there a way for me to tell Automation "this smart value or variable I am feeding you is not a string, it's a field reference"?

I.e. (and in super hacky mustache-ese) something like:

{{issue.{{variable containing field name}}.value))?

So I can go check the value of the other field? I suspect I could look it up using an API call, but that seems like total overkill.

 

 

Screenshot 2025-08-21 at 12.27.50 PM.png

Fig 1: Using Regex to get the new field name from the old.

 

Screenshot 2025-08-21 at 12.29.34 PM.png

Fig 2: Using the field name variable as part of a JSON update statement.

 

Screenshot 2025-08-21 at 12.29.43 PM.png

Fig 3: Invoking the JSON update statement to update the issue.

 

0 answers

Suggest an answer

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

Atlassian Community Events