Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Rules engine - actions not reset when no rulesets remains activated #2609

Closed
mrednic-1A opened this issue Dec 18, 2024 · 1 comment
Closed
Labels
bug Something isn't working triage

Comments

@mrednic-1A
Copy link
Contributor

Package name

rules-engine

Package version

10.4.*

Reproduction steps

Have a ruleset with only one rule driven by a linked component (a page).
The success element is a change of localization key. This key should be used in a component which is visible when navigating through the app (the header component is a good option).
Navigate to the page where the ruleset becomes active -> the localization key is changed
Leave that page -> the localization key is still changed

Current result

The localization key updated by the rules engine is not reset when the ruleset becomes inactive, the localizationOverride store is containing the loc keys change.

Expected result

The localization key should be reset when the ruleset becomes inactive

Additional comments

No response

@mrednic-1A mrednic-1A added bug Something isn't working triage labels Dec 18, 2024
mrednic-1A added a commit that referenced this issue Dec 18, 2024
## Proposed change

Emit an empty array of actions to execute when no ruleset remains active
during the executions of rules engine.
Nowadays there is no emission so the already applied actions are not
reset.

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

*- No issue associated -*

* 🐛 Fix #2609 
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
@matthieu-crouzet
Copy link
Contributor

Fixed by #2610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants