IProcessArea.addMember() and IProcessArea.addRoleAssignments abnormal result
Hi.
After I removed all the members in the IProcessArea, I tried to add them back.
So I iterated to add each member back by calling IProcessArea.addMember().
But the result is weird. The roles of member is not empty. Some roles are assigned to this member instead.
Are roles cached somewhere?
When I called IProcessArea.addRoleAssignments(), the result is not like I thought.
I want to add role A to John. But in the end, John has no role.
The history shows John has been assigned A and A has been removed at the same time.
(It's because John has been assigned A since IProcessArea.addMember())
But there is another problem. Why IProcessArea.addRoleAssignments() removed roles from members?
I then use IProcessArea.setRoleAssignments() to solve this problem instead.
Am I misunderstanding the API document?
Thanks!
|
7 answers
after you removed the users, you did a save on the process area, right?
THEN you can add them back... |
I do save the process area after I remove the members.
I even tried remove members on the website instead using api.
But the result is the same.
(I used version 4.0.2 API)
Comments
sam detweiler
commented Dec 10 '14, 10:24 p.m.
website? you mean thru the web UI of your RTC installation?
Yung-Hsiang Chan
commented Dec 10 '14, 10:38 p.m.
yes.
The "History" shows only "add member" but not "add role" action.
The process I used:
1. remove members -> Save
2. add members -> Save
3. add roleassignment -> Save
|
in my history I see , this is 4.0.6
Change by sam (Jun 23, 2014 4:47 PM)
Change by sam (Dec 10, 2014 9:48 PM)
|
Below are the results after addMember and addRoleAssignment, where the first one "Remove a role". (4.0.2)
Below is the right result. (4.0.2)
Change by admin (2014/12/9 下午3:54)
The results are from the same code and during the same execution.
|
Hi yung, Maybe u try to add team area, just like this: ... urTeamArea.addMember(userContributor); urTeamArea.setRoleAssignments(userContributor,new IRole[] {role}); ... |
Ralph Schoon (63.5k●3●36●46)
| answered Dec 11 '14, 3:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I would suggest to look into http://rsjazz.wordpress.com/2013/09/18/deploying-templates-and-creating-projects-using-the-plain-java-clients-library/ which adds users and role assignments.
|
yeah, I used setMember(userContributor) in the end but still don't know why I got weird results by using addMember(userContributor).
Perhaps I should use 4.0.6.
Thank you all!
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.