It's all about the answers!

Ask a question

Override IWorkItemServer:saveWorkItem for WI permission control

Davide Ceccon (131) | asked Dec 02 '15, 11:46 a.m.
edited Dec 02 '15, 11:48 a.m.
I try to implement an enhanced to my RTC 4.0.7 server api. Brief scenario: when a user deliver one or more changesets, the our server APIs verify the content of every files. If a file violates a rule, an alert (a checkbox of property) it's insert into WI's screen and his state is changed to error.
Currently, only the admin of project area can remove the alert and the user can put the WI in the previous state for deliver the file changed.
Now, we need to implement the unflag when user change  back  the WI from the error status to initial status.
I have the structure for do that:
IWorkItemServer wiServer = getService(IWorkItemServer.class);
//IWorkItem wi ...
//IAttribute value ..
wi.setValue(value, new Boolean(false)); wiServer.saveWorkItem2(wi, null, null);
but when user change the status and save the WI i have the exception CRJAZ6053E The 'Save Work Item' operation cannot be completed. Permission is required to complete the operation.
How i can bypass the control and update the WI?

Be the first one to answer this question!

Register or to post your answer.