During a transition can I automatically update Priority based on a date field?

Here is what I have been tasked with. At the point of transition in the workflow if the date is 90, 120, 150 days past due then automatically update the priority. Here is the criteria:

1. If install date is greater than 150 days from "today" than the issue Priority should be set to showstopper

2. If install date is greater than 120 days from "today" than the issue Priority should be set to critical
3. If install date is greater than 90 days from "today" than the issue Priority should be set to major
4. All other issues can be remain as minor.

I am wondering if this can be done as a part of the transition process in either the Post Functions or the Conditions section?

Thanks,

Mike

1 answer

1 accepted

1 vote

You'll need a bit of code to do that. (It absolutely should NOT be done in a Condition by the way, this is very very much for a post-function).

I'd recommend the script-runner add-on which provides a very easy and simple way to get the code into Jira,

Mmm, I'd look at the docs for the script-runner, it's got sample code which is better than anything I'd quickly hack together here.

Will do. thanks.

Nic, I have the script-runner add-on installed. But I am not a coder so if you would be kind enough to provide me with at least a few example lines of code that I can use to figure this out I would really appreciate it.

Mike

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

76 views 0 11
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you