Jira Workflow Toolbox: adding labels to existing values in the label field

Katharina Flor February 7, 2025

Hi,

 

i am using Jira Workflow Toolbox and i want to add a Workflow post-function that adds during a specific transition, a label to the issue - add this label to already existing values in the label field.

How can I write the parser expression for it? With the current configuration, existing labels will be replaced.

Bildschirmfoto 2025-02-07 um 11.37.38.png

2 answers

1 accepted

2 votes
Answer accepted
Sergio García-Consuegra [Decadis AG]
Contributor
February 11, 2025

Hi @Katharina Flor ,

My name is Sergio, and I'm a member of the support team of Decadis.

You can achieve your current requirement by using the following general expression:

%{append(toStringList(%{issue.labels}), ["known-error"])}

This expression will join the current labels you have already selected with the label "known-error". The old values will remain, without being deleted as you mentioned in your comment, and also the value "known-error" will be added to the current labels which are selected for that issue.

If you have any questions about what JWT can do or how to implement any functionality for Jira, I encourage you to create a ticket on our support portal

I hope this solution is useful for you. If you have any other doubt, please let me know.

Best regards,
Sergio

0 votes
Sirine February 14, 2025

Hi @Katharina Flor

It is possible to address your requirement by adding new labels to the field without removing the old ones.

We have two solutions to achieve this:

  1. Using a Post-Function

  2. Using an Automation Rule

Here’s an example of the JSON code for the update, which can be used in a Post-Function

{
  "update": {
    "Label": [
      {
        "add": "Your expression"
      }
    ]
  }
}

As a team member of Colored Label Manager , I’d like to suggest an alternative solution.

You can use Colored Label Manager to manage your labels more effectively.

For more details, please refer to the documentation.

If you have any questions or need further clarification, please don’t hesitate to ask.

Best regards,
Sirine

 

Suggest an answer

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

Atlassian Community Events