Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Organization chart : When a manager's contact file is deleted, it crashes the organization chart display #3058

Open
Jerome-Herbinet opened this issue Oct 19, 2022 · 3 comments · May be fixed by #3077
Labels

Comments

@Jerome-Herbinet
Copy link
Member

Jerome-Herbinet commented Oct 19, 2022

Describe the bug

While testing this new feature, I deleted the manager of Dark Sidious and then the chart cannot be displayed anymore.
To make it appear again, I have to delete de "Manager" field entry in the Dark Sidious contact file.

2022-10-19_11-51

Steps to reproduce

  1. Create an organization chart
  2. Delete a contact which is manager of another contact
  3. See that you cannot display the chart anymore
  4. Delete the manager field entry in the contact file which was underneath the previously deleted contact in the chart
  5. See that the chart can be displayed again

Expected behavior

When a "manager" contact is deleted, all dependencies should be deleted in order to avoid chart explosion.

Actual behavior

It crashes because of remaining broken dependencies.

Contact version

5.0.1

Operating system

CentOS

PHP engine version

PHP 8.0

Web server

Nginx

Database

MySQL

Additional info

No response

@ChristophWurst ChristophWurst added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage labels Oct 19, 2022
@ChristophWurst
Copy link
Member

@bkrith any idea how we could solve this? Ignore all non-existent references when we build the graph?

Additionally, at contact deletion from within this app, we could scan all other contacts of the same address book and delete any references.

@bkrith
Copy link
Contributor

bkrith commented Oct 23, 2022

I will check it.. i think the issue is that we scan for the relationships but we don't check if the manager exists.. maybe on deletion we need to scan contacts and make null manager deleted id references.

@bkrith bkrith linked a pull request Oct 23, 2022 that will close this issue
@bkrith
Copy link
Contributor

bkrith commented Oct 23, 2022

@ChristophWurst I have a PR for this please review it when you have time. (#3077)

@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Dec 16, 2022
@Jerome-Herbinet Jerome-Herbinet changed the title Nextcloud 25 organization chart : When a manager's contact file is deleted, it crashes the organization chart display Organization chart : When a manager's contact file is deleted, it crashes the organization chart display May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📄 To do
Development

Successfully merging a pull request may close this issue.

3 participants