Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when releasing end user access licenses #1287

Closed
mountaindude opened this issue Oct 24, 2024 · 1 comment · Fixed by #1282
Closed

Error when releasing end user access licenses #1287

mountaindude opened this issue Oct 24, 2024 · 1 comment · Fixed by #1282
Labels

Comments

@mountaindude
Copy link
Collaborator

What version of Butler are you using?

13.1.0

What version of Node.js are you using? Not applicable if you use the standalone version of Butler.

What command did you use to start Butler?

What operating system are you using?

What CPU architecture are you using?

What Qlik Sense versions are you using?

Describe the Bug

Dry run enabled.
Not clear where "u" is used, most likely in some imported module.

2024-10-24T08:50:35.294Z info: QLIKSENSE LICENSE RELEASE PROFESSIONAL: Dry-run enabled. No licenses will be released
2024-10-24T08:50:35.320Z info: [QSEOW] INFLUXDB QLIK SENSE LICENSE STATUS: Sent aggregated Qlik Sense license status to InfluxDB
2024-10-24T08:50:35.371Z error: [QSEOW] QLIKSENSE LICENSE RELEASE: TypeError: u is not iterable
2024-10-24T08:50:35.372Z error: [QSEOW] QLIKSENSE LICENSE RELEASE: TypeError: u is not iterable

Expected Behavior

No response

To Reproduce

No response

@mountaindude
Copy link
Collaborator Author

Caused by missing check if neverReleaseUsers indeed contains any data.

In qliksense_license.js around line 620

            // Check do-not-release user names
            for (const user of neverReleaseUsers) {
                if (license.user.userDirectory === user.userDir && license.user.userId === user.userId) {
                    doNotRelease = true;
                    doNotReleaseReason = 'User is in the neverRelease.user list';
                    break;
                }
            }

Should be

            // Check do-not-release user names if there are any
            if (neverReleaseUsers?.length > 0) {
              for (const user of neverReleaseUsers) {
                  if (license.user.userDirectory === user.userDir && license.user.userId === user.userId) {
                      doNotRelease = true;
                      doNotReleaseReason = 'User is in the neverRelease.user list';
                      break;
                  }
              }
            }

Also do similar change before accessing neverReleaseTags, neverReleaseCustomProperties and neverReleaseUserDirectories arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant