I've been following using a previous answer; https://community.atlassian.com/forums/Jira-Product-Discovery-questions/Automation-creation-for-quot-Project-Start-Target-quot-custom/qaq-p/2750068
To try and automate a message around one of our JPD boards but the automation doesn't trigger.
I used this for the smart variable
{{issue.customfield_15835.substringBetween("\"start\":\"","\",\"end\"")}}The rule triggers and shows success but it isn't picking it up.
Hi @Alec Dewell
The Jira Product Discovery (JPD) date format is a JSON expression stored as text from a rule's perspective, and it is able to store a single date, a range of dates, or a quarter.
When a rule needs to access the value, please use the jsonStringToObject() function and extract the field you want. For example, to get the start date from the field as text:
{{jsonStringToObject(issue.customfield_15835).start}}
When you also want to use other date functions on that result, convert with toDate:
{{jsonStringToObject(issue.customfield_15835).start.toDate}}
And FYI: the JPD team's roadmap shows them planning to work on improvements for using this type of date field with automation rules. To learn more, please look here.
Kind regards,
Bill
Hi Bill,
Thanks for the help, I used the second option to calculate the date but got an error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alec Dewell
Your Smart Values Condition is comparing to a text value for the date, so you could either drop the toDate conversion or add .jiraDate at the end to force the formats to match.
And, let's add some diagnostics to help:
This will confirm your field matches the type / value we think it is...and, if the field can be empty, we need to add more handling for that. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Keen to know any other ways to achieve an email trigger from a custom date field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.