Skip to content

Deleting a user account breaks the dashboard #552

Closed
@mrt-prodz

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions