Question

I have this state in a work item that can only be set if one of four other fields (dates) are filled in. It doesn't matter which one of the four, if at least one is filled then the state can be set.

Example:

This scenario lets you change the work item state:

DateA   01/05/2012
DateB   '
DateC   '
DateD   '

This one too:

DateA   '
DateB   01/05/2012
DateC   01/05/2012
DateD   '

This one doesnt:

DateA   '
DateB   '
DateC   '
DateD   '

I thought of using WHEN, but it won't work, as I can't write "WHEN this AND WHEN that"

Any suggestions?

EDIT: Plus, I can't use the rule "PROHIBITEDVALUES" for System.State, so any approach will be useless, I believe.

EDIT: The only way one could do that, I believe (but without touching core fields) would be n WHENs and n WHENNOTs where n is the date fields count. Then, with the aid of two globallists (one dummy, and one with the prohibited values) maybe one could lock the field for every date missing, and then unlock for every date not missing (and thus fulfilling this scenario). Anyway, this can't work in my case because of error TF26062: Rule 'insert-rule-here' is not supported for the field 'System.State'.

RESOLUTION: I'm taking Gregg Boer's answer because you can't really can't "AND" together conditional clauses. But my solution itself was to attach an event to the event subscription tool where I set the state back whenever some user changes it without filling a date. Then he receives an e-mail explaining why his change was denied. Not the ideal solution, but I can't think of anything else.

Was it helpful?

Solution

I am sorry, but there is no way to do what you are asking with TFS work item rules. You can't "AND" together conditional clauses like you need to in the example above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top