Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Global Automation - Update Labels Field

Natalie Cotela
Contributor
July 20, 2026

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.

 

Screenshot 2026-07-20 at 14.55.53.pngScreenshot 2026-07-20 at 14.56.00.png

3 answers

1 accepted

0 votes
Answer accepted
Natalie Cotela
Contributor
July 21, 2026

Hey all! It actually worked! It just was a delay of some kind. Thanks!

0 votes
Gor Greyan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 20, 2026

Hi @Natalie Cotela

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.

0 votes
Sami Shaik
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 20, 2026

@Natalie Cotela ,

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:

  1. The label value itself. Labels in Jira cannot contain spaces. If the Edit step is trying to add "Product Catalog" as a label, the edit will fail or split into two labels. Use product-catalog or ProductCatalog instead.
  2. The Edit work item action config. In the Edit step, make sure Labels is selected under "Choose fields to set", and the value is entered in that Labels field - not in the "Additional fields" JSON box under More options. The gray JSON you see there by default is just placeholder text and does nothing, so it's safe to ignore - but if any real JSON was ever pasted in, it must be valid or the whole edit fails. Leave it empty. (The notification checkbox you unchecked is unrelated - that only controls emails, not whether the edit happens.)

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.

Nishanthini Sathiyaseelan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 20, 2026

 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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events