[frontend] fix handling of references enforcment in containers
Proposed changes
- [x] fix enable references in containers entity lines popover
- [x] fix enable references in containers knowledge graph (ask for references when removing from graph)
- [x] fix malware analysis creation and edition when external references are enforced
- [x] fix enable references behavior for organization sharing (skip reference in case of orga?)
Related issues
- #6074
Checklist
- [x] I consider the submitted work as finished
- [x] I tested the code for its functionality
- [ ] I wrote test cases for the relevant uses case (coverage and e2e)
- [ ] I added/update the relevant documentation (either on github or on notion)
- [ ] Where necessary I refactored code to improve the overall quality
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...
after a discussion ith @JeremyCloarec we decided to split the fix in 2: the following bug will tackle the rest, since this bug has been opened since a while. Also, the missing cases are a bit bigger to tackle and impact is less important. https://github.com/OpenCTI-Platform/opencti/issues/7023
Codecov Report
Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
Project coverage is 67.56%. Comparing base (
09bc774) to head (f0c03c0).
| Files | Patch % | Lines |
|---|---|---|
| ...pencti-platform/opencti-graphql/src/domain/stix.js | 0.00% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #6727 +/- ##
=======================================
Coverage 67.55% 67.56%
=======================================
Files 567 567
Lines 69944 69946 +2
Branches 5935 5937 +2
=======================================
+ Hits 47250 47257 +7
+ Misses 22694 22689 -5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What is happening with this fix ? Can we review it or it will be split in 2 ?
What is happening with this fix ? Can we review it or it will be split in 2 ?
it can be reviewed, the remaining things to fix will be done on a separate PR and will link to this issue https://github.com/OpenCTI-Platform/opencti/issues/7023
When I try to edit a report, I submit an external reference as required, the mutation executes but the form doesn't disappear. It stays blocked like on the screenshot
When trying to add a new entity in knowledge graph I have a validation error but the message is empty in snackbar. (Although I have it in the backend "errors":[{"attributes":{"field":"references","genre":"BUSINESS","http_status":500,"message":"You must provide at least one external reference to update"}"
When trying to add a new entity in knowledge graph I have a validation error but the message is empty in snackbar. (Although I have it in the backend "errors":[{"attributes":{"field":"references","genre":"BUSINESS","http_status":500,"message":"You must provide at least one external reference to update"}"
I couldn't reproduce, were your backend/frontend completely rebuilt when switching to the branch? This looks like the behavior without the modifications of the branch
Update: Behavior is working well for me, the only thing remaining is that the form doesn't disappear when update is selected. Need to check the updater
