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

Deleting a user account breaks the dashboard #552

Closed
1 of 2 tasks
mrt-prodz opened this issue Aug 19, 2022 · 4 comments
Closed
1 of 2 tasks

Deleting a user account breaks the dashboard #552

mrt-prodz opened this issue Aug 19, 2022 · 4 comments

Comments

@mrt-prodz
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST?:

  • BUG
  • FEATURE

What happened:
After removing a user ticket, group, account the dashboard is now showing an empty page.

3.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'map')
    at DashboardContainer.value (6.js:1:516439)
    at allowStateChanges (3.js:1:1657819)
    at 3.js:1:1635859
    at trackDerivedFunction (3.js:1:1666797)
    at _proto.track (3.js:1:1673192)
    at DashboardContainer.reactiveRender [as render] (3.js:1:1635812)
    at target.render (3.js:1:1633991)
    at qi (3.js:1:1034386)
    at pi (3.js:1:1034185)
    at ck (3.js:1:1074770)

What did you expect to happen:
Deleting an account after removing their ticket and group should not affect the dashboard.

How to reproduce it (as minimally and precisely as possible):
This is not easy to reproduce since I have removed accounts multiple times before this and the dashboard was fine.

  • delete account X (putting account in disabled state)
  • remove their ticket(s)
  • remove their group
  • delete the ticket(s) in the settings -> backup / restore
  • enable and delete X account.

Anything else we need to know?:
I don't understand what could be left in the database causing this issue. I went into debug mode and used /debug/cache/refresh to see if it would fix the issue but it didn't.

Is there anything I could check in the database regarding the deleted account ?

Environment:

  • Trudesk Version: (Docker) polonel/trudesk:1.2.5
  • OS (e.g. from /etc/os-release): (Docker) Alpine Linux v3.15.4
  • Node.JS Version: v16.14.2
  • MongoDB Version: (Docker) mongo:5.0-focal
  • Is this hosted on cloud.trudesk.io: No
@polonel
Copy link
Owner

polonel commented Aug 20, 2022

I was able to reproduce it. Working on a fix...

@polonel
Copy link
Owner

polonel commented Aug 20, 2022

This is related to disabling the "Show overdue tickets" setting. It fails to load the overdue ticket widget if the setting is disabled.
Fix incoming.

@mrt-prodz
Copy link
Contributor Author

Good find @polonel, my mistake for thinking it was after I deleted a user. I have indeed disabled the Show overdue tickets for the first time recently and didn't connect the dots.

polonel added a commit that referenced this issue Aug 22, 2022
## [1.2.6](v1.2.5...v1.2.6) (2022-08-22)

### Bug Fixes

* **dashboard:** fails to load if show overdue tickets is disabled [#552](#552) ([afd9caf](afd9caf))
* **messages:** react ui fix ([a0bb151](a0bb151))
* **ui:** react ui fix for accounts ([7cff1c9](7cff1c9))
@mrt-prodz
Copy link
Contributor Author

Thank you @polonel , 1.2.6 fixed the issue.

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

No branches or pull requests

2 participants