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

[PB-3189] fix: correctly remove children folders from lookup table on delete #442

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

apsantiso
Copy link
Collaborator

@apsantiso apsantiso commented Dec 13, 2024

When you delete a folder, its children folders are not being removed correctly from the lookup table, so searching was showing non accesible folders to the users.

This script just modifies 1 line of the function triggered to fix this behavior. For those who want to compare the changes: original migration here

Old condition:
ELSIF OLD.deleted = false AND NEW.removed = false AND (NEW.deleted = true OR NEW.removed = true) THEN

New condition
ELSIF (OLD.deleted = false OR OLD.removed = false) AND (NEW.deleted = true OR NEW.removed = true) THEN


How to Reproduce the Issue:

  1. Move the following folder structure to the trash:
  • Parent Folder
    • Child 1
    • Child 2
  1. Permanently delete the Parent Folder from the trash.

  2. Search for Child 1 or Child 2 using the search bar.

Expected Result:

Child 1 and Child 2 should not appear in the search results.

Actual Result:

Child 1 and Child 2 still appear in the search results.

@apsantiso apsantiso self-assigned this Dec 13, 2024
@apsantiso apsantiso added the bug Something isn't working label Dec 13, 2024
@apsantiso apsantiso requested a review from sg-gs December 13, 2024 04:10
@apsantiso apsantiso force-pushed the fix/remove-deleted-children-folders-from-lookup-table branch from 7a0fb2c to 399917d Compare December 13, 2024 04:12
@apsantiso apsantiso changed the title [PB-3189] fix: remove children folders from lookup table [PB-3189] fix: correctly remove children folders from lookup table on delete Dec 16, 2024
@sg-gs
Copy link
Member

sg-gs commented Dec 16, 2024

Migration run @apsantiso

@sg-gs sg-gs merged commit 4d408aa into master Dec 16, 2024
11 checks passed
@sg-gs sg-gs deleted the fix/remove-deleted-children-folders-from-lookup-table branch December 16, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-for-preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants