bot icon indicating copy to clipboard operation
bot copied to clipboard

[BUG] Moving a ticket into a newly created category results in an error

Open nielslangerak opened this issue 11 months ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

Right now when I move a ticket, I get the following error message: image

In the logs I see

24/03/24 22:53:18 [ERROR] (COMMANDS) f6600aede1
24/03/24 22:53:18 [ERROR] (COMMANDS) "move" command execution error: TypeError: Cannot read properties of undefined (reading 'total') at MoveSlashCommand.run (/home/container/src/commands/slash/move.js:109:4)

Expected Behavior

It should move the ticket to the right category without any errors

Steps To Reproduce

  1. Open a ticket
  2. Move the ticket
  3. You get the error

Environment

- OS: Ubuntu 22.04
- Node: 18.19.0
- NPM: 'Unkown command: "npm"' - So I guess none
- Bot: 4.0.13

Anything else?

No response

nielslangerak avatar Mar 24 '24 22:03 nielslangerak

@nielslangerak This happens when you have just created a category. You can either

  1. restart or resync (type sync in the bot's console)
  2. create a ticket in the new category before moving the existing ticket

eartharoid avatar Mar 24 '24 23:03 eartharoid

The restart did it!

nielslangerak avatar Mar 25 '24 22:03 nielslangerak

Reopening because it should be straightforward to make this somewhat common use work without error.

eartharoid avatar Mar 26 '24 04:03 eartharoid