What happened:
Failed to create ticket from email: ValidationError: status: Cast to ObjectId failed for value "0" (type number) at path "status" because of "BSONTypeError"
0|trudesk | 07-23-2023 15:06:14 [199958] warn: tickets validation failed: status: Cast to ObjectId failed for value "0" (type number) at path "status" because of "BSONTypeError" - ValidationError: tickets validation failed: status: Cast to ObjectId failed for value "0" (type number) at path "status" because of "BSONTypeError"
0|trudesk | at model.Document.invalidate (/etc/trudesk/node_modules/mongoose/lib/document.js:2985:32)
0|trudesk | at model.$set (/etc/trudesk/node_modules/mongoose/lib/document.js:1457:12)
0|trudesk | at model.$set (/etc/trudesk/node_modules/mongoose/lib/document.js:1140:16)
0|trudesk | at model.Document (/etc/trudesk/node_modules/mongoose/lib/document.js:161:12)
0|trudesk | at model.Model (/etc/trudesk/node_modules/mongoose/lib/model.js:115:12)
0|trudesk | at new model (/etc/trudesk/node_modules/mongoose/lib/model.js:4825:15)
0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/model.js:3132:22
0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/model.js:3168:7
0|trudesk | at Array.forEach ()
0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/model.js:3167:15
0|trudesk | at promiseOrCallback (/etc/trudesk/node_modules/mongoose/lib/helpers/promiseOrCallback.js:10:12)
0|trudesk | at Mongoose._promiseOrCallback (/etc/trudesk/node_modules/mongoose/lib/index.js:1220:10)
0|trudesk | at Function.create (/etc/trudesk/node_modules/mongoose/lib/model.js:3097:23)
0|trudesk | at async.auto.handleCreateTicket (/etc/trudesk/src/mailer/mailCheck.js:359:22)
0|trudesk | at runTask (/etc/trudesk/node_modules/async/dist/async.js:1153:17)
0|trudesk | at /etc/trudesk/node_modules/async/dist/async.js:1091:35
0|trudesk | at processQueue (/etc/trudesk/node_modules/async/dist/async.js:1101:17)
0|trudesk | at taskComplete (/etc/trudesk/node_modules/async/dist/async.js:1118:13)
0|trudesk | at /etc/trudesk/node_modules/async/dist/async.js:1146:21
0|trudesk | at /etc/trudesk/node_modules/async/dist/async.js:327:20
0|trudesk | at /etc/trudesk/src/mailer/mailCheck.js:301:30
0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/helpers/promiseOrCallback.js:25:16
What did you expect to happen:
For it to make a ticket
How to reproduce it (as minimally and precisely as possible):
Is this a BUG REPORT or FEATURE REQUEST?:
What happened: Failed to create ticket from email: ValidationError: status: Cast to ObjectId failed for value "0" (type number) at path "status" because of "BSONTypeError" 0|trudesk | 07-23-2023 15:06:14 [199958] warn: tickets validation failed: status: Cast to ObjectId failed for value "0" (type number) at path "status" because of "BSONTypeError" - ValidationError: tickets validation failed: status: Cast to ObjectId failed for value "0" (type number) at path "status" because of "BSONTypeError" 0|trudesk | at model.Document.invalidate (/etc/trudesk/node_modules/mongoose/lib/document.js:2985:32) 0|trudesk | at model.$set (/etc/trudesk/node_modules/mongoose/lib/document.js:1457:12) 0|trudesk | at model.$set (/etc/trudesk/node_modules/mongoose/lib/document.js:1140:16) 0|trudesk | at model.Document (/etc/trudesk/node_modules/mongoose/lib/document.js:161:12) 0|trudesk | at model.Model (/etc/trudesk/node_modules/mongoose/lib/model.js:115:12) 0|trudesk | at new model (/etc/trudesk/node_modules/mongoose/lib/model.js:4825:15) 0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/model.js:3132:22 0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/model.js:3168:7 0|trudesk | at Array.forEach ()
0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/model.js:3167:15
0|trudesk | at promiseOrCallback (/etc/trudesk/node_modules/mongoose/lib/helpers/promiseOrCallback.js:10:12)
0|trudesk | at Mongoose._promiseOrCallback (/etc/trudesk/node_modules/mongoose/lib/index.js:1220:10)
0|trudesk | at Function.create (/etc/trudesk/node_modules/mongoose/lib/model.js:3097:23)
0|trudesk | at async.auto.handleCreateTicket (/etc/trudesk/src/mailer/mailCheck.js:359:22)
0|trudesk | at runTask (/etc/trudesk/node_modules/async/dist/async.js:1153:17)
0|trudesk | at /etc/trudesk/node_modules/async/dist/async.js:1091:35
0|trudesk | at processQueue (/etc/trudesk/node_modules/async/dist/async.js:1101:17)
0|trudesk | at taskComplete (/etc/trudesk/node_modules/async/dist/async.js:1118:13)
0|trudesk | at /etc/trudesk/node_modules/async/dist/async.js:1146:21
0|trudesk | at /etc/trudesk/node_modules/async/dist/async.js:327:20
0|trudesk | at /etc/trudesk/src/mailer/mailCheck.js:301:30
0|trudesk | at /etc/trudesk/node_modules/mongoose/lib/helpers/promiseOrCallback.js:25:16
What did you expect to happen:
For it to make a ticket
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment: