It's all about the answers!

Ask a question

How to read the list of users with a specific role added to a project area using java script ?


Prasad Annamdasu (15453643) | asked Jan 09 '13, 5:28 a.m.
Hi, 

How to read the list of users with a specific role added to a project area using java script ?

Comments
Millard Ellingsworth commented Jan 09 '13, 9:41 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER

Hi, Prasad.

As Lauren and Ralph have mentioned below, this isn't supported at this time. If you can say more about what you are trying to accomplish, we might be able to suggest another way to accomplish it. 


Prasad Annamdasu commented Jan 10 '13, 1:06 a.m.

 Hi Millard, 


I am trying to add a list of pre-defined members of a specific-role to subscribers at a particular state in a workitem. or if i can add a list of pre-defined members of a specific-role as multiple approvers to an approval at a particular state also will solve my problem.

For example, there are 10 users added to a project out of which 4 of them are assigned with the project manager role and would like these 4 name to be added automatically to the subscriber list of a workitem in a particular state.




Ralph Schoon commented Jan 10 '13, 1:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

That is definitely not supported with JavaScript. See  http://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ for a potential solution. The Participant creates an approval with approves having a specific role. You could use a similar approach to add subscribers.

One answer



permanent link
Lauren Hayward Schaefer (3.3k11427) | answered Jan 09 '13, 7:02 a.m.
JAZZ DEVELOPER
Hi Prasad,
This forum post has information about accessing users by role using javascript: https://jazz.net/forum/questions/97599/how-to-use-javascript-api-to-get-all-the-users-idaccounts-in-an-role-by-the-role-name.  Depending on what you're trying to do, using Role Based User Lists may work for you: https://jazz.net/help-dev/clm/index.jsp?topic=%2F%2Fcom.ibm.team.workitem.doc%2Ftopics%2Ft_configuring_role_based_user_list.html.

Comments
Ralph Schoon commented Jan 09 '13, 8:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just to make it clear here, there is at this point no access to more information for a user than

  1. the name (getLabel())
  2. the UUID (getValue())

Built in workitem customization, such as the role based user list, might be a solution for some of the requirements.


Prasad Annamdasu commented Mar 13 '13, 4:01 a.m.

@rschoon @lhayward @millarde

Thanks all for the suggestions

Your answer


Register or to post your answer.