Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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!

0 votes



7 answers

Permanent link
after you removed the users, you did a save on the process area, right?
THEN you can add them back...

0 votes


Permanent link
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)

0 votes

Comments

website?  you mean thru the web UI of your RTC installation?

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


Permanent link
in my history I see , this is 4.0.6

Change by sam (Jun 23, 2014 4:47 PM)

Members
added:
    sam
Role assignments
sam
added:
    Team Member
    Stakeholder
    Scrum Master
    Product Owner
just added new user to system and
Change by sam (Dec 10, 2014 9:48 PM)

Members
added:
    tom
Role assignments
tom
added:
    Scrum Master
    Team Member

0 votes


Permanent link
  
Below are the results after addMember and addRoleAssignment, where the first one "Remove a role". (4.0.2)

Change by admin (2014/12/9 下午3:54)

Role assignments
john
added:
    jazz_role_sdjazz_role_developer
removed:
    SD
Change by admin (2014/12/9 下午3:54) 

Members
added:
    john


Below is the right result. (4.0.2)

Change by admin (2014/12/9 下午3:54)

Role assignments
royce
added:
    Reviewer
Change by admin (2014/12/9 下午3:54)

Members
added:
    royce


Below does not show "role assignment" history. (4.0.2)

Change by admin (2014/12/9 下午3:54)

Members
added:
    joyce


The results are from the same code and during the same execution.

0 votes


Permanent link

Hi yung,

Maybe u try to add team area, just like this:

...

urTeamArea.addMember(userContributor);

urTeamArea.setRoleAssignments(userContributor,new IRole[] {role});

...

0 votes


Permanent link
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.

0 votes


Permanent link
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!

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927

Question asked: Dec 10 '14, 9:38 p.m.

Question was seen: 3,925 times

Last updated: Dec 14 '14, 7:36 p.m.

Confirmation Cancel Confirm