OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
6.51k stars 958 forks source link

Mandatory field on External Reference is not correctly handle on the creation form #8612

Open Lhorus6 opened 1 month ago

Lhorus6 commented 1 month ago

Description

When I create an External Reference the form doesn't correctly display the information that the URL is mandatory

image

Environment

OCTI 6.3.4

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Go on a Report
  2. Scroll down to add an external ref
  3. Create an Ext Ref -> fill in the "name" field but not the "URL" and try to create

Expected Output

Example with the name field:

image

Additional information

Maybe related, it's not noted as mandatory in the CSV mapper either:

image

romain-filigran commented 1 month ago

Two corrective actions to handle:

  1. Mark the URL field as mandatory in the external reference creation form
  2. Mark the URL field as mandatory in the CSV mapper form
Kedae commented 1 month ago

URL is not mandatory, you have to put either an External Id, a URL or a File I think ?

romain-filigran commented 1 month ago

You right @Kedae.

Lhorus6 commented 1 month ago

Oh ok, it's mandatory: Name AND (url OR external id OR file) ?

It may be complicated, but it has to be understandable.

Kedae commented 1 month ago

May be we can try to address this matter with the "mandatory fields" work from community ? @frapuks @Jipegien @romain-filigran

frapuks commented 1 month ago

Currently, we have 3 fields touched by this issue :

We need to have an external id OR an url.

The FBI PR is to display a star ater mandatory fields, and take account of the custom mandatory properties. But, we don't have customizable fields on External Ref.

I try to add a condition to set a external id as mandatory if url is empty : image But we can't use the same solution for the second field url because this is a cycling condition...

=> https://github.com/OpenCTI-Platform/opencti/compare/master...issue/8612

SarahBocognano commented 3 weeks ago

Was it fixed with issue/8612 ?

frapuks commented 3 weeks ago

No, i create this branch only for trying a solution for a fast example. I don't work more on this issue.