Automate setting of Due Date based on assigned Fixed Version release date

Sarah Jackson May 6, 2022

I've created an automation rule - that when I add a FixVersion to a ticket then the due date should be updated to the same date as the release date on the fix version.

 

I've tested it and the automation fails saying that -

 

Error editing issues
SP-2499 (The duedate must be of the format "yyyy-MM-dd" (duedate))
So it seems the date coming from the fix version is in a different format to that  which is held in Due date. 
Can anyone suggest a way to fix this and make the automation rule work please?
Automation on setting due date based on fix version.pngerror when running automation.png

4 answers

1 accepted

4 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.
May 6, 2022

Hi Sarah,

Maybe add a format for the fix version date so that it is inline with the Due Date format:

{{issue.fixversion.releaseDate.format("dd/MM/yyyy")}}

Or whatever the Due Date format is. 

Sarah Jackson May 6, 2022

Hi - thank you for that I have just updated the rule and it now works and says the automation has happened but when I check the ticket that has been updated - the due date is still null and not set to the date of the release?

Sarah Jackson May 6, 2022

Automation on setting due date updated.png

This is the new rule

the audit  now shows as its been successful

success audit.png

but the ticket has no due date :-( 

https://share.getcloudapp.com/9ZumZGrg

Bill Sheboy
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.
May 6, 2022

Hi @Sarah Jackson 

Does your fixVersion have a value in releaseDate at the time the rule runs?

Does your fixVersion field have one or multiple values?  fixVersion is a list field and if you have multiple you may need to select the one you want for the source of releaseDate, such as: {{issue.fixVersions.releaseDate.max}}

Kind regards,
Bill

Like John Funk likes this
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.
May 6, 2022

Was just going to write that up and @Bill Sheboy beat me to it. Thanks, Bill!

Sarah Jackson May 9, 2022

All of my FixVersions have a release date and I generally only add one fixversion to each ticket, rarely multiple.

I have added .max to the rule and tested again. Once again the rule says the automation was successful but on the ticket the Due Date is still saying None.

Bill Sheboy
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.
May 9, 2022

Sarah, would you please post an image of your edit action details?  The image above seems to indicate you put in the format() information without the quotation marks that John suggested, and that could be the cause.

Sarah Jackson May 9, 2022

Thank you - you are correct I had omitted the " " and only put the brackets - thank you so much for your help - it working now :-) 

Like # people like this
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.
May 9, 2022

Fantastic! Thanks @Bill Sheboy for jumping in also!

Like # people like this
sushant_gupta July 19, 2023

I'm struggling with similar issue. Tried the solution here but Due date field wont update.

{{#=}}{{issue.customfield_10015.plusDays(14).format("yyyy-MM-dd")}}{{/}}

with quotes: get the error

Screenshot 2023-07-19 at 7.03.48 PM.png

without quotes audit completes but field does not update.

Screenshot 2023-07-19 at 7.01.52 PM.png

Like # people like this
sushant_gupta July 19, 2023

changed the smart value to: {{issue.customfield_10015.plusDays(14).format("yyyy-MM-dd")}}

this did the trick.

Like # people like this
0 votes
Alex Marvin November 17, 2023

I found that `.jiraDate` can be used instead of `.format ("yyyy-MM-dd")` to get a datetime converted to a correctly-formatted date used by Jira fields like "due date".

0 votes
Luis Eder Rivera May 10, 2023

Hello there! This has been helpful in my case, the smart values that I have entered and is working is {{issue.fixVersions.releaseDate.format ("yyyy-MM-dd")}}, I hope It helps. Thanks! 

0 votes
Sarah Jackson May 6, 2022

Hi - thank you for that I have just updated the rule and it now works and says the automation has happened but when I check the ticket that has been updated - the due date is still null and not set to the date of the release?

Suggest an answer

Log in or Sign up to answer