You would use a validation rule on the Service Request object which looks at the approval or Approval Vote Tracking object. I would also consider looking at your workflow if doing this, to ensure that if a vote is carried out an approved then any outstanding votes are cancelled using one of the run for child actions.
I would start by using the incident validation rule as a template, depending of if you are checking the approval or individual votes will determine if you have to check one or 2 sets of children.
Thanks! I know that we do have the cancel part in place.
I have Fulfilled working:
$(Status not in ("Closed", "Fulfilled") ||
$(Status in ("Approved", "Cancelled", "Denied"))))
The problem with "closed" is that there's another rule that is cancelling all outstanding items. It then "cancelled" the approvals and then allows Closed to be a valid status and doesn't error out.
So you need another rule for closed tickets? Sorry slightly confused on what you would like to happen at this point as your expression covers both closed and resolved. If you need more help please let us know.
Yes. the Rule doesn't work on closed. It still allows you. This is because there's another business rule that is closing all outstanding Approvals, tasks, etc. if you close a ticket to avoid orphaned items. It cancels the pending approval. And then this rule tries to check it, sees no pending approvals and allows you to "closed" a ticket. Hence someone could jump the gun and complete a ticket, flip to closed, and we'd be none the wiser that it never finished approvals.
How about stopping analysts from closing requests completely and letting them move the request to the fulfilled stage and then let the system do the closure part. This way you can just hide the Closed status from them and not administrators (all workflows etc will run as Internal Services which is an admin account therefore will get access to the closed status.)
On the Status pick list add this as a condition: Status Not Equal to $(if CurrentUserRole() != "Admin" then "Closed" else "")