Prevent editing/Read only Approvals section(Approval Presentation) on particular state of the Workitem
Hello,
I want to write Adviser plugin, where i need to prevent editing/ Read only of Approvals section in Workitem on particular workflow state. I have source code for prevent editing workitem on particular state. But here requirement is prevent editing of the Approval section only.
anybody have an idea related to this.
Thanks!
Accepted answer
Custom Advisor can only prevent saving and not make read only (the built in advisors "Read Only"..... use a hardwired mechanism that can not be extended.)
A custom advisor (here API examples: https://rsjazz.wordpress.com/?s=advisor&submit=Search , you want work item save advisors.) would have to check if a new approval has been added in the state and prevent saving the work item in this case. Here some hints to the approval API: https://rsjazz.wordpress.com/?s=approval&submit=Search
Approval is also not a real attribute, but a collection. I doubt you can make it read only.