It's all about the answers!

Ask a question

Precondition to prevent "starting" a work item?

Mahari Hill (4861138229) | asked Dec 08 '15, 7:29 a.m.
edited Dec 08 '15, 7:29 a.m.


I have a PM that wants to tie three tasks together with predecessor and successor. So work item 1, 2, and 3. They don't want work item 2 or 3 to be started until 1 is closed. Is this possible? The same for 3 until 1 and 2 have been closed.

Is there a better solution?

2 answers

permanent link
sam detweiler (12.5k6191201) | answered Dec 08 '15, 7:38 a.m.
you would have to write a server side extension to accomplish this, but it is possible.

Ralph has an extension on his blog that closes the parent when the children workitems are closed

to develop these extensions, see the extensions workshop

permanent link
Ralph Schoon (62.3k33643) | answered Dec 08 '15, 7:42 a.m.
There are no built in advisers that would prevent this. It would be possible to create an advisor that triggers on changing the state away from new, follows the link and checks if the work item(s) in the chain before are in progress already.

I don't think it is wise to do this, but that is just my personal opinion. If you over-regulate your processes, this does not make the users like them any better.

Anyway, here is some code for a follow action that has a lot of the code you would need. an advisor looks similar to except for the interface and the return data, the API's used are typically the same. 

Your answer

Register or to post your answer.