Hello all!
I am trying to write automation that copies a field from Jira Product Discovery to a Jira Software Project. It is not a 1:1 copy however due to the Jira product Discovery field being a 'Select' field and the Jira Software project being a 'Cascading' Field.
In my specific example, I am trying to copy the value from field "Product-Feature Pair" in Product Discovery to "Product-Feature Pair" in Jira software project. It is not as simple as copying from the destination issue as it is not a 1:1 translation into the Jira software project field of the same name (See screenshots).
Would anyone know what I may be missing in the "Edit Issue Fields" Section that may allow me to copy the correct value into the Jira software project field?
Thanks!!
First thing, for your scenario you are using data from an issue in one project to edit an issue in another project. And so your rule will need to have multiple-project or global scope. Please work with your Jira Site Admin to make that setting change for the rules.
Next, as the fields are different types you will need to use a JSON expression to edit the field: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Cascading-select-custom-field
Let's assume your source field in the JPD Idea contains values like this for the "Product-Feature Pair", where there is some delimiter between the values:
And so the rule will need to split the value into the "product" and "feature", using text functions such as split() or substringBefore(), and use those in the JSON expression.
Finally, when do you want these values synchronized between the issues? There are several possible cases when the issues could be connected, and knowing that will help you to create the necessary rules. For example:
Kind regards,
Bill
Thanks Bill! I understand about the triggers of when this automation should take place. As well as the global permissions for this kind of rule. For now I was focusing on the actual copying of the one field from JPD to the cascading field which I will try with the JSON expressions and get back with results. Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to help, and...if you run into challenges creating the expression, please post what you used so the community can help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Had to come back to this. I thought maybe If I mapped the Select List field in Product Discovery is named "Product-Feature Pair", with the values being simple options like Option 1
, Option 2
, Option 3
, that it might work. Splitting the string might be a little complicated since the text is variable between the 'Parent' and 'Child' values of the cascading field.
This JSON did not seem to work with me trying to manually map each value in the JSON. Is there a part to the Automation or JSON I may be missing?
Thanks again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, I notice the edit issue action has the Product-Feature Pair field selected from the dropdown (clearing it) and trying to update it with the JSON. I recommend removing it from the selected field list and only using the JSON.
Next, your JSON syntax to set the fields is incorrect. That link I provided has more information at the top about the entire structure for setting a field.
For example, with a made up custom field id:
{
"fields": {
"customfield_12345" : {
"value": "{{triggerIssue.customfield_12345.value}}",
"child": {
"value" : "{{triggerIssue.customfield_12345.child.value}}"
}
}
}
}
To find the correct custom field id for your Product-Feature Pair field, please use this how-to article:
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Finally, I used the {{triggerIssue}} in my example. Please use the relevant one for your needs.
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.