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

Is there an easy way to determine what changed on a com.ibm.team.process.server.saveTeamArea?

I'm working on solving an issue where I need to be able to have a validator on a TeamArea save, specifically adding users and/or modifying roles on a team area.

I believe I can write an OperationAdvisor for com.ibm.team.process.server.saveTeamArea ... but is there an easy way to get "what" has changed?  Or do I have to basically compare the before and after work items to determine what has changed to see if I want to allow the change?

Susan

0 votes

Comments

I've gotten my team area validator to be invoked when the team area is saved.  However, normally in my work item save advisors, I do an  operation.getOperationData() from the AdvisableOperation parameter "operation" that comes into the run() method.  However, when I do that on a team area save, the object come back as null.

In the debugger, I can see that the operation is a TeamAreaSaveOperation but there is nothing that I can see where I can get the values from the TeamAreaSave operation so that I can work with the "new data" to validate and determine if I should allow.

Can someone help or point me to more detailed documentation around this TeamAreaSaveOperation object?



One answer

Permanent link
The TeamAreaSaveOperation does not set operationData. Setting operationData is not required, and null is returned by any operation that does not set the data.

I have filed this enhancement that would make the team area available from the operation:
Provide a way to get the items saved from TeamAreaSaveOperation and ProjectAreaSaveOperation (356292)

The TeamAreaSaveOperation is an IProcessItemSaveOperation.  You could cast to IProcessItemSaveOperation, then call getItems to determine the ITeamArea being saved.

IProcessItemSaveOperation is not an API class, but it is stable since 2008. There is no guarantee it will not change in future versions, however.

Hope that helps,
Ruby
Martha (Ruby) Andrews
Jazz Foundation L3 Development.

0 votes

Comments

 That enhancement was resolved without explanation.  I've reopened it as this is still very much a live issue, and also raised https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=453152 as I was advised by IBM to raise an RFE.


Let's hope this raises the profile of the matter a little. 

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
× 11,052

Question asked: Sep 08 '14, 10:34 a.m.

Question was seen: 5,438 times

Last updated: Feb 21 '18, 4:13 a.m.

Confirmation Cancel Confirm