Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to set a field value based on other custom field value?

Diogo Rodrigues August 9, 2021

the scenario is to build a request type matrix to decide who are approvers based on site location.

 

I have my request type let's say adobe.

then a select field where user specifies his location.

then I've 2 hiden custom fields with value in that request type:

  1. approvers for europe
  2. approvers for US

then I've created an automation

  • when ticket is created or updated
  • if location is europe
  • then update "Approvers" with "approvers fo europe" value

I'm not being able to perform the update. it always fail.

I'm newbie configuring Jira so you might have a better way to achieve the same goal.

The idea is to have a generic process so it can be applied to several request types without having to multiply the number os automations.

1 answer

1 accepted

0 votes
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2021

Hello @Diogo Rodrigues ,

Thanks for reaching out and playing around with this, the following settings look to do the trick. 

First I created 3 fields to line up with your use case:

  1. "Location"
    1. Select list Single choice
    2. Option 1: US
    3. Option 2: Europe
  2. "Approvers for Europe"
    1. User Picker (multiple users)
    2. Set default value to "test user 1"
  3. "Approvers for US"
    1. User Picker (multiple users)
    2. Set default value to "test user 2"

Next, for the Automation rule, I set it up as follows and everything looks like it is working great in my test project:

  • When: Value changes for:
    • Location
  • IF: Matches
    • Location equals US
    • THEN: Edit issues Fields
      • Advanced:
        • More options: Additional rules 
        • {
          "update" : {
          "Approvers" : [{"set": []}]
          }
          }
        • NOTE:  This will clear any preexisting value from the Approvers field in case the location field is updated requiring the following re-fetch action
    • AND: Re-Fetch Issue data
    • And: Edit issue fields
      • Choose Field to set:
        •  Approvers
      • Approvers: Add Approver for US from Current Issue
        • Issues to copy value from
          • Current Issue
        • Field to Copy value From
          • Approvers for US
  • Else-if: Matches
    • Location equals Europe
    • THEN: Edit issues Fields
      • Advanced:
        • More options: Additional rules 
        • {
          "update" : {
          "Approvers" : [{"set": []}]
          }
          }
        • NOTE:  This will clear any preexisting value from the Approvers field in case the location field is updated requiring the following re-fetch action
    • AND: Re-Fetch Issue data
    • And: Edit issue fields
      • Choose Field to set:
        •  Approvers
      • Approvers: Add Approver for Europe from Current Issue
        • Issues to copy value from
          • Current Issue
        • Field to Copy value From
          • Approvers for Europe

Screen Shot 2021-08-11 at 4.46.33 PM.png   Screen Shot 2021-08-11 at 4.44.44 PM.png

 

Please give this a try and let me know how it goes or if you are running into any issues in the configuration.

Regards,
Earl

Diogo Rodrigues August 12, 2021

Hello, @Earl McCutcheon 

 

indeed what I've requested works many thanks for that.

However it still doesn't fit my needs.
My Matrix is more complex than initially mentioned.

example:

  • request type - Adobe
  • conditional fields
    • subcategories
      • photoshop
      • acrobat writer
      • after efects
    • Site
      • US
      • Europe
      • Asia
    • Envirnoment
      • Production
      • Developement
      • Quality

 

Based on these fields I have different different approvers and resolutions groups

This is Adobe example, but I've dozens of others.

How can I do this without having to multiply the number of request types or custom fields?

Is there any way to have some sort of decision table?

Kevin Ultsh August 29, 2022

Did you ever figure out a solution to this? I'm in a similar situation now. 

Diogo Rodrigues January 13, 2023

not exactly. I'm testing an app stagil assets that seems to help, but still on going

Leif Van Art February 10, 2023

The only solution I am aware of is to create a decision table commonly referred to as  a lookup table somewhere and use the webhooks functionality to query it. To the best of my albeit limited knowledge, this somewhere is not going to be Jira and if you locate a way to do that easily within Jira please share. Instead it could be something like Google Sheets and if you aren't familiar with working with API's, you may be able to leverage something like n8n(free and opensource and not terrible) / Zapier / Workato / PowerAutomate / OktaWorkflows to make this easier. n8n can actually be the source of the lookup table as well. If you are experienced or willing to gain the experience, use either SharePoint or Google Sheets to store the lookup table and their respective APIs to get that data using the webhooks functionality in your Jira automation. You can then take the returned data and parse if needed to smart value(s)/variables.

Kevin Ultsh February 13, 2023

This app looks useful for this type of request. 

https://akeles.jira.com/wiki/spaces/LOOKUP/overview

Like Diogo Rodrigues likes this
Leif Van Art March 29, 2023

Just noticed a new feature in Jira's automation:

2023-03-29 11_15_21-Access Management - Details - Service project - PaySimple Bug Tracker.png

Kevin Ultsh March 29, 2023

this is amazing! been waiting for this for years. 

Diogo Rodrigues March 30, 2023

it is good but very simple

Kevin Ultsh March 30, 2023

It's actually not showing up in my instance yet (cloud or server). I'm wondering if they are rolling this out slowly. 

Suggest an answer

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

Atlassian Community Events