opencti icon indicating copy to clipboard operation
opencti copied to clipboard

[frontend] fix handling of references enforcment in containers

Open JeremyCloarec opened this issue 1 year ago • 8 comments

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...

JeremyCloarec avatar Apr 17 '24 09:04 JeremyCloarec

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

nino-filigran avatar May 20 '24 07:05 nino-filigran

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.

codecov[bot] avatar May 24 '24 13:05 codecov[bot]

What is happening with this fix ? Can we review it or it will be split in 2 ?

SarahBocognano avatar May 28 '24 09:05 SarahBocognano

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

JeremyCloarec avatar May 28 '24 09:05 JeremyCloarec

Capture d'écran 2024-06-14 120843

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

SarahBocognano avatar Jun 14 '24 10:06 SarahBocognano

image

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"}"

SarahBocognano avatar Jun 14 '24 10:06 SarahBocognano

image

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

JeremyCloarec avatar Jun 14 '24 12:06 JeremyCloarec

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

SarahBocognano avatar Jun 27 '24 08:06 SarahBocognano