How to cancel a save operation?
Is there any way to cancel a save operation from a IWorkingCopyListener? I've added new fields to the workitem overview page using the custom attribute mechanism, along with some error checking on the few fields in my listener that implements IWorkingCopyListener. However, I have some problem in stopping the save operation when the error checking fails. I've attempted to throw an OperationCancelException (which is used when the error checking fails in the "Estimate" field), but this doesn't work in my case because the listener is running asynchronously with the UI thread.
|
One answer
Listeners cannot cancel the operation. You could register an IOperationAdvisor for the "com.ibm.team.workitem.operation.workItemSave" operation in your service plug-in and do the error checking there. This will additionally work for the Web UI.
Christof aying wrote: Is there any way to cancel a save operation from a |
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.