Hi there!
I built an automation to update the label field on work items as they are created and/or updated to include Product Catalog in the Summary. It is not working.
I validated the JQL query but it is not working. Any ideas?
The json under the Edit step is default added by Jira and I have this unchecked as I don't need a message sent.
Hey all! It actually worked! It just was a delay of some kind. Thanks!
I agree with @Sami Shaik suggestions, especially checking the Re-fetch work item data action and verifying that the label value is valid.
One additional thing I'd recommend checking is the Audit log for the flow execution. It will show whether:
- the work item matched the JQL condition,
- the Edit work item action was executed, and
- the label update succeeded or failed (along with any error message).
If the audit log shows that the Edit action was executed successfully but the label still wasn't added, could you share a screenshot of that audit log entry? That should help narrow down the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Most likely culprit first: if your trigger is Work item created (or the multiple-event trigger with created + updated), the rule often starts running before the Summary is actually available to it. Your JQL condition then evaluates against empty data and fails silently - the audit log shows "The following work items did not match the condition" even though the JQL is valid. This is a known timing defect with that trigger on Cloud, not a problem with your query.
Fix: add the Re-fetch work item data action as the first step after the trigger, before your JQL condition. It slows the rule by a second or two but reloads the work item so the condition sees the real Summary. (A Delay action won't help here - it waits but doesn't reload.)
Two more things to check while you're in there:
Product Catalog" as a label, the edit will fail or split into two labels. Use product-catalog or ProductCatalog instead.One caution since this is a global rule firing on updated as well: once the rule adds the label, that edit is itself an update. Loop prevention normally stops it re-triggering itself, but it's still worth adding a condition like Labels does not contain product-catalog before the Edit step so the rule doesn't burn executions re-processing items it already labeled.
If it still doesn't work after the re-fetch, post the audit log detail for one execution (Automation → Audit log → expand the run). The specific message - "did not match the condition" vs. an error on the Edit action vs. no execution at all - tells us exactly which of these it is.
Regards,
Sami.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The likely issue is in the Edit work item action.
Under More options → Additional fields, there is still sample JSON present:
{ "fields": { "environment": "Thanks for raising {{issue.key}}!", "Custom Field Name": { "value": "red" } } }
This JSON is not related to the label update and may cause the action to fail because Custom Field Name is only a placeholder. The Send notifications checkbox does not disable this JSON.
I suggest:
Remove everything from the Additional fields box.
Keep only the Labels field configured as: Product_Catalog_Update
Save and publish the rule.
Create or update a test work item whose summary contains “Product Catalog”.
Review the automation audit log for the exact result.
Also note that your condition contains: labels = EMPTY
This means the rule will only add the label when the work item has no existing labels. If the work item already has another label, the condition will fail.
To add the label even when other labels already exist, use:
project = FIN AND summary ~ "product catalog" AND status NOT IN (EAP-Cancelled, EAP-DONE) AND labels != Product_Catalog_Update
However, because labels != value may not include work items where Labels is empty, the safer version is:
project = FIN AND summary ~ "product catalog" AND status NOT IN (EAP-Cancelled, EAP-DONE) AND (labels IS EMPTY OR labels != Product_Catalog_Update)
In the Edit action, make sure the Labels field is set to Add/remove values or Add to existing values, rather than replacing all existing labels.
Thanks,
Nisha
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.