how to set 'Request Participants' using behaviours(script runner)?

I want to create a behaviour to set 'Request Participants' based on a selected value in some single select list but I don't know what values does this request-participants-field accept.

I tried something like this:

def market = getFieldById(getFieldChanged()) //behaviour is used when changing this field
def reqParticipants = getFieldById("customfield_12211") //this is 'Request participants' field
def selectedOption = market.getValue() as String
if (selectedOption == "something1")

But it doesn't do anything with user names (users that actually exist in my Jira).

I tried using e-mail addresses instead of user names but with no positive effect as well.


I do tried to use a post function to copy field value from 'watcher field' (that can be populated by this behaviour) to 'request participants' and that worked. But that is only a post function and behaviours seem to be more elegant and universal solution.

If some post function is able to insert a proper value to 'request participants' field then I think that it should be also possible to use behaviours but I don't know what is the proper way to do this.


Any ideas what am I doing wrong?


8 answers

What type of field is Request Participants? You can see that in Admin -> Custom Fields. May be a multi user picker?

'Request participants' is of type 'Request participants' smile - it is a locked system custom field that is added by JIRA Service Desk. It works somewhat like multi user picker but not exactly, because you can add also an e-mail address there if a user doesn't have a JIRA account.

It stores people involved in an issue - so it's like a field to store watchers but in a different way. Our 'watcher field' (that is added by installing Watcher Custom Field for JIRA add-on) is easily populated by placing user names like:


Hi Bartek,

Service desk uses system fields which cannot be set by the normal JIRA API.

However the latest versions of JIRA Service Desk contain a rest API which will allow you to use a Post Request to set Request participants. 

An example of the Add Participants method in the API can be viewed here.

I hope this helps


Thanks Kristian,

but the link doesn't work wink

You may also find the article at here which shows how you can set users in the request participants field using a Post function which you may be able to convert into a behaviour.



Thanks a lot, Kristian! That looks exactly like what I was looking for.

An easy way to do this is using the Collective Issue View for Service Desk Plugin. 
This plugin adds automatically groups of users as Participants. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,411 views 15 19
Read article

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