[Tips & Tricks]Preventing Request Closure when there are Pending Approvals

[Tips & Tricks]Preventing Request Closure when there are Pending Approvals

One of our ServiceDesk Plus customers requested a function to prevent service requests from being closed if it has a pending approval.


Scenario:
In the customer's environment, they have configured a set of Service request templates that have a single-stage approval set up in the workflow. However, they have found a few Service requests being closed without the approval being approved (regardless of approval status is "to be sent" or "pending approval"). We provided a custom script to prevent requests in "pending approval" status from being closed.

Solution: 
  • Download the attachment "Negate_request_close.txt".
  • Login ServiceDesk Plus as Admin, go to Admin tab --> Request Custom Functions --> Custom Actions --> New Custom Function, paste the content from the attachment, and save it with a name (Negate Request).
  • Configure a business rule as in the screenshot given below. Admin tab --> Service Catalog --> Service Catalog - Business Rules.



  • Whenever a user tries to close a request in a pending approval status, they will be prevented with a popup alert as in the screenshot given below.



Thank you for your time, I hope you find this article useful!


                New to ADManager Plus?

                  New to ADSelfService Plus?