Skip to content

fix: [DHIS2-22007] comparison between the new and the cached rule messages - #4709

Open
superskip wants to merge 2 commits into
masterfrom
DHIS2-22007
Open

fix: [DHIS2-22007] comparison between the new and the cached rule messages#4709
superskip wants to merge 2 commits into
masterfrom
DHIS2-22007

Conversation

@superskip

@superskip superskip commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the implementation of a function called getRuleMessages.
The purpose of this function is to decide if two objects ruleMessage and prevRuleMessage are identical.

There was a case that was handled incorrectly by the previous implementation: the case where the keys of ruleMessage is a subset of the keys of prevRuleMessage.

The new implementation is based on the assumption that the keys of the two objects must always be a subset of the values of the messageStateKeys-object ('error', 'warning', 'errorOnComplete', and 'warningOnComplete').

@superskip
superskip requested a review from a team as a code owner August 22, 2026 12:25
@github-actions

Copy link
Copy Markdown

@henrikmv henrikmv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice fix, @superskip!

@sonarqubecloud

Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants