Policies Stuck in Awaiting Approval

Kyle S_1
Giga Contributor

New to ServiceNow and trying to clean up some older/stale policies.  I have three records in "Awaiting Approval" state but do not show in the approval queue for the listed "Approver."   How might I approach setting the records back to a Draft state to be updated with current verbiage?

Thanks!

1 ACCEPTED SOLUTION

Jan Spurlin
ServiceNow Employee
ServiceNow Employee

If you don't want to write a script.  Look at who is listed in the Reviewer's field and the Owner's field.

I think things changed in a recent version and since many versions are backwards compatible it depends on what Policy and Compliance version you are on.

In the version I am on - the person listed as the owner has visibility to a UI Action button labeled "Back to Draft".  I think in earlier versions that button may have also been visible to the Reviewers.

Jan

View solution in original post

4 REPLIES 4

Sulabh Garg
Mega Sage
Mega Sage

Hello Kyle,

As you said its old data, so you can write one time 'fix script' for the same.

Below can be the fix script

var grSCP = new GlideRecord('sn_compliance_policy');
grSCP.addEncodedQuery("numberINPOL0020002,POL0020197"); //mention all 3 policy number here
grSCP.query();
while (grSCP.next()) {
grSCP.state = "draft";
grSCP.autoSysFields(false);
grSCP.update();
}

Hope it helps!!

 

Please Mark Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Jan Spurlin
ServiceNow Employee
ServiceNow Employee

If you don't want to write a script.  Look at who is listed in the Reviewer's field and the Owner's field.

I think things changed in a recent version and since many versions are backwards compatible it depends on what Policy and Compliance version you are on.

In the version I am on - the person listed as the owner has visibility to a UI Action button labeled "Back to Draft".  I think in earlier versions that button may have also been visible to the Reviewers.

Jan

Sulabh Garg
Mega Sage
Mega Sage

Hi Kyle,

I hope my answer helps you and script works for you, Alternatively you can also use the solution suggested by Jan and see if reviewer has the visibility on the UI action "Back to Draft".

Please do let me know if you have nay issue with the provided script and any follow up is required here.

 

Please Mark Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

 

Please Mark Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Kyle S_1
Giga Contributor

Both of these replies were very helpful.  It turned out that the "Back to Draft" button was hidden for that specific policy state.  I was able to work with our SN admin to make it visible.  Thank you very much for your replies and insight!

 

Kyle