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!

2 answers

0 votes
Julien GERARD
July 2, 2018

Hi there,

 

for information our problem came from a bad /etc/hosts file on our Linux server.

In the mountain of logs, if you have a network BindException, this could be the same mistake.

Thanks Alexey for your help.

0 votes
Alexey Matveev
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 25, 2018

Hello,

Start Jira in safe mode and try to enable add-ons one by one to see which one makes you Jira instance fail on startup.

./start-jira.sh --disable-all-addons --disable addons=com.atlassian.test.plugin
Julien GERARD
June 25, 2018

Thanks Alexey,

but I got the same errors in the log file.

Alexey Matveev
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 25, 2018

If you have a backup of Jira folder, you can try to apply the backup.

Suggest an answer

Log in or Sign up to answer