Using automation to copy from a custom select field to a label

Benjamin Peikes July 21, 2021

Is there any way using native automation to copy from a select list to a custom label list?

We have a select list "Customer Select", which restricts the set of items, but we need to copy whatever is set there to a "Label" field we created years ago called "Customer" which allows us to add multiple customers to a single issue.

Want to avoid using script runner if possible.

2 answers

1 accepted

1 vote
Answer accepted
Deepanshu Natani
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 21, 2021

Hi @Benjamin Peikes 

You can use an automation rule like the below to copy the value from "Select List Custom Field" to a label type custom field:

Screenshot 2021-07-21 at 11.07.52 PM.png

Screenshot 2021-07-21 at 11.08.00 PM.png

Benjamin Peikes July 21, 2021

Thanks, I’ll try that. I didnt know you could use “smart” fields in the automation rules outside the json section.

Deepanshu Natani
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 21, 2021

Hey @Benjamin Peikes 

You should definitely look at using smart values for automation in this way. This can be used for a lot of other things too.

Rudger de Groot April 17, 2023

The only problem I run into is that label doesn't support values with spaces...

So this will only work for fields that have no spaces in the values...

0 votes
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.
July 21, 2021

Hi @Benjamin Peikes 

I believe you can do that with advanced field edits with JSON.  Please take a look at the examples in this documentation to try to match up with your field types for the edit:

https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/

Best regards,
Bill

Benjamin Peikes July 21, 2021

Thanks! I looked at this, and it does look like we can add a custom label field, but its not clear how to reference the select field.

For example if the select field is called “Customer Select”, how do you reference it?

I think our json would look something like

{
    "update": {
        "Customer": [
            {
                "add": {{issue.customerSelect.value}}
            }
        ]
    }
}

 But I’m not sure how you reference single select value, and not sure how to reference field names with spaces in them.

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.
July 21, 2021

Please see the example from @Deepanshu Natani as that is much simpler than trying this with the JSON edits.  Thanks!

Suggest an answer

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

Atlassian Community Events