I'm following this solution, I am doing exactly as suggested -
However, I get the following error:
(Operation value must be an array of group objects (customfield_xxxxx))
Any ideas?
Thank you in advance
Hi everyone,
The original KB article mentioned in this discussion was incorrect and incomplete, so I archived it and wrote a new KB article describing various ways to write a rule meant to upgrade a Multi Group Picker field, using either:
Can you take a look and let me know if you are facing any issue with the solutions mentioned in this article?
Here is the link to new article: https://confluence.atlassian.com/automationkb/automation-for-jira-various-methods-to-update-a-group-picker-multiple-groups-field-1416566430.html
Thanks @Julien Rey, for updating the incorrect article so swiftly.
TimK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome.
By the way, I realized after writing this KB article, that some of the solutions (using a JSON expression) described at the end of the article will not work if one of the source multi group field is empty.
Since I was not able to figure out a JSON expression that will address the situations where one of the multi group field is empty, I added a warning next to these solutions (saying Only works if both multi group picker fields 1 and 2 are not empty), so please be aware.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Julien Rey
What are your plans to update your KB article to handle the possibility of empty field values for the additions / removals with the dynamic JSON, beyond the disclaimer added at the end of the article?
If the article cannot describe those changes, please consider removing that suggested solution to potential user errors.
Kind regard,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right. I think it's best to just remove the solutions that don't work in the case where one of the source multi group field is empty, to avoid any potential errors.
I just updated the KB article by removing the solutions that don't work in this case.
Thanks for your suggestion.
Cheers
Julien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @panjo, welcome to Atlassian Community.
You might try to replace set with add, something like this:
{
"update": {
"customfield_16209": [{ "add": { "name":"JG-Risk.Amsterdam" } }]
}
}
TimK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to reproduce the same error using set, and then got the rule to work replacing it with add.
I did not test using . (dot) in the group name though (ref comment from @Marc - Devoteam below).
TimK
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@panjo, according to the updated documentation replacing set with add, as in my suggestion above is a correct approach, ref:
If you find my answer valuable, it would be helpfull if you mark it as accepted.
Solution 1 in the article is in my opinion a better approach if you don't need to dynamically use other smartvalues and/or smartvalue logic to add to the field.
TimK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @panjo
Welcome to the community.
Can you show your automation and the details of the rule?
This will greatly help members on the community, to help you out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reaching out
Here's a screenshot. Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @panjo
Is this custom field of the type group picker and are you sure the group nae is correct.
To my knowledge group names can't contain dots.
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.