Hi Community,
I'm trying to sync a "Planned Delivery Date" from a JPD field to a linked Jira Epic.
My Setup:
linkedIssue
(the Epic).customfield_XXXXX
) whose value, according to the API, is a JSON string (e.g., "{\\"start\\":\\"...",\\"end\\":\\"..."}"
).{{triggerIssue.customfield_XXXXX.jsonParse.end.jqlDate}}
(intended to parse the JSON string and extract the date).The Problem: The Automation Rule shows SUCCESS
in the Audit log, but the Debug Text field on the Epic remains empty. The JPD field is populated, IDs are confirmed, and the rule structure is set to linkedIssue
.
Question: Why isn't the Smart Value (with jsonParse
) resolving to a value, or why isn't it being written to the field? Any debugging ideas would be greatly appreciated!
First, there is no "jsonParse" function in automation rules. What is the source where you learned that function as it is incorrect? Some chat / bot perhaps?
There is a jsonStringToObject() function that will help parsing the JPD date format: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#jsonStringToObject--
For example, to get the end date please try this:
{{jsonStringToObject(triggerIssue.customfield_12345).end}}
That value will be text. When you need it as a Jira date format, add the toDate function:
{{jsonStringToObject(triggerIssue.customfield_12345).end.toDate}}
Next, what is your rule scope: single-project, multiple-project, or global? The default is single-project scope rules, and they cannot modify work items in other projects.
Finally, your rule shows no branching. How will it access the JPD date field in the Idea to update the Epic's field?
Kind regards,
Bill
Hey @Bill Sheboy ,
thank you. I changed the setup:
To answer your previous question. Yes, i used Gemini before i got here :)
Project Target field (JPD) is not empty. It has a single date or a date from/to (mostly quartery)
Date format month June:
Time frame format Q2 April-June:
it is always the same "string" in postman.
Goal:
Transfer/sync this date to the linked epics/initiatives.
With my current setup, no actions were performed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please post an image of the audit log details for the rule execution, expanding all the areas at the right side. That may show why the rule did not update as expected.
Also, did you confirm the rule scope is multiple-project or global? Otherwise that branch will not "see" the linked issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your patience. I just linked an Epic to the idea. Nothings happens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At the right side of the log for those entries expand the details with the arrow > icon, and re-post the image.
That will show the issues involved and possibly indicate why this is happening. For example, if the trigger issue is not an Idea, then you may not be finding the correct ones inside of the branch...leading to the condition to not match.
Triggering a rule on Work Item Linked is tricky, because no matter to which issue the link is added, the "trigger issue" is always based upon the direction of the link type. Please see this great explanation from @Trudy Claspill on the topic:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems that rule is being triggered correctly. But the field is not mapped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just retested to confirm the behavior based on the link direction noted earlier:
When a "delivery" work item is linked to a JPD Idea, and the rule trigger is Work Item Linked...
This happens regardless of where the link was added: from the Idea or from the "delivery" one.
As your rule is written, it assumes the trigger is the Idea, which is reversed from what happens.
To update the "delivery" one with the data from the Idea's date field, please try this:
{{jsonStringToObject(destinationIssue.customfield_10393).end.toDate}}
In that first Smart Values Condition, I generically tested the trigger one for "not an Idea". You could change that to use the Field Values Condition to specifically test for your desired issue types (i.e., Epic or Initiative).
However, please note well: if you are using team-managed projects to link to Ideas, the types will vary by project. So perhaps use the type name to be certain of matches.
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.