I am trying to set the label on a newly created issue to be the value of a selected radio option of a custom field. The automation rule I am using is shown below (the "if" condition is so that it only works if I submit it, for testing purposes.) This is my latest attempt. I have tried about 10 different ways using a smart value, but I still end up with empty labels every time.
I have tried using both the custom field ID and the name of the field. I've looked through documentation as well, but so far have come up empty.
Is it possible to use the selected radio option of a custom field? If so, would someone be able to show me the correct way to do it?
I could always do a collection of "if" statements and do it that way, but I'd rather do it this way if possible. This is so that the labels would be dynamic if we ever change the radio options in the custom field we're using
@Drew -
Hi Andrew:
A few things you should check -
1) Your smart value syntax looks odd. What is the actual custom field name? The smart value syntax should be something like - {{issue.<the name of your custom field>}}. Please see smartvalue reference link - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
2) In regards to the Labels field, you need to know that by default value for this field cannot contact spaces. So if your custom field value contain spaces, then the labels field will display the one value as two separate values for the Labels field.
3) Please validate that your Edit Issue action is setup correct. Example I have an Edit Issue action where I want to copy the value from the current issue's field into my "Labels" field -
Lastly, I am not aware of any limitation in automation for Jira rule setup against a radio button custom field.
Hope this helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Infrastructure Applications Team
Viasat Inc.
@Joseph Chung Yin Hey Joseph,
In this case, the custom field's value name is "IssueCategory". I attempted using a "Test" label in this format, which worked:
If I change this from "Test" to "{{issue.IssueCategory}}" (double quotes included) or "{{issue.fields.IssueCategory}}", it does not work as expected and I end up with empty labels. The value of the radio option I've been testing with is "Email".
I'm beginning to think it may have something to do with one of the extensions we are using, since it allows for dynamic field configurations on our request types.
I'm probably just going to use an easy button here and create different "if" statements for each radio option. This response was still very informative and confirmed how I should be entering the smart values, so thank you for responding!
Maybe this is not a question for you, but should I accept a response as an answer if I end up abandoning the goal I was attempting to accomplish?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Drew:
Using the the if statements make sense. Yes, if you think my suggestion help, then please accept the response as an answer.
Best, Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Drew
Try this...
{{issue.<custom field name>.value.replace(" ","_")}}
Note - the replace function is optional. I have it there in case the selected option has a space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.