Forums

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

How do you use automation to copy the checkbox field values to the label field in a Jira ticket?

Gina Ferrante October 20, 2020

I'm wondering if any of you seasoned, professional Jira users can offer me any insight on how to accomplish this task. When items in a checkbox field have been selected within a Jira ticket, I need those values to copy to the label field within the same ticket. I've tried to use automation to achieve this goal; however, there doesn't appear to be an option to select the checkbox field as the source of the data that is being copied into the label field. This is what I am trying to set up using Automation:

  • When: Value changes for
    • Modules (the name of my Checkbox field)
  • Then: Edit issue fields
    • Labels
      • Copy Modules (the name of my Checkbox field) from Current Issue
        • (Modules does not appear as a selection option here.)

I'm looking for solutions that don't involve plug-ins.

Thanks, Everyone!

1 answer

1 accepted

2 votes
Answer accepted
Marco Brundel
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.
October 21, 2020

Hi @Gina Ferrante ,

I used

{{issue.checkbox.value}}

where checkbox is the name of the checkbox field.

Please note, the choices in the checkbox must be whole. So "Red" but not "Dark Red".

Automation gives the following error.
The label 'dark red' can't contain spaces. (labels)

 

Greetings, Marco

Screenshot 2020-10-21 at 09.09.22.png

Gina Ferrante October 22, 2020

Hi, @Marco Brundel! Thanks so much for your help! This worked! Now, I have one additional issue related to this.... Maybe you can help?? It seems that if there are multiple checkbox values selected for the checkbox field, when they copy to the label field, they copy with a comma. For example, if I have the following items selected in my checkbox field (red and blue), when they copy into the label field, they copy as red, and blue. How do I eliminate the comma from copying over?

Like Marco Brundel likes this
Marco Brundel
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.
October 22, 2020

Hi @Gina Ferrante ,

I don't exactly what you mean with a comma. But labels cannot contain spaces. So in your example in the issue there are 2 labels, red and blue.

Of is there also a label with only a comma?

Maybe you can show the situation with a screendump.

 

greetings, Marco 

Gina Ferrante October 23, 2020

Hello, @Marco Brundel ! Here is an example of what I am describing...

My issue type is set up with a checkbox field named "MODULES." It's possible to select more than one option in the checkbox field. In this example, I have selected two options in the checkbox field: FMS_Expenses and FMS_General_Ledger. When I run the automation rule, the selected checkbox items copy to the Labels field; however, because there are two options selected, it copies to the Labels field with a comma after the first checkbox value selected as shown below:

2020-10-23_10-16-42.png

I'm wondering if you might have a solution to the automation that you provided that would check for commas and then eliminate them prior to posting the value in the label field. Any help you can provide will be appreciated! :-)

Marco Brundel
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.
October 26, 2020

Hi @Gina Ferrante ,

I was looking at the global Labels field in my set.

I have now recreated it with a custom field of type Labels and I also see the comma appear.
Incidentally, for the example "Dark red" I get two values ​​(without comma (?) ) in the field. But indeed by the chooses Red and Blue and Dark Red i get the labels

  • Red,
  • Blue,
  • Dark
  • Red

Dark red is the last option in the checkbox.
When I make it the first option and I choose Blue and Dark red I get

  • Red,
  • Blue
  • Dark


Not get a comma I have no solution for it at this moment, sorry.

pavel_tokar
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!
October 12, 2022

@Gina Ferrante 

my fix for this problem

{{Issue.field.value.replace(" ", "_").join(" ")}}

with replace - I remove spaces in text and change it

because checkbox in jira is list, I use join  (doc) and use "space" for separator

list.join(separator)
Like Marco Brundel likes this
Gina Ferrante-Gima
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!
October 12, 2022

@pavel_tokar , Thanks so much for sharing your fix! I will give it a shot!

Suggest an answer

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

Atlassian Community Events