Work Item state change rules in TFS - Any way to use “AND”s or “OR”s?

女生的网名这么多〃 提交于 2019-12-22 20:12:42

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/8747031/work-item-state-change-rules-in-tfs-any-way-to-use-ands-or-ors

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!