fix: rules with a class scope now fire when no datasets of that class are present - #561
Draft
enrymather-Verisian wants to merge 2 commits into
Draft
fix: rules with a class scope now fire when no datasets of that class are present#561enrymather-Verisian wants to merge 2 commits into
enrymather-Verisian wants to merge 2 commits into
Conversation
YetiGonk
approved these changes
Jul 21, 2026
YetiGonk
reviewed
Jul 21, 2026
|
|
||
| # for a study-level rule that check for the presence of an entire class of datasets, | ||
| # when none of the required datasets exist, the rule still needs to execute | ||
| if not any_suitable_found and all_datasets: |
There was a problem hiding this comment.
just add and extra "and is_study_sensitivity" to the end of this if statement and you're good <3
enrymather-Verisian
marked this pull request as draft
July 21, 2026 11:46
Author
|
Converted to draft - will keep for the future but for now we'll use a simpler, less restrictive approach, i.e. to just change rule scope to ALL, which makes rules like CORE-002056 work without engine changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rules focusing on a specific domain class (e.g. TRIAL DESIGN for CORE-002056) were silently skipped when the submission contained no datasets belonging to that class. This happened because, if none of the datasets passed the
within_rule_scopeclass filter, the rule never fired.Fixed by detecting if every available dataset has been filtered out by the class filter and then running the rule once against any available dataset, so study-level checks can fire successfully.