I have a custom field (Listbox allowing multiple values to be selected) and would like to set the initial value based on the value in a label.
So, for example, if the label contains "Test1" and "Test 2", I want to update the listbox value to "Value A", "Value B".
This would be a one time run to set the values on the listbox (without having to do so manually).
Thanks
Hi @Aditya Sastry ,
We are looking for the solution similar to above but we need to achieve when user edits the label field.
I tried with automation in JIRA plugin but the problem is if we update Label field with any values the custom field is getting updated. But I need to update for a particular label in label field.
Can you help me How to achieve this.
Thanks,
Vasantakumaar
You can use a behavior or listener to do it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this needed to be done at a specific step? Project automation can also be used for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, it's just a one time execution that needs to happen as we are switching from the label to the custom field - need to get existing label values into the custom field...
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Below is how this can be done.
Create a step from any status to itself. Write a post function with JMWE plugin
Scripted (Groovy) Operation on Issue Post-function
def label =issue.get("labels")
issue.setFieldValue("Call-out",label )
or
issue.setFieldValue("Call-out",issue.get("labels"))
Replace "Call-out" with your field name.
After this has been set up, search for all such issues and bulk transition them. This will copy all the values in Label to the desired field. I have tried it in my system and it works.
Feel free to accept the answers, so others can see that the question was resolved if they have the same issue.
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.