I would like the due date of an issue to be automatically set to now() via a post function - ie, any issue created today are due today.
I believe that the way to do this is via the script runner Plugin and to run a Custom Script Post Function from the Create state but the scripts that I have found online do not work.
Can anyone help me with what script I would use to achieve this.
Community moderators have prevented the ability to post new answers.
Hi Frank,
There are some alternatives:
If you are sticking with ScriptRunner for JIRA, did you try the following?:
issue.setDueDate(new Timestamp((new Date()).time))
Adapted from: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/set-issue-attributes.html and also: https://answers.atlassian.com/questions/32996494
Hope this helps.
Sam
Awesome - thanks Sam!
I used the first option, tested and works perfectly,
thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there really no native way to do this? That's mental.
We have a cloud install, so most options here are not available, or require an add-on purchase which just feels a bit like taking a nuclear bomb to kill a mole in your back yard.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian!!! How can you have native ability to post function estimates and time spent, but NOT due date?!?!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a way for me to add automatic due dates to each tickets/story without doing some coding here? I am not a techie person and not familiar with coding. I am so basic, help me out here. Isnt supposed to be able to set automatic due dates
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.