How to add value from another field into a label field based on a trigger?

Azfar Masut
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 3, 2019

I would like to pass a select field value to the label field whenever the select field value is changed. To use jira project automation

1 answer

1 accepted

0 votes
Answer accepted
Azfar Masut
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 3, 2019

Resolution

 

Using project automation:

  1. <When value changes> for customfield_10553
  2. <Then: edit issue field>. Leave the choose field option empty and use the advanced function:
{
"update": {
"labels": [
{
"add": "{{issue.customfield_10553.value.remove(" -").replace(" ","_")}}"
}]
}
}
Adam Ziecik April 21, 2023

@Azfar Masut - I am trying to set up a rule that will copy a label from a custom field (label type) to Jira Labels field without removing excising labels in that field. I have no problems with this part. However, I then want to have a rule that will also remove the Label copied from the custom field, if it is removed by a user. i.e. if user removes the label from the custom field then the label should be removed from the Labels Jira field.

 

Would you know how to solve this?

Suggest an answer

Log in or Sign up to answer