How can a Work Item be prevented from being Closed if there are any pending Approvals?
It is a specific use case and wondered if anyone has a specific solution.
We want to stop a Work Item from being Closed if there are any Approvals pending. The problem is that Approvers can still receive emails if Approvals are overdue even though the Work item is Closed.
If a Work Item has multiple workflow actions to a 'Closed' state is it possible to inhibit either the transitions or Work Item 'Save' if there are any Approvals pending.
Thanks for any help.
Accepted answer
https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/
The approval API: https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ and https://rsjazz.wordpress.com/2012/10/01/adding-approvals-to-work-items-using-the-plain-java-client-libraries/
You would have to read the approvals from the new state and check if one is open.
See https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ to get started.
Comments
Thanks for this Ralph. You've been a great help.
Looking through it seems very complex or tortuous to have to manage plug-ins, maybe install tools, learn JavaScript/Java, test on a separate instance.
Am I correct in thinking a certain amount of expertise is required or is it fairly straight forward?
Couldn't a simpler way of enabling the user to define pre and post conditions be provided?
Yes, as mentioned in https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ it is torturous if you are new. I find it quite easy these days, but that took time.
No, there is no easier way to approach this, I would be aware of. I try my very best to provide you with what you need in my blog and give some background. You can also start with the extensions workshop but ultimately you want to see the other info as well.
One benefit I do see is that most of the users that finally decide to go that route are aware it can be complicated, usually have some skill and limit the effort to the absolutely necessary.
This prevents customizing the process to death to some extend.