It's all about the answers!

Ask a question

How to prevent advancing work item status if checklist (boolean) item isn't true


Alex Akilov (1211023) | asked Aug 26 '14, 5:45 p.m.
edited Aug 26 '14, 5:46 p.m.
 We have a custom boolean attribute in a work item (Unit Test Completed).  We'd like to prevent the work item from being resolved unless that checklist item is true (i.e. it should be required when transitioning to the final state).  This seems like it should be simple to do but I can't seem to find the formula to do this easily.  Do we have to extend RTC to do it?

One answer



permanent link
sam detweiler (12.4k6175200) | answered Aug 26 '14, 7:02 p.m.
no. .make it a required field..

use the required field team configuration in the process configuration for that project.

see

Dynamic required attributes

here

https://jazz.net/library/article/537


Comments
Alex Akilov commented Aug 27 '14, 8:28 a.m.

Sam,


Thanks for your answer.
Does that work for boolean fields?  I see mention in the comments of the above article on how to set the Default value for a boolean.  Does the required attribute check for a value other than default?


sam detweiler commented Aug 27 '14, 8:46 a.m.

Booleans are difficult in general.. because false (usually the default) is ALSO a valid value.

but it appears u intend for this field to be SET (true) before moving to the next state..
in which case this should work properly.

you can pick the state and resolution code that this field is required to be set for


Alex Akilov commented Aug 29 '14, 2:18 p.m.

Unfortunately, it appears that boolean fields don't even appear in the list of fields that you can make a required attribute.  So we may end up having to implement this field as a drop down with Yes/No values and then run a validator that checks for Yes (via a regex).


sam detweiler commented Aug 29 '14, 3:48 p.m.

well, that is disappointing.. I am sure that I built a required field for a boolean in 3.0.1 (now too long ago)..  I know that we had to change this to a tri state field later cause the actual state was not known til very late in the workflow.

I do see that on 4.0.6 you cannot use a boolean for a required field.

Your answer


Register or to post your answer.