In our last post in this series, Sunder blogged about saving the resolved reason. (You’ve probably figured out that we have “tag-teamed” this blog series). So anyway, here is the next item in the series. Customers have asked us:
“I only want the creator of the bug to be able to close the bug … no one else” “Oh … and by the way, I want to be able to have an administrator override and close a bug for anyone”
“I only want the creator of the bug to be able to close the bug … no one else”
“Oh … and by the way, I want to be able to have an administrator override and close a bug for anyone”
Another valid request, again which is not handled well with standard implementations of work item rules. In fact, Sunder and I tried and tried to figure this one out, and simply couldn’t come up with a solution.
Then I offered a $5 reward to a developer who said he could figure it out. Well I’m out $5, but now have something to offer to solve this problem. Worth the $5? You can be the judge…
1) Create ClosedByValidation field and add the following rules:
<FIELD name="Closed By Validation" refname="Demo.ClosedByValidation" type="String"> <COPY from="currentuser" /> <FROZEN not=“[project]\Project Administrators”/> </FIELD>
2) Add the following rules to Closed state
<STATE value="Closed"> <FIELDS> <FIELD refname="Demo.ClosedByValidation"> <COPY from="currentuser" /> </FIELD> </FIELDS> </STATE>
3) Add the ClosedByValidation field to the form, so it looks like this. Note how I’ve displayed both the “Created By” field and the “ClosedByValidation” field.
Pretty clever Mr. Developer.