Editing Multigroup picker Jira smart values - Not working

panjo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 19, 2024

I'm following this solution, I am doing exactly as suggested -

https://confluence.atlassian.com/jirakb/how-to-add-values-to-a-group-picker-field-using-automation-for-jira-1384127113.html

 

However, I get the following error:

 

 

(Operation value must be an array of group objects (customfield_xxxxx))

Any ideas?

 

Thank you in advance

 

3 answers

2 accepted

1 vote
Answer accepted
Julien Rey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2024

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:

  • explicit values
  • the content of single group picker fields
  • the content of multi group picker fields

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

Tim Kopperud
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 31, 2024

Thanks @Julien Rey, for updating the incorrect article so swiftly.

TimK

Like # people like this
Julien Rey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 31, 2024

Hi @Tim Kopperud 

 

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.

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 31, 2024

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

Like Julien Rey likes this
Julien Rey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2024

@Bill Sheboy 

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

1 vote
Answer accepted
Tim Kopperud
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 20, 2024

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

Tim Kopperud
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 22, 2024

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

Tim Kopperud
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 26, 2024

Hi @panjo , where you able to get this to work? 

This worked for me:

image.png

TimK

Tim Kopperud
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 26, 2024

Hi @panjo, I now also tested using . (dot) in the group name, and it still works fine.

image.png

image.png

image.png

TimK

Tim Kopperud
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 31, 2024

@panjo, according to the updated documentation replacing set with add, as in my suggestion above is a correct approach, ref:

image.png

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

Like Julien Rey likes this
0 votes
Marc - Devoteam
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 19, 2024

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.

panjo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 19, 2024

Thanks for reaching out

Here's a screenshot. Thank you

image.png

Like vasanth likes this
Marc - Devoteam
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 22, 2024

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.

Suggest an answer

Log in or Sign up to answer