Hi guys,
When a Story gets created with a custom date (for example, we call it "Delivery Date"), its child (Subtask) need to have Due Date which is Delivery Date minus 25 days.
For example, when a Story gets created with Delivery Date (12/31/23), then its subtask should have Due Date (12/6/23).
This is briefly what my automation looks like:
And in Subtask, I am trying to use this:
But when the subtask gets automatically created, its due date does not show at all.
Am I getting a wrong formula for that?
How can I get the due date which is supposed to be Delivery Date - 25 days?
Hi @Caleb Park
I recommend first confirming the smart value for your field, Delivery Date.
Smart values are name, spacing, and case-sensitive. And they often do not match the displayed field name on the Jira pages. When an incorrect smart value is used, it will evaluate to null, and often fail silently with no errors in the log.
To confirm the smart value for your field, please use this how-to article: https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html
Kind regards,
Bill
Hi @Bill Sheboy
I noticed that there are two Delivery Dates in our field list, and it probably causes this issue.
So I am trying to use a smart value: {{triggerIssue.customfield_16173.value.minusDays(25)}}
But it is not still working.
If the custom field # is 16173, can you provide a clear solution to make it work using the specific custom field #?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The value attribute is only needed if your custom field is a selection type, like a dropdown list. What is the type of your custom field: text, date, date / time, etc.?
If your field is a date or date / time type, please try this first:
{{triggerIssue.customfield_16173.minusDays(25)}}
If that does not work, use this one:
{{triggerIssue.customfield_16173.toDate.minusDays(25)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy
{{triggerIssue.customfield_16173.minusDays(25)}} works!!
Thank you so much for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Caleb Park
In Jira Server/DC you first need to configure the sub-task due date. There are a couple of posts on how to do it:
Is there a way to display due date in subtask section?
Can you check if:
- Use the find my field and check if the Due date is visible
- Check if the Due date has been added to the proper screen
If the automation is correct, it will work.
Regards
Aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aaron Pavez _ServiceRocket_
Thank you for brining the idea up, but the Due Date is a custom field, not a system field, and the Due Date itself works fine.
Only problem is about the Smart Value formula.
I tried using
{{triggerIssue.Delivery Date.minusDays(25)}}
and
{{triggerIssue.customfield_16173.value.minusDays(25)}}
But still no luck.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Caleb Park
It seems the issue is the smart value. Try this one
{{triggerIssue.customfield_NUMBER.minusDays(25)}}.
If that doesn't work, check which Start date(there are several) you could be using and get the custom field number ID.
In my test, I used the same Due Date from the Story
{{triggerIssue.duedate.minusDays(7)}}
and it worked.
Make sure to use a DATE field instead of DATETIME.
Regards
Aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Aaron, thank you so much for the solution!
{{triggerIssue.customfield_NUMBER.minusDays(25)}} works!
I appreciate your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.