Coder Social home page Coder Social logo

Comments (13)

lndrtrbn avatar lndrtrbn commented on September 26, 2024 3

There is an other strange behavior on this boolean is_family. It is required but not highlighted in red if nothing is configured for it and the mapper is considered valid by the backend. Nonetheless when trying to import data after, the import fails.

@nino-filigran

I'm for fixing this issue in the same time

from opencti.

lndrtrbn avatar lndrtrbn commented on September 26, 2024 2

To have a bit of context: same component is used between default value in CSV mapper and settings customization.

Indeed we should have false if off and true if on. I think the label of the toggle is misleading as we can understand it as "should we have a default value" instead of "we have a default value, the value is: true/false".

It would be more intuitive (IMO) with something like: Default value: false <toggle> true instead of <toggle> Default value.
Or even a group off two buttons [true|false] instead of a toggle.

from opencti.

lndrtrbn avatar lndrtrbn commented on September 26, 2024 1

I found the solution yesterday and add it directly in this PR

from opencti.

labo-flg avatar labo-flg commented on September 26, 2024

probably a simple if clause on the value to check if it's defined, that just if(value) or something. We must check for undefined/null only if the false value is legit.

from opencti.

CelineSebe avatar CelineSebe commented on September 26, 2024

"is family" attribute is customizable in settings too:
image

from opencti.

lndrtrbn avatar lndrtrbn commented on September 26, 2024

@nino-filigran the bug is not only a UI issue. In fact for now we can set only TRUE as default value for boolean attributes, we cannot set FALSE. To do it we need change how we save the default value in elastic (not a big change).

  • bug also on Settings > Customization (Example: malware/is family)

from opencti.

nino-filigran avatar nino-filigran commented on September 26, 2024

So to recap, If I understand correctly,

  • currently when toggling on this CTA it basically means "use TRUE as default value".
  • However, when toggling off, it means "do not apply a default value".

If so, I agree that it's misleading.
As a result, we should indeed fix it by applying your suggestion Default value: false true

from opencti.

lndrtrbn avatar lndrtrbn commented on September 26, 2024

You understand correctly. Agreed on the fix then 😊

from opencti.

nino-filigran avatar nino-filigran commented on September 26, 2024

Many thanks for your help @lndrtrbn

from opencti.

CelineSebe avatar CelineSebe commented on September 26, 2024

EDIT: issues solved
To precise, it is highlighted in red the first time the field is_family is opened, but it isn't red after it is filled and unfilled.

@nino-filigran
Another issue:
The default value for the field name seems to be configured in the CSV mapper and customization, but it isn't.

image
image
Has a bug already been reported on this issue?

from opencti.

lndrtrbn avatar lndrtrbn commented on September 26, 2024

@nino-filigran

Find an other issue about the management of boolean values:

  • I have set a default value for the boolean attribute in Settings > Customization (for example True for malware.is_family),
  • I have created a CSV mapper to map malwares without specifying a default value at CSV mapper level,
  • I launch an import of a file where the column is_family has missing data for some malwares.

Expected output: import success with the default value set in Customization.
Actual output: import fails.

from opencti.

nino-filigran avatar nino-filigran commented on September 26, 2024

@lndrtrbn Do you want me to open a bug for this, or do you tackle this weird behavior as part of this?

from opencti.

nino-filigran avatar nino-filigran commented on September 26, 2024

Thanks again for your help

from opencti.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.