Hi All!
I am trying to write an automation where a Start Date in JPD is copied over to the JIRA Start Date field when the Delivery ticket is spun up. I have followed along THIS link which talks about string processing but have been unable to successfully get the date set on my JIRA ticket from JPD. PRD Start Date is coming from JPD and is cf107178. I did make sure that his automation was a global automation since it spans two projects.
When the rule runs, I receive a "Success" Message in my audit log, but nothing is actually in the PRD Start Date (JIRA) field in my JIRA project.
First, I recommend writing that smart value expression to the audit log, using the Log action. That will help diagnose rules like this.
Next, your rule is trying to update an issue in a different project, and I hypothesize your rule has a single-project scope in the details at the top of the rule.
The scope must be multiple-project or global to make the edit. (I recommend multiple-project to limit / narrow the scope for rules like this). Please work with your Jira Site Admin as they will need to help change the rule scope in the global rule settings.
Kind regards,
Bill
Hey @Bill Sheboy ! Thanks for the quick response and pointing out a piece of information I should have added to the main ticket. I did make sure that this automation was a global automation. I will add that to the description.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that info, @Betany Riley
Would you please post the complete smart value expression used to update that date field?
Also, is the PRD Start Date (JIRA) field a date-picker field type, configured in the global (i.e., company managed) settings?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy !
SmartValue Expression: {{destinationIssue.customfield_10718.substringBetween("\"start\":\"","\",\"end\"")}}
PRD Start Date (JIRA) field is indeed a date-picker field.
I did add a "Log" to the automation, and the log was empty. So that tells me the automation isn't picking up the value from JPD (cf_10718)
I also added myself as the actor on the automation in case there was a permset issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, the smart value {{destinationIssue}} only applies with the link-related triggers: https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Issue-linked
You appear to be getting the date from the trigger issue, correct? If so, please change to this:
{{triggerIssue.customfield_10718.substringBetween("\"start\":\"","\",\"end\"")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OH MY GOODNESS!!!! That was IT! Thank you so much for walking me through this! I never thought about using trigger issue as I was in the "linked Issue" branch! Thanks Again @Bill Sheboy !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI...
The JPD dates are formatted as JSON, although they are recognized as text in rules. With the new function jsonStringToObject(), the dates may be more easily accessed with their attributes.
For example, this would access the "start" attribute:
{{jsonStringToObject(triggerIssue.customfield_10718).start}}
And if you needed a different date format, the text may be converted to a date then formatted as needed:
{{jsonStringToObject(triggerIssue.customfield_10718).start.toDate.jiraDate}}
Kind regards,
Bill
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.