I was able to find a suitable solution last night.
This solution really works fine for my need, because it allows me to add the group as exempt from the rule, so that the members of the group, say QA, as well as the Creator can close the work item while the other members of the team do not.
Link: here
As stated:
- Create a ClosedByValidation field and add the following rules.
<FIELD name="Closed By Validation" refname="Demo.ClosedByValidation" type="String"> <OPY from="currentuser" /> <FROZEN not="[project]\Project Administrators"/> </FIELD>
- Add the following rules to the closed state:
<STATE value="Closed"> <FIELDS> <FIELD refname="Demo.ClosedByValidation"> <COPY from="currentuser" /> </FIELD> </FIELDS> </STATE>
- Add the ClosedByValidation field to the form so that it looks like this. Notice how Ive displayed the Created field and the ClosedByValidation field.
How it works
- The ClosedByValidation field copies the Created value to directly when the work item is created.
- Then it immediately freezes the field rule (using FROZEN), which states that it cannot change.
- NOTE. The FROZEN rule is due to the fact that it does NOT apply to the project administrators, giving them the opportunity to redefine.
- When the item is closed, then the current user is copied to the Closed field.
- If the value of ClosedByValidations remains the same (original Created By), then all is well.
- If the ClosedByValidations value has changed, then the FROZEN violation rule will be displayed, as you see in the screenshot above.
Scott source share