Jira - user roles

b March 28, 2012

Hi,

Is that possible to get all user roles available for task? It means projectRoles (projectRoleManager.getProjectRoles()) with custom created roles, but it doesn't contains roles like 'Assaignee', 'Watchers'... I don't want to get concrete users, but user roles.

1 answer

1 vote
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.
March 28, 2012

Those aren't "roles". Atlassian tend to use the word "role" to mean "user role" rather than the "dynamic" or "derived" roles you're talking about.

You can't actually get them from projectRoleManager because they aren't roles at all, and aren't associated with the project - they're functions derived from data.

Could you explain what you're actually trying to do? We might be able to point you in the right direction.

b March 28, 2012

I have to offer choice of group like 'testers', 'assaignees', 'watchers', 'administrators'. I thought I could get that roles by one method...

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.
March 28, 2012

No, that's what I said, there are "roles" in there, but most of what you are looking for are not "roles", they are functions based on information from the project, issue, user-groups and so-on. It's a nonsense to ask for them at a project level, because by their nature, they vary. For example, when you ask for "assignee", what would you expect the project to answer? It can't because assignee is a function of the issues.

To offer those options, you need to do a couple of things:

1) Your code will need to physically add them to whatever you're writing to "offer the choice"

2) Your code will need to replicate or reuse the functionality when actually using them for anything. (e.g. using assignee as the example again, your code will have to say "ah, user selected assignee, that means I need to read each issue for the current assignee")

It may help if you explain what you're trying to do - rather than just say "offer a choice" (that's implied by your question), explain what you want to end up with. Outline roughly what the user gets out of it?

Suggest an answer

Log in or Sign up to answer