It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira - user roles

b Mar 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 Mar 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 Mar 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 Mar 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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira Software

Early Access: If you use Jenkins and Jira Software Cloud, you need to read this!

The Jira Software Cloud Team has been busy working on a simple, secure, and reliable way to integrate your build and deployment information from Jenkins with Jira Software Cloud. This means you don’t...

279 views 0 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you