How to auto set duedate by priority when create a issue

I want to achieve this function, when create a bug, the duedate will be auto set.
If priority = S, duedate will be set to this day +3 days

If priority = A, duedate will be set to this day +5 days

If priority = B, duedate will be set to this day +8 days

If priority = C, duedate will be set to this day +10 days

How to do this?

Thanks very much!

2 answers

1 vote

You'll need a bit of code to do this.  I'd write a post-function (using the Script Runner) to set the date after the user posts the creation.

An alternative to programming is to use an Update issues post function for each of the cases and condition the post function by using %original_priority% equaling the value. For the due date field, use a specific value of %now% and add the + days in the Due date offset in days field. You may need to be careful with date format,  Substitution variables has more on that.

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 yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

34 views 0 4
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