How to remove a specific request participant with a Jira Automation?

Conner Murowchick
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!
November 14, 2024

Hi, 

I'm trying to remove just a specific request participant when an automation runs. (As it interferes with another automation if the request participant is present).

Using the below JSON in the more options of the edit issue branch, all request participants are removed when the associated automation is ran. (no matter what is in the "name" field it deletes all request participants): 

Is there a way to just remove a single recipient when this automation is ran? For example a user: abc@def.com? 

 

{ 
     "fields":
      {
            "Request Participants"[
             {"remove" : {"name": "{{issue.assignee.name}}"}}
             ]
       }
}

1 answer

1 accepted

5 votes
Answer accepted
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 14, 2024

Hi @Conner Murowchick - you're very close!

I believe what you need is to use update instead of fields:
{ 
     "update":
      {
            "Request Participants"[
             {"remove" : {"name": "{{issue.assignee.name}}"}}
             ]
       }
}
From the documentation:
fields is a shortcut for calling update with the set operation
You need to call update with a remove operation.
BTW, I'm not 100% sure you can remove a user by name, so you may need to use:
             {"remove" : {"id": "{{issue.assignee.accountId}}"}} 
Conner Murowchick
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!
November 15, 2024

Hi Darryl, 

Thanks for the quick response! I was able to accomplish what I needed with the following:

{ 
     "update":
      {
            "Request Participants"[
             {"remove" : {"id": "{{issue.assignee.accountId}}"}}
             ]
       }
}


Appreciate your help!

 

Like Darryl Lee likes this

Suggest an answer

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

Atlassian Community Events