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
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 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...

112 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