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?
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.
Thanks a lot, Kristian! That looks exactly like what I was looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may also find the article at https://confluence.atlassian.com/jirakb/how-to-automatically-add-request-participants-when-creating-an-issue-777026955.html 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
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bartek,
Sorry about the link it should of pointed to https://docs.atlassian.com/jira-servicedesk/REST/cloud/#servicedeskapi/request/{issueIdOrKey}/participant-addRequestParticipants
I hope this helps.
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
'Request participants' is of type 'Request participants' - 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:
watcherField.setFormValue("user1,user2,user3")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What type of field is Request Participants? You can see that in Admin -> Custom Fields. May be a multi user picker?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.