[MRI violations] Fix multiple rows for file protocol violations not resolvable #8662
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief summary of changes
This fixes a bug where the violation could not be resolved when there is more than one
Protocol Violationreturned for a file/timerun combination. The fixes include the following:Protocol Violationfor a given file (the list of violations will be displayed when clicking on theProtocol Violationlink.mri_violations_logmatching thetimeRun/mincFileand update the resolution status for all matching entries in theviolations_resolvedtable.Testing instructions
For the raisinbread dataset, the following images match what this PR is fixing:
assembly/300170/V1/mri/native/demo_300170_V1_dwi65_001.mncassembly/300170/V1/mri/native/demo_300170_V1_dwi25_001.mncIn current 25 code, should see two rows displayed in the main menu filter with the same content for the example images listed above and it should not be possible to save the resolution status for those files.
In code pulled from this PR, only one row per file will be displayed in the main menu filter and the resolution status will save. Look into the violations_resolved table and you should see 2 entries added for the file that was resolved.
Link(s) to related issue(s)