Skip to content

Commit 164b2f3

Browse files
authored
Improve "Background Script - Update All Store Apps" (#1061)
1 parent 9c0a811 commit 164b2f3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Background Scripts/Update All Store Apps/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Select one of the options below to run.
4141

4242
## OPTION 1: Find out how many apps are available to upgrade
4343

44-
1. ***Paste this line at the bottom of the script.***
44+
1. ***Replace the last line by pasting this line at the bottom of the script.***
4545

4646
```javascript
4747
new upgradeUtil().countUpgrades();
@@ -215,4 +215,4 @@ Copy and paste this URL from the output of the script into a browser tab to view
215215

216216
[^2]:**Product Docs: Continuous Integration/Continuous Delivery (CICD) API:** [https://docs.servicenow.com/csh?topicname=cicd-api.html&version=latest](https://docs.servicenow.com/csh?topicname=cicd-api.html&version=latest)
217217

218-
[^3]:**Product Docs: Create a Connection & Credential alias:** [https://docs.servicenow.com/csh?topicname=connection-alias.html&version=latest](https://docs.servicenow.com/csh?topicname=connection-alias.html&version=latest)
218+
[^3]:**Product Docs: Create a Connection & Credential alias:** [https://docs.servicenow.com/csh?topicname=connection-alias.html&version=latest](https://docs.servicenow.com/csh?topicname=connection-alias.html&version=latest)

Background Scripts/Update All Store Apps/update_all_apps.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ upgradeUtil.prototype = {
3232
var versionStr = appsGr.getValue('version');
3333
var assignedVersionStr = appsGr.getValue('assigned_version');
3434
var latestVersionStr = appsGr.getValue('latest_version');
35+
// Check if Latest Version field is populated, break the current loop if so as update cannot be checked
36+
if (!latestVersionStr) break;
3537
// Convert the strings to arrays of integers
3638
var versionArr = versionStr.split('.').map(Number);
3739
var assignedVersionArr = assignedVersionStr.split('.').map(Number);

0 commit comments

Comments
 (0)