Forums

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

Set customfield depending on value of another customfield

Jesper Fransson
Contributor
October 28, 2022

I have a custom field called Estimated Price, which has three options.

1. [0-5000 USD]
2. [5000-50000 USD]
3. [>50000 USD]

What I want is the following Approvers field to be populated with a certain user depending on what option you choose for the Estimated Price custom field.

Is this something that's doable with a script-listener? 

Best regards, 

Jesper

2 answers

1 accepted

1 vote
Answer accepted
Mark Segall
Community Champion
October 28, 2022

Hi @Jesper Fransson - I see you're on Jira Cloud.  You can accomplish this with native Jira Automation:

  • TRIGGER: Field Value Changed (Estimated Price)
  • IF CONDITION: 
    • Estimated Price
      Equals
      "[0-5000 USD]"
    • ACTION: Edit Issue (Approvers)
  • ELSE CONDITION: 
    • Estimated Price
      Equals
      " [5000-50000 USD]"
    • ACTION: Edit Issue (Approvers)
  • ELSE CONDITION: 
    • Estimated Price
      Equals
      "[>50000 USD]"
    • ACTION: Edit Issue (Approvers)
Jesper Fransson
Contributor
November 1, 2022

@Mark Segall Will this trigger when you're filling out the form? 

That's the end goal.

Mark Segall
Community Champion
November 1, 2022

You can change the trigger in my example to Issue Created to have it execute when the form is submitted.

Jesper Fransson
Contributor
November 1, 2022

You can't have it trigger in real time on the issue event of a custom field changing value?
Like a listener. 

Mark Segall
Community Champion
November 1, 2022

Not natively, and I don't believe scriptrunner listeners work in Jira Cloud if this is the desired end goal. What is the use case for having it trigger immediately while the form is still in progress?  Is the expectation that these fields get pre-populated with a default value, but the user has the ability to override?  If that's the case, I'm not sure this is possible.

Jesper Fransson
Contributor
November 1, 2022

I'll have to take that up with the scriptrunner support I reckon. 

The use case is that you shouldn't be able to remove or forget the user who needs to approve the issue, but you should be able to add more approvers in addition. 

Mark Segall
Community Champion
November 1, 2022

In that case, you could allow the user to select whatever approvers and then append that list with the desired defaults via automation after the issue has been created.

Jesper Fransson
Contributor
November 2, 2022

That list would be too long, hundreds of possibilities. But thanks for your help! 

Like Mark Segall likes this
0 votes
Jesper Fransson
Contributor
November 1, 2022

Will this trigger when you're filling out the form? 

That's the end goal.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events