Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

remove label after editing

Cedric Ahrend
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!
June 28, 2024

Hey all,

I'm just starting with Jira as Product Owner and I'm trying use automation to speed up my work process. Every time a story is created a lable "toBeRefined" is automatically added, to help me with Backlog Refinement.

Then I have to manually remove the label, once refined which is a source for errors and confusion, if I forget to do it. So I tried the JSON field with automation to remove the label every time I edit an issue and enter a value in Story Points.

The Audit logs keeps telling me there's an 'Error while parsing additional fields. Not valid JSON.'

 

 

{ "fields":

               { "environment": "Thanks for raising {{issue.key}}.",

       "labels": [

                "bugfix",

                "blitz_test" ],

            "update":{

               "labels": [ { "remove": "toBeRefined" } ] },

               "Custom Field Name": { "value": "red" }

    }

}

 

For automation I use

When: Value changes for Story point estimate, Story Points

Then: Edit issue fields Labels, Advanced

 

What am I doing wrong here?

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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 Leaders.
June 28, 2024

Hi @Cedric Ahrend -- Welcome to the Atlassian Community!

There appears to be both some leftover JSON, from the field template, and incorrect syntax for label updates.  Please look here for the correct syntax to add / remove labels: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Labels

And...from what you describe, you do not need JSON for this scenario.  Instead, you may remove the JSON, select the Labels field from the dropdown list, and at the right side ... menu select the ADDREMOVE option.  That will allow you to enter the specific label in the Values to Remove field.

Kind regards,
Bill

Cedric Ahrend
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 5, 2024

Hi @Bill Sheboy -- thank you :)

 

the ... menu solution did the trick, thank you very much!

 

Kind regards

Cedric

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events