It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Choose/Add approvers based upon numeric field value

I have a request for a project that will require approvals and I am trying to decide the best way to implement a certain requirement.   Essentially the project will be for contract and purchase requests and the approvers will be determined by the dollar amount of the request.  Basically the larger the amount the approvals will need to go hire up.  I could and might use separate issue types for each but was wondering if the appovers could be set dynamically based upon the value of a numeric field.  I'm thinking potentially script runner could do this.

2 answers

0 votes

We have implemented a similar idea using JMWE conditions. We have 3 particular statuses/transitions in our workflow, each of which is conditionally used if a particular checkbox is checked. You may could do a similar thing based upon your value.

e.g. for one particular transition, you could have a condition like

return issue.get("The Numeric Field").value > 5000

so that if the field is > 5000, that transition is activated.

Hope that helps,

Hi Bill,

Script runner would almost certainly work. An alternative would be to use a calculated text field available with JIRA Suite Utilities plugin. It used to be free, but now looks like it's upgraded to paid for, but it does come with a lot of useful features.

Using HTML script you can use the calculated field to set a predetermined text value based on numeric , text or date values from other fields.  For example;

<!-- @@Formula: if (issue.get("customfield_[x]") == null) return null;
Integer i = Integer.parseInt(issue.get("customfield_[x]"));
if (i==null) return null;
if (i>=100 && i<=500) return "[name]";
if (i>=600 && i<=1200) return "[name]";
return "[name]";

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Desk

Tell us how you've implemented Change Management

Hello Community 👋, I'm a product manager at Atlassian, looking at improving change management capabilities across our products. In particular, we're looking at bridging the gap between Dev & ...

1,458 views 7 16
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you