Skip to content

MS-1077 Only return templates of the correct format for matching#1268

Merged
luhmirin-s merged 1 commit into
release/2025.2.0from
hotfix/MS-1077-template-query-fix
Jul 17, 2025
Merged

MS-1077 Only return templates of the correct format for matching#1268
luhmirin-s merged 1 commit into
release/2025.2.0from
hotfix/MS-1077-template-query-fix

Conversation

@luhmirin-s
Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2025.2.0

Root cause analysis (for bugfixes only)

First known affected version: 2025.2.0

  • When fetching candidates for matching, we are filtering for "subject where any sample matches format". Which is correct, when a record can only have samples of the same format.
  • With the capability to update records, there is a case when a record has samples of multiple formats for the same modality (e.g. updating templates from ROC v1 to v3).
  • Attempting to match v1 template against v3 crashes ROC SDK.

Notable changes

  • Add filtering to return only the templates in the requested format.
  • Luckily, this does not affect the Room version of record storage.

Testing guidance

  • Make a couple of records with ROC v1. Ask Yoann to update the record with v3 template. Run identification.

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

Note: Creating the PR while I am working on the unit tests to speed the process up a bit, since the setup to test the Realm data source is convoluted and might take a while.

@luhmirin-s luhmirin-s requested review from a team, BurningAXE, TristramN, alex-vt, alexandr-simprints, meladRaouf and ybourgery and removed request for a team July 17, 2025 14:21
@cla-bot cla-bot Bot added the ... label Jul 17, 2025
@luhmirin-s luhmirin-s force-pushed the hotfix/MS-1077-template-query-fix branch from 8ea5ec0 to 0b54382 Compare July 17, 2025 14:55
@sonarqubecloud
Copy link
Copy Markdown

@meladRaouf
Copy link
Copy Markdown
Collaborator

@luhmirin-s It might be helpful to include a test in RealmEnrolmentRecordLocalDataSourceTest as well.

@luhmirin-s
Copy link
Copy Markdown
Contributor Author

@meladRaouf I agree, but the methods in question do not seem to be testable without significant refactoring. The existing tests for the method appear not to be testing anything. Lets push for the removal of realm instead :D

@luhmirin-s luhmirin-s merged commit fef39e7 into release/2025.2.0 Jul 17, 2025
12 checks passed
@luhmirin-s luhmirin-s deleted the hotfix/MS-1077-template-query-fix branch July 17, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants