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

Fix access to context variables in UI rules #318

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

jimtng
Copy link
Contributor

@jimtng jimtng commented Jul 24, 2024

#133 implemented context access for when UI rules/scripts are manually run/triggered. We didn't encounter any issues for that particular method of execution, because there is no trigger module ID involved.

In UI based rules, $ctx keys are prepended with the module id of the trigger that triggered the rule execution (e.g. item state change), so currently the library won't find a match for, e.g. event because it's stored as $ctx["<moduleid>.event"]

It appears that nobody is using this library for UI based rules, otherwise we would've received bug reports/complaints.

@jimtng jimtng added the bug Something isn't working label Jul 24, 2024
@jimtng jimtng marked this pull request as draft July 24, 2024 13:31
@jimtng jimtng force-pushed the ui-context branch 4 times, most recently from 7f22f7b to ea2e963 Compare July 24, 2024 13:53
@jimtng jimtng marked this pull request as ready for review July 24, 2024 13:57
@jimtng jimtng requested a review from ccutrer July 24, 2024 14:08
@ccutrer ccutrer merged commit e6c9943 into openhab:main Jul 24, 2024
21 checks passed
@jimtng jimtng deleted the ui-context branch July 24, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants