Jira Automation: Looking to set due date based on start date value+7

Jonathan Smith
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.
November 8, 2022

Hello,

  I am looking to set my due date field in Jira automation so it takes the value in start date and adds 7 days. Mind helping me out?

Here is what I tried (which didn't work obviously):

a.jpg

Thanks for your time.

2 answers

1 accepted

2 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2022

Hi Jonathan,

Can you share the entire rule?  

Are you updating the Due Date based on the Start Date in the same issue? Or from a Trigger issue? Because what you have should work in the same issue. Otherwise you should use 

{{triggerissue.startDate.plusDays(7)}}

Jonathan Smith
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.
November 8, 2022

Same issue. Parent's due date should be based on the parent's start date+7.

I am planning to remove due date from the create screen, but want it filled out and available in view/edit.

Jonathan Smith
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.
November 8, 2022

b.jpg

Trigger did not work. 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2022

So you would not use triggerissue in this case because it is the same issue. 

And if you just use issue.startDate then it does not work either? 

I would suggest using the ID of the custom field then. The syntax would look like:

{{issue.customfield_10779.plusDays(7)}}  where 10779 in this example is the value of the Start Date field. To find that, go to Settings > Issues > Custom Fields.

Search for the field. Then click the 3 dots menu on the right hand side and select Contexts and Default Value. Then look at the URL to find the ID. 

Jonathan Smith
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.
November 8, 2022

BINGO - {{issue.customfield_10015.plusDays(7)}} worked.

Thanks for your assistance!

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2022

Awesome!

0 votes
Tim Perrault
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.
November 8, 2022

Hi @Jonathan Smith 

 

What is the trigger?

 

Tim

Tim Perrault
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.
November 8, 2022

Try this

 

{{triggerIssue.startDate.plusDays(7)}}

Jonathan Smith
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.
November 8, 2022

Hi @Tim Perrault , 

  See above.

Thanks!

Tim Perrault
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.
November 8, 2022

{{sprint.startDate.plusDays(7)}}

Jonathan Smith
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.
November 8, 2022

Start date wouldn't always be "now", it could be a future date. The code supplied would be due date = now +7, which doesn't work for my requirements.

Suggest an answer

Log in or Sign up to answer