Skip to content
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

CSV mapper configuration can mix up entity types fields #5751

Closed
labo-flg opened this issue Jan 30, 2024 · 5 comments · Fixed by #5758
Closed

CSV mapper configuration can mix up entity types fields #5751

labo-flg opened this issue Jan 30, 2024 · 5 comments · Fixed by #5758
Assignees
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)

Comments

@labo-flg
Copy link
Member

Description

When creating/updating a CSM mapper, changing the entity type in a representation can lead to strange behavior, where fields from the previous type are somehow still present after changing the entity type.

This makes incorrect configuration possible, as these fields do not exist for these entity types.

Environment

TESTING

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Create a new CSV mapper
  2. Add a representaion
  3. Select 'URL' entity type > pay attention to the fields displayed
  4. Select 'File' > pay attention to the fields displayed
  5. Re-select 'URL > pay attention to the fields displayed

Expected Output

The form shall display the URL attributes, same as the first time.

Actual Output

The attribute "observable content" is somehow still present (it was in the "File" form).

Screenshots (optional)

image
image
image

@labo-flg labo-flg added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Jan 30, 2024
@labo-flg
Copy link
Member Author

cc @Goumies and @lndrtrbn

Your current work on the CSV mappers could fix this maybe?

@SamuelHassine SamuelHassine added this to the Release 5.12.27 milestone Jan 30, 2024
@nino-filigran nino-filigran removed the needs triage use to identify issue needing triage from Filigran Product team label Jan 31, 2024
@lndrtrbn
Copy link
Member

I'll have a look in my current PR about CSV Mapper

@lndrtrbn lndrtrbn self-assigned this Jan 31, 2024
@lndrtrbn
Copy link
Member

Ok it seems the issue came for the specific case of File where there are two attributes with the same name obsContent, don't know what it means yet and one of them is not removed when changing to an other entity

@richard-julien
Copy link
Member

obsContent is always defined once in the file model. Maybe a problem of view reset

@lndrtrbn
Copy link
Member

lndrtrbn commented Jan 31, 2024

Well it is defined once in schema attribute and once in schema ref, with the same name. So as we use both in the csv mapper, we have an issue

EDIT: as the issue is related to the schema and not the csv mapper I won't fix it in my PR but in a dedicated issue after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
5 participants