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

Make sure confidence level is always between 0 and 100 #5759

Closed
labo-flg opened this issue Jan 31, 2024 · 0 comments · Fixed by #5787
Closed

Make sure confidence level is always between 0 and 100 #5759

labo-flg opened this issue Jan 31, 2024 · 0 comments · Fixed by #5787
Assignees
Labels
feature use for describing a new feature to develop solved use to identify issue that has been solved (must be linked to the solving PR) upsert & deduplication Linked to system aiming to keep most qualified data
Milestone

Comments

@labo-flg
Copy link
Member

issue

Following #4304, we need to make sure that the value saved in the platform for any max_confidence fields (user, groups) are always between 0 and 100.

We cannot enforce this in the schema mapping in elastic, so we need to check this in the backend code:

test cases

This can only be tested through API calls, the UI already crop the value between 0 and 100.
This concerns operations:

  • user add/edit
  • group add/edit

Attention, edition can be plain object value, or field patch with only the max_confidence and corresponding object_path.

Example with edit group:

{
  "id": "00b4e453-40e2-451d-8c32-09fd0532d80f",
  "input": {
    "key": "group_confidence_level",
    "object_path": "group_confidence_level/max_confidence",
    "value": 45
  }
}

{
  "id": "00b4e453-40e2-451d-8c32-09fd0532d80f",
  "input": {
    "key": "group_confidence_level",
    "value": {
      "max_confidence": 45,
      "overrides: []
    }
  }
}
@labo-flg labo-flg added the feature use for describing a new feature to develop label Jan 31, 2024
@labo-flg labo-flg added this to the Release 6.0.0 milestone Jan 31, 2024
@labo-flg labo-flg self-assigned this Jan 31, 2024
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Feb 5, 2024
@Jipegien Jipegien added the upsert & deduplication Linked to system aiming to keep most qualified data label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature use for describing a new feature to develop solved use to identify issue that has been solved (must be linked to the solving PR) upsert & deduplication Linked to system aiming to keep most qualified data
Projects
None yet
3 participants