We've got a custom label field, "Fit /Gap Disposition", that is populated based off two other custom label fields, "Platform Fitness" & "Extensibility/Adaptability Fitness". The condition operator is "startsWith" because the values are like "5_90%_match" and "2_Customized to meet requirements"
I'm trying to create an automation for whenever either two calculation fields are updated and both are populated, then run this calculation to set the Fit/Gap field. Below is screen shot and JSON for the rule as it currently is. I'm getting the error:
No fields or field values to edit for issues (could be due to some field values not existing in a given project)
{ "conditions": { "and": [
{ "condition": { "field": "customfield_13900", "operator": "startsWith", "value": ["3", "4", "5"] } },
{ "condition": { "field": "customfield_13901", "operator": "startsWith", "value": ["3", "4", "5"] } } ] },
"actions": [ { "action": "set", "field": "customfield_13903", "value": "Adopt" } ] },
{ "conditions": { "and": [
{ "condition": { "field": "customfield_13900", "operator": "startsWith", "value": ["3", "4", "5"] } },
{ "condition": { "field": "customfield_13901", "operator": "startsWith", "value": ["1", "2"] } } ] },
"actions": [ { "action": "set", "field": "customfield_13903", "value": "Argue" } ] },
{ "conditions": { "and": [
{ "condition": { "field": "customfield_13900", "operator": "startsWith", "value": ["1", "2"] } },
{ "condition": { "field": "customfield_13901", "operator": "startsWith", "value": ["3", "4", "5"] } } ] },
"actions": [ { "action": "set", "field": "customfield_13903", "value": "Adapt" } ] },
{ "conditions": { "and": [
{ "condition": { "field": "customfield_13900", "operator": "startsWith", "value": ["1", "2"] } },
{ "condition": { "field": "customfield_13901", "operator": "startsWith", "value": ["1", "2"] } } ] },
"actions": [ { "action": "set", "field": "customfield_13903", "value": "Avoid" } ] }
Hi @Don Utley
Would you please show an image of your rule's Edit Issue Fields action and of the audit log details showing the rule execution?
Until we see those...
I hypothesize you are trying to use that expression you show in the advanced edit with JSON, but it is neither valid JSON nor a valid conditional expression: https://confluence.atlassian.com/automation/jira-smart-values-conditional-logic-1081351607.html
Where did you find that syntax for performing a conditional check within JSON?
I recommend instead using the conditional logic and created variables to break this up into multiple parts, allowing easier rule maintenance and debugging using writes to the audit log.
Kind regards,
Bill
Thanks, Bill. Below is the screenshot of the edit issue fields action. Its just the what-I-thought-was-JSON block above.
I first tried to implement this rule a few months ago, but couldn't get it to work as stated above, so created an effector structure to do the job. That's not automated so trying to do that now. I don't remember if I grabbed that from another post when I was searching around or if I asked a LLM chat to write it for me. One of the two. I'll look at the page you linked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, and I am fairly certain that syntax will not work with automation rules with JSON.
Instead you could use one of these:
The first approach will be easier to implement and test as the variables may be written to the audit log to check if the match what you expect.
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.