Forums

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

Using Automations to ADD a Label derived from multiple Custom Field values

Doug Winenger
Contributor
May 17, 2023

I am attempting to use automation to ADD a dynamic Label derived from two custom fields.

  • I want to apply a label that is a concatenation of a string and two custom fields' values like:
    • "string-{{cf1_Value}}-{{cf2_Value}}"
  • the idea is that cf1 and cf2 will change over the life of the issue
    • cf1 is a string (from a dropdown) and cf2 is a number
    • when certain conditions are met, I want to apply a label to "capture" that the issue achieved that particular status

 

The automation currently is attempting to do the folllowing:

  1. When: Issue updated
  2. IF:matches
    1. cf1_Value = "someString"
      1. Then: transition the issue to paused
      2. And: Edit issue fields
        1. cf2_Value = {{#increment}}{{issue.cf2_Value}}{{/}}
        2. Labels =
          1. (ADD) "string1", "string2-{{issue.cf1_Value}}-{{issue.cf2_Value}}"*
          2. (REMOVE) [none]

*Note:

  • I can't replicate the exact syntax here
  • "string1" in the label update is a static string/label
  • the second label, "string-{{cf1_Value}}-{{cf2_Value}}", is the dynamically derived label just in case my syntax is not clear.

 

  • I've also attempted to use
    • json/more options via the "Edit issue fields" - for example:

{

     "update": {

          "labels": [{

               "add": "string1"    

                    },

                    {

               "add": "string2-{{issue.cf1_Value}}-{{issue.cf2_Value}}"

                    }]
     },
}


The cf1_Value is the display name of the custom field vs. the ID (cf#####) format.

 

I feel like one of these options should enable this operation but so far, I've not been able to crack the nut.   Anyone have a solution for this challenge?  Thanks!

1 answer

0 votes
Prakhar Srivastav {Appfire}
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.
June 26, 2018

@Tasha Cronen

My understanding of your question is that there are stories ("required by") . On the completion of these stories you want several other stories to move into "ready for work" state.

To achieve this first you need to create relation between the "required by" story and the stories whose status need to be changed. I will prefer you to create a link that the stories are blocked by the main story.

Then on the transition of your main story , you can use a post function to move all linked issues from one state to another state. There are several add-ons which provide such post functions . One of them is below with example :

 

https://innovalog.atlassian.net/wiki/spaces/JMWE/pages/68878506/Transition+linked+issues

 

Regards

Prakhar

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events