Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Ankit Patel January 9, 2018

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

Suggest an answer

Log in or Sign up to answer
0 votes
Gaston Valente
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2018

Ankit,

Are you using cloud or server?

Ankit Patel January 9, 2018

I am using server. it is for service desk 

Gaston Valente
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 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

Ankit Patel January 12, 2018

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

TAGS
AUG Leaders

Atlassian Community Events