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
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
One answer
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.
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.
Comments
Susan Hanson
Sep 08 '14, 3:36 p.m.