Require Work Item Approval by type or state?
I have a situation for Work Item Approvals:
Developers deliver to Test stream, which flow to Prod stream. There is a separate Emergency Test stream, which also flows to Prod.
1 Developers can deliver to Test streams with no approval
2 Manager approval is required to deliver to Prod stream
3 No approvals are required to deliver Emergency changes to Prod (these are true emergencies, programs that might need to be changed in the middle of the night to complete a batch cycle, and will be reviewed by management in the morning)
I created a Work Item type for Emergency, using the default workflow for now but I can change it.
No problem with #1, #2 is accomplished by enabling ‘require work item approval’ operational behavior in the Prod team, which owns the Prod stream.
One solution I have for #3 is to create a query rather than use the operational behavior condition, and allow WI Type=emergency OR Work Items with Approved state to be delivered. I’m a bit uncomfortable using this since it is bypassing an otherwise useful advisor, and anyone with query edit rights could change the query and bypass approvals completely.
I also thought of having a separate Emergency stream for Production without the condition (the build would write to usual production libraries), since it is also likely that we won't be saving this version of the program and a more complete fix will be worked on during daylight.
Requiring approvals by type or state would solve my problem. Enhancement #174982 sounds like what I need, but there hasn't been any recent activity.
I'm using 4.x
Can anyone think of another way to do this?Thanks.
One answer
One option is to configure the require approvals advisor so that it can be overruled by the user. This way, the regular process of requiring approvals would be enforced, but if a developer really needed to push something through, he could. I don't know of a way to require approvals by type or state using an out of the box advisor. You may be able to implement your own advisor similar to the one described here: http://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ .