Skip to content

[backend/frontend] Fix partial delete of documents (#3467) #3590

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

Draft
wants to merge 44 commits into
base: release/current
Choose a base branch
from

Conversation

savacano28
Copy link
Contributor

@savacano28 savacano28 commented Jul 10, 2025

Proposed changes

  • Remove underline in ContextLink
  • Fetch list of entities related to document and show them in the delete dialog
  • If user click on delete -> Document and all the relations are deleted too
  • Update composant DialogDeleteDocument
image

Testing Instructions

  1. Add a document
  2. Related this document to any channle, challenge. paylaod, inject
  3. Try delete the document
  4. Check behavior: Force delete (document is still referenced in other entities) (was ok, or any backend error?)
  5. Check minio (:10001)

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@savacano28 savacano28 self-assigned this Jul 10, 2025
@savacano28 savacano28 added the filigran team use to identify PR from the Filigran team label Jul 10, 2025
@savacano28 savacano28 force-pushed the bugfix/3467 branch 2 times, most recently from a142e8a to 8f98a4f Compare July 11, 2025 12:34
@savacano28 savacano28 marked this pull request as ready for review July 11, 2025 14:22
Copy link

codecov bot commented Jul 11, 2025

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.

Project coverage is 44.52%. Comparing base (2a277c7) to head (f73c87d).

Files with missing lines Patch % Lines
...java/io/openbas/rest/document/DocumentService.java 89.47% 2 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/current    #3590      +/-   ##
=====================================================
+ Coverage              44.42%   44.52%   +0.10%     
- Complexity              2801     2821      +20     
=====================================================
  Files                    762      765       +3     
  Lines                  23138    23180      +42     
  Branches                1610     1610              
=====================================================
+ Hits                   10278    10322      +44     
+ Misses                 12284    12283       -1     
+ Partials                 576      575       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@savacano28 savacano28 changed the title [backend] Fix partial delete of documents [backend/frontend] Fix partial delete of documents (#3467) Jul 11, 2025
@savacano28 savacano28 requested a review from antoinemzs July 15, 2025 10:42
@antoinemzs
Copy link
Contributor

antoinemzs commented Jul 15, 2025

Is there a reason why most relationships are not part of the data model and thus not collectable via property access, rather than specialised native SQL queries ?

@savacano28 savacano28 marked this pull request as draft July 15, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants