Skip to content

Conversation

@xavimolloy
Copy link
Collaborator

Description

Link the JIRA issue.

Please provide a clear definition of the problem and explain your solution.

Copilot AI review requested due to automatic review settings December 18, 2025 11:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses ANDROAPP-7428 by adding enrollment status filtering to ensure that only events linked to active enrollments are processed throughout the application. The fix prevents inactive enrollment data from being used in stock management operations and program rule evaluations.

Key Changes:

  • Added EnrollmentStatus.ACTIVE filters to enrollment queries across multiple modules
  • Updated event filtering logic to exclude events from inactive enrollments
  • Ensured program rules and stock calculations only consider active enrollment data

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
stock-usecase/src/main/java/org/dhis2/android/rtsm/services/rules/RuleValidationHelperImpl.kt Added enrollment status filter when retrieving current enrollment for rule validation
stock-usecase/src/main/java/org/dhis2/android/rtsm/services/StockManagerImpl.kt Added enrollment status filters in getStockOnHand method and getEnrollment method to exclude inactive enrollments
dhis2-mobile-program-rules/src/main/java/org/dhis2/mobileProgramRules/RulesRepository.kt Added enrollment status filter when querying attribute values for program rules

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants