How do I add a request participant using Automation for JIRA?

Nick Menere Community Champion Sep 13, 2016

I want to create a rule that adds a request participant to a ticket but there is no specific action to do this.

2 answers

1 accepted

2 votes
Nick Menere Community Champion Sep 13, 2016

In Automation for JIRA you can use the Edit Issue Action to add a participant.  You need to use the Advanced Field and specify the the user to add.  The following JSON will work - simply substitute the customfield_id for the field in you system and the <username> with the user you want to add:

{
    "update": {
        "customfield_10003": [
            {
                "add": {"name": "&lt;username&gt;"}
            }
        ]
    }
}

 

Here is an image of the fully configured rule:

Screen Shot 2016-09-14 at 10.40.12 AM.png

You also need to ensure that the "Automation for JIRA" has permission to edit the issue and and that the Request Participants field is on the edit screen.

I'm evaluating this plug-in now because I need to do exactly this but my automation isn't working.I checked the audit log and it ran but it didn't actually add the participant. Here's my rule. I updated the custom field ID and changed the name to the username I want to add. I wasn't sure what the "admin" part was for so I left it unchanged. Any idea why this isn't working? THX! 

2016-09-14 15_44_01-Project automation - JIRA.png

I got this rule fixed by changing it to "name":"<username>" WOO HOO! 

Now I am trying to change another custom field that is a single select list. How do I figure out what to use in the json pair instead of "name" (that didn't work, I tried it already). 

NM, I added a new ticket with this request since it isn't the same as this question. 

https://answers.atlassian.com/questions/41481278

Nick Menere Community Champion Sep 14, 2016

Great to see you figured this one out.  I will make the answer a little more specific.

Looks like Andreas sorted you out on the other issue.

What would the correct syntax be if you want to add multiple people to the participants list? I've got it working for one person, but can't quite get it for two people.

Hi,

I have the exact same use case as described here.

 

I have set up the rule as below:

Advanced additional field.bmp

 

Also, i have found the custom field ID for 'request participant' by looking at the URL of the custom fieldcustom field request participants.bmp

Then I created a new request. The participant was not added.

Inside the audit log, I found the following error:

error.png

While the field is actually on the screen.
Do you have any ideas how I could make it work?

 

 

 

 

I just solved the problem myself.  "Automation for JIRA" didn't have enough permission to edit issues. I used the JIRA 'permission helper' to help me navigate through this.

 

Automation for JIRA is a great tool! However, in my case, the error message was quite misleading. Maybe an idea for future enhancement? smile

Nick Menere Community Champion Sep 20, 2016

Greg - great that you solved it. Totally agree with you on the error message!  I have raised an issue - https://codebarrel.atlassian.net/browse/AUT-26

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,849 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot