Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Edit group attribute of Assets object using Jira Automation

Nathan Allen May 24, 2023

I'm working on managing group membership based on some specific criteria of objects in Assets and at the end of the automation, I want to update the list of groups the object is a members of.

 

I've got a "Group" attribute on my object with no maximum value and in my automation I've got it looking up a group of objects, sending an API request to update group membership, and then editing the object at the end with the new group membership.

Screenshot 2023-05-24 at 10.58.18 AM.pngScreenshot 2023-05-24 at 10.59.55 AM.png

Most of that works, but I keep getting the error "No issues were found, stopping the rule"
Screenshot 2023-05-24 at 10.59.34 AM.png

I've tried every option I can think of for the name of the group (group ID, putting it in a smart value, just the string), but I get the same result.

If I manually add the group to a user and then log the contents of the field, it's just the group name as a string.

Any help would be appreciated!

1 answer

1 accepted

2 votes
Answer accepted
Nathan Allen May 24, 2023

In case someone finds this looking for an answer, I couldn't figure out how to do it with just Jira Automation actions. Also, based on the way the API works, I think it would overwrite any existing values anyway, instead of appending them.

I ended up replacing the "Edit Object" action with a couple If's to check if the field is already empty or not, and then a web request to edit the attribute via the API.

Screenshots of both below.
Screenshot 2023-05-24 at 12.46.40 PM.png

Screenshot 2023-05-24 at 12.49.06 PM.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events