It's all about the answers!

Ask a question

Precondition for Discard - need operationId

Jason Fregien (58910) | asked Sep 19 '11, 11:53 a.m.
I need to create a PreCondition plugin for the Discard action. I would like to ensure that the changeSet is not associated to a workItem if the changeSet is being discarded.

I've done some Precondition plugins before, but I am not sure what operationId I can use to hook into the Discard action. Can anyone help?


One answer

permanent link
Nick Edgar (6.5k711) | answered Sep 22 '11, 3:44 p.m.
Hi Jason,

It does not appear that Discard is a process-enabled operation (doesn't show in the permissions or operation behaviour section in the process specification). The only permission constraint is that you need to be the owner of the workspace.

Note that inclusion (or not) of a change set in a workspace really has no bearing on whether or not it's associated with a work item. For example, I might complete a change set, associate it with the work item, then discard it from my development workspace while it's under review.

But your point is well-taken: from a work item, there's no easy way to distinguish change sets that are still of interest from those that aren't.

I suggest filing an enhancement request against Source Control.

Your answer

Register or to post your answer.