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")
{
reqParticipants.setFormValue("user1")
}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?