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 vote
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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

80 views 0 5
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