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 in qseow user-activity-bucket-cp-create: When user has been active, but longer ago than largest activity bucket #546

Closed
mountaindude opened this issue Nov 18, 2024 · 0 comments · Fixed by #534
Labels
bug Something isn't working enhancement New feature or request

Comments

@mountaindude
Copy link
Contributor

What version of Ctrl-Q are you using?

4.0.0

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

No response

What command did you use to start Ctrl-Q?

What operating system are you using?

What CPU architecture are you using?

What Qlik Sense versions are you using?

Describe the Bug

The bug occurs when

  1. A user has been active some time ago (e.g. 50 days)
  2. The largest defined user activity bucket on the command line is smaller than 50 (in this case).
2024-11-18T06:28:28.700Z info: -----------------------------------------------------------
2024-11-18T06:28:28.718Z info: | Ctrl-Q
2024-11-18T06:28:28.718Z info: | 
2024-11-18T06:28:28.718Z info: | Version      : 4.0.0
2024-11-18T06:28:28.718Z info: | Log level    : info
2024-11-18T06:28:28.718Z info: | 
2024-11-18T06:28:28.718Z info: | Command      : user-activity-bucket-cp-create
2024-11-18T06:28:28.718Z info: |              : create custom property and populate it with values ("activity buckets") indicating how long ago users last logged into Sense
2024-11-18T06:28:28.719Z info: | 
2024-11-18T06:28:28.719Z info: | Run Ctrl-Q with the '--help' option to see a list of all available options for this command.
2024-11-18T06:28:28.719Z info: | 
2024-11-18T06:28:28.719Z info: | https://github.com/ptarmiganlabs/ctrl-q
2024-11-18T06:28:28.719Z info: ----------------------------------------------------------
2024-11-18T06:28:28.719Z info: 
2024-11-18T06:28:28.722Z info: == Step 1: Create custom property for tracking user activity in QMC
2024-11-18T06:28:28.831Z info:   Successfully retrieved 37 custom properties from QSEoW
2024-11-18T06:28:28.875Z info: Successfully created custom property "ctrl_q_User_activity_buckets"
2024-11-18T06:28:28.905Z info: 
2024-11-18T06:28:28.906Z info: == Step 2 : Getting user activity for each license type enabled via the command line...
2024-11-18T06:28:28.948Z info:   Successfully retrieved 20 user activity records for license type "Analyzer" from QSEoW
2024-11-18T06:28:28.990Z info:   Successfully retrieved 0 user activity records for license type "Analyzer Time" from QSEoW
2024-11-18T06:28:29.016Z info:   Successfully retrieved 0 user activity records for license type "Login" from QSEoW
2024-11-18T06:28:29.047Z info:   Successfully retrieved 20 user activity records for license type "Professional" from QSEoW
2024-11-18T06:28:29.071Z info:   Successfully retrieved 0 user activity records for license type "User" from QSEoW
2024-11-18T06:28:29.072Z info: 
2024-11-18T06:28:29.072Z info: == Step 3 : Calculate days since last activity for each user...
2024-11-18T06:28:29.073Z info: 
2024-11-18T06:28:29.073Z info: == Step 4 : Get user data from Sense, one batch at a time (each batch is 25 users)...
2024-11-18T06:28:29.073Z info:   Total number of users to process: 40
2024-11-18T06:28:29.073Z info:   Total number of batches: 2
2024-11-18T06:28:29.073Z info: 
2024-11-18T06:28:29.073Z info:   >> Batch 1 of 2 (users 1 to 25)
2024-11-18T06:28:29.073Z info:      Calculating activity buckets
2024-11-18T06:28:29.249Z info:      Preparing user activity custom property
2024-11-18T06:28:29.251Z error: Error creating user activity custom property: TypeError: Cannot read properties of undefined (reading 'toString')
    at createUserActivityBucketsCustomProperty (file:///Users/goran/code/ctrl-q/src/lib/cmd/qseow/createuseractivitycp.js:544:105)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Command.<anonymous> (file:///Users/goran/code/ctrl-q/src/lib/cli/qseow-cp-user-activity-bucket.js:31:32)
    at async Command.parseAsync (/Users/goran/code/ctrl-q/node_modules/commander/lib/command.js:1092:5)
    at async file:///Users/goran/code/ctrl-q/src/ctrl-q.js:160:5

Expected Behavior

Add new, automatically created bucket with a name of largest bucket size appended with a "+".

For example, if largest bucket size is 30, the automatically created bucket would be "30+"

To Reproduce

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant