Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Set Reporter from the Request Participant using Script Runner?

cbourner May 14, 2018

There are lots of examples about on how to add a request participant; I want to get an array of users FROM the request participant field so I can manipulate it.

I can get this far:

CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
def requestParticipantsField = customFieldManager.getCustomFieldObject("customfield_11832");

def requestParticipantList = sourceIssue.getCustomFieldValue(requestParticipantsField);

Is "requestParticipantList" an array?  Or have I got this wrong?

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
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.
May 14, 2018

Hello,

You can check it yourself. Try to add :

log.error("requestParticipantList  class: " + requestParticipantList.getClass())

to the end of your script and have a look at the output in the atlassian-jira.log file.

cbourner May 14, 2018

Thanks - I am new to this and I appreciate your advice.

cbourner May 14, 2018

It is a java.util.ArrayList, which is what I was expecting.  Thanks again.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events