Skip to content

Comments

[SNT-302] models for rule-based scenarios#190

Merged
tdethier merged 5 commits intomainfrom
SNT-302_models-for-rule-based-assignments
Feb 19, 2026
Merged

[SNT-302] models for rule-based scenarios#190
tdethier merged 5 commits intomainfrom
SNT-302_models-for-rule-based-assignments

Conversation

@tdethier
Copy link
Member

What problem is this PR solving?

Add new models and update existing ones for rule-based scenarios

Related JIRA tickets

SNT-302

Changes

  • Add ScenarioRule, ScenarioRuleInterventionProperties
  • Update InterventionAssignment with the value fields from BudgetAssumptions
  • Deprecate BudgetAssumptions

How to test

  • it's just changes at the model level, there's no manual testing for now
  • you can create objects in your DB to make sure that the constraints are working properly if you want

Print screen / video

/

Notes

Doc

/

@tdethier tdethier self-assigned this Feb 17, 2026
@tdethier tdethier added the enhancement New feature or request label Feb 17, 2026
@tdethier tdethier force-pushed the SNT-302_models-for-rule-based-assignments branch from 9f662fa to 1b2084b Compare February 17, 2026 16:35

# This should match format for jsonlogic_to_exists_q_clauses in iaso.utils.jsonlogic
# This should only support one level: e.g. {"and": [{"==": [{"var": "gender"}, "F"]}, {"<": [{"var": "age"}, 25]}]}
matching_criteria = models.JSONField(blank=False, null=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will introduce a JSONSchemaField in another PR, maybe you could re-use that once merged to validate this schema :)

Copy link
Contributor

@Bewi Bewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tdethier tdethier merged commit c2f7548 into main Feb 19, 2026
2 checks passed
@tdethier tdethier deleted the SNT-302_models-for-rule-based-assignments branch February 19, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants