Skip to content

Commit 44a276a

Browse files
authored
Set update sets to complete (#1557)
1 parent 4782f24 commit 44a276a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Executing this script would help the administrators to set all the inprogress update sets to complete state.
2+
3+
Most of the times this script comes in handy before setting up the instance to patching or upgradation as during that time updatesets need to be set complete and a backup has to be taken.
4+
5+
Be cautious while using this script as this sets all the update sets whose state is inprogress and name does not start with "default" to complete.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//note : this script is going to mark all the update sets that are in progress to complete so make sure the query meets your requirements.
2+
3+
var gr = new GlideRecord("sys_update_set"); //querying the update sets table to check update sets which are in progress
4+
gr.addEncodedQuery("state=in progress^nameNOT LIKEdefault");
5+
6+
gr.setValue("state","complete"); //marking them to complete and updating multiple records using updateMultiple()
7+
gr.updateMultiple();

0 commit comments

Comments
 (0)