It's all about the answers!

Ask a question

Can we force a comment in a work item when changing Planned For?

Mike Shkolnik (9657160143) | asked Feb 11 '13, 1:43 p.m.
A long shot, but I thought I'd ask to be sure. I know how to force some things when a work item is saved, but we need need to force a comment when a particular field is changed, in this case Planned For, not every time a work item is saved.

One answer

permanent link
sam detweiler (12.5k6189201) | answered Feb 11 '13, 2:37 p.m.
I was going to suggest you can do it with the Required Attributes for Condition  advisor.
this uses a javascript true/false result condition script u write to trigger the advisor

but I don't think javascript can see the prior state..

so to do this you would have to write your own advisor

Millard Ellingsworth commented Feb 11 '13, 6:17 p.m.

The other tricky part is being able to tell one Comment from another and determining if one related to the change in Planned For exists (or not, so you can force it). And since you can change Planned For from a plan page, you may introduce some unexpected conditions where a work item becomes dirty and unsaveable (perhaps multiple items if the change was made to a group). If someone is experimenting with plans to see how things line up with different approaches, this could be really annoying. 

Your answer

Register or to post your answer.