Jira - issue roles

b April 9, 2012

Hi,

I have issue object, and I want to get issue role users like : Reporter, Tester, Assignee. How could I do that?

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2012

I can't be sure what you actually mean here though, because the word "role" is not clear. Atlassian have chosen to call part of the user managenment system "role". That's a good word for it, but it confuses the use of the word "role" in non-Atlassian English, as your usage of it here is absolutely correct as well. You're trying to find the role of a person involved with an issue. Just to be clear - do you mean "Atlassian role" or "relationship of person to an issue"?

Anyway, to make a start:

Reporter and Assignee are not roles, they're attributes of an issue. So Issue.getAssignee and Issue.getReporter are what you need for them. See http://docs.atlassian.com/software/jira/docs/api/latest/ and look for the Issue object for full docs.

I'm guessing tester is an atlassian-role you've set up - there's no real way to extract this from an issue because it isn't an issue level piece of information, it belongs to the project, and all you need from the issue is "project", so you can read the project object and then the users in the role.

You may also have Tester as a user-picker or multi-user picker, in which case, you need one of the getCustomFieldValue calls.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events