The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

5 votes
Answer accepted
Darryl Lee
Community Champion
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
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events