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

Update related contacts on manager deletion #3077

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bkrith
Copy link
Contributor

@bkrith bkrith commented Oct 23, 2022

Fixes: #3058

Before deletion remove property managersName reference for each related contact.

@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 5.12%. Comparing base (9d1befd) to head (5a29d36).
Report is 1082 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #3077       +/-   ##
============================================
- Coverage     31.45%   5.12%   -26.33%     
+ Complexity      253     251        -2     
============================================
  Files           110     110               
  Lines          1863    1852       -11     
  Branches        217     217               
============================================
- Hits            586      95      -491     
- Misses         1162    1642      +480     
  Partials        115     115               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -70,7 +70,7 @@
</template>

<!-- main contacts details -->
<ContactDetails :contact-key="selectedContact" :contacts="sortedContacts" />
<ContactDetails :contact-key="selectedContact" :sorted-contacts="sortedContacts" :contacts="contacts" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change really necessary for the fix?

@ChristophWurst
Copy link
Member

@bkrith please do the following two things

  1. Move sort changes out into a separate PR. We can release this fix with the next minor/major. The fix in this PR will be backported.
  2. Add logic to catch externally deleted manager. This app is just one of the possible applications that access Nextcloud's CardDAV APIs. If someone deletes a manager on their phone, Thunderbird, etc, then we also don't want to cause an error. I would suggest to just ignore references to other contacts that no longer exist. We don't necessarily have to update all cards.

@ChristophWurst ChristophWurst added bug Something isn't working 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 16, 2022
@ChristophWurst
Copy link
Member

@bkrith friendly 🏓 . Please have a look at the review feedback above when you have time :)

@Jerome-Herbinet
Copy link
Member

Hi @bkrith ! As @ChristophWurst said, can you take a look at the review feedback above ? Thanks !

@Adaniieel15
Copy link

Hello, I hope you are well.

In our Nextcloud instance we removed the main administrator and the org chart stopped showing.

I was wondering if they will be looking for a solution for this soon? Or if there are some steps I can take to fix it?

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

Successfully merging this pull request may close these issues.

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