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

Admin delete user application crashes #109

Closed
francisedulab opened this issue Nov 21, 2018 · 2 comments
Closed

Admin delete user application crashes #109

francisedulab opened this issue Nov 21, 2018 · 2 comments

Comments

@francisedulab
Copy link

  • [ x] BUG

What happened:
When admin deletes user that has tickets or conversations the application crashes

What did you expect to happen:
If user is deleted then their history also should be deleted

How to reproduce it (as minimally and precisely as possible):
Create a admin user create a normal user account raise tickets or chat (do both ideally) and delete the user from the accounts tab

Anything else we need to know?:
This is the console log output

TypeError: Cannot read property '_id' of undefined
at /trudesk/src/helpers/viewdata/index.js:254:42
at /trudesk/node_modules/mongoose/lib/model.js:4451:16
at (anonymous function).call (/trudesk/node_modules/mongoose/lib/query.js:3606:7)
at process.nextTick (/trudesk/node_modules/mongoose/lib/helpers/query/completeMany.js:35:39)
at args.(anonymous function)

@polonel polonel self-assigned this Nov 21, 2018
@polonel polonel added the bug label Nov 21, 2018
@polonel
Copy link
Owner

polonel commented Nov 21, 2018

The account should be marked as disabled if the user has tickets. Which I confirmed that.
However, if the user has active conversations this crash does occur.

Thank you for the bug report, working on a fix.

@stale
Copy link

stale bot commented Dec 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 1, 2018
polonel added a commit that referenced this issue Dec 3, 2018
## [1.0.3](v1.0.2...v1.0.3) (2018-12-03)

### Bug Fixes

* **accounts:** crash if user was deleted with active conversations [#109](#109) ([6ea0ad4](6ea0ad4))
* **assets:** security fix ([b081965](b081965))
* **install:** server crash due to invalid middleware ([88367d9](88367d9))
* **mobile:** secure assets not loading ([dca823e](dca823e))
* **reports:** unable to download reports [#106](#106) ([a2cdb7f](a2cdb7f))
* **sass:** not compiling for install server ([e0f744d](e0f744d))
* **static:** file access path ([568c343](568c343))
* **style:** disabled classes applied incorrectly ([884519c](884519c))
* **style:** incorrect border style ([5edfb0f](5edfb0f))
* **styles:** incorrect styles ([ae0d82f](ae0d82f))
* **tickettype:** crash when deleting ticket type [#113](#113) ([dc4d335](dc4d335))

### Reverts

* **static:** files path var ([dd440e0](dd440e0))
@polonel polonel closed this as completed Dec 3, 2018
@polonel polonel added production and removed review labels Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants