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

Nick Menere
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.
September 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
Answer accepted
Nick Menere
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.
September 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.

Kathy Tempesta September 14, 2016

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

Kathy Tempesta September 14, 2016

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). 

Kathy Tempesta September 14, 2016

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
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.
September 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.

Tiffany L. May 17, 2017

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.

0 votes
Greg vi September 20, 2016

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?

 

 

 

 

Greg vi September 20, 2016

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
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.
September 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 Sign up to answer