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.
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.
I have to offer choice of group like 'testers', 'assaignees', 'watchers', 'administrators'. I thought I could get that roles by one method...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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.