Looking for help on a Script to update due date in JSD using Scriptrunner

I am looking to set due date automatically based on the issue type. I see there is an option for date and time, would that work?

 

1 answer

0 votes
Gaston Valente Community Champion Jan 09, 2018

Ankit,

Are you using cloud or server?

I am using server. it is for service desk 

Gaston Valente Community Champion Jan 09, 2018

You can add a script post function or listener, here you can find some code samples:

To modify the dueDate you need to call:

issue.setDueDate();

To check for a issue type:

issue.getIssueTypeObject().getName() == 'ISSUETYPENAME'

 

https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/set-issue-attributes.html#_setting_checkbox_fields

Hi @Gaston Valente

Just wanted to confirm that this is the system field I am trying to modify. 

I am not very well versed with goovy / programming , could you possible share an example of the script please? 

 

Thanks

Ankit

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

277 views 0 12
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot