Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,704
Community Members
 
Community Events
168
Community Groups

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

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

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

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?

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

An unofficial way to monitor a JSM mail handler for errors

...eturns true if any content is returned for the webResponse.body.data.first s...

718 views 3 20
Read article

Atlassian Community Events