Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes


Accepted answer

Permanent link
You have to write a custom advisor that checks this during the save and blocks the save. For an example see

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.

Geoff Binns selected this answer as the correct answer

1 vote

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.


Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019

Question asked: Apr 20 '16, 4:45 a.m.

Question was seen: 2,650 times

Last updated: Apr 26 '16, 2:23 a.m.

Confirmation Cancel Confirm