From 1edaab51a33a77388048c47625b9681c5ab457fd Mon Sep 17 00:00:00 2001 From: mapedraza <40356341+mapedraza@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:33:18 +0200 Subject: [PATCH 1/2] add-attrname-jexl-limitation --- doc/manuals/orion-api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/manuals/orion-api.md b/doc/manuals/orion-api.md index 3b2951b08c..493c5ce72a 100644 --- a/doc/manuals/orion-api.md +++ b/doc/manuals/orion-api.md @@ -3097,6 +3097,7 @@ As failsafe behaviour, evaluation returns `null` in the following cases: - The unitary minus operator is not working properly, e.g. the following expression doesn't work (it failsafes to `null`): `A||-1`. However, the following alternatives are working: `A||0-1` and `A||'-1'|parseInt)` - Negation operator `!` (supported in original JavaScript JEXL) is not supported +- Attributes names using JEXL operators (I.E: `:` or `-`) may lead to undesired expression results. For example, an atribute named `temperature-1`, when you use it as part of an expression, it would be the result uf substracting 1 to the value of the attribute `temperature`, if it is defined, or `null`, if the attribute `temperature` doesn't exist. ## Oneshot Subscriptions From c10e83c2e4c7f9a798f0afee599cfebe555f13d8 Mon Sep 17 00:00:00 2001 From: mapedraza <40356341+mapedraza@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:47:25 +0200 Subject: [PATCH 2/2] Update doc/manuals/orion-api.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fermín Galán Márquez --- doc/manuals/orion-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manuals/orion-api.md b/doc/manuals/orion-api.md index 493c5ce72a..1bcf31e589 100644 --- a/doc/manuals/orion-api.md +++ b/doc/manuals/orion-api.md @@ -3097,7 +3097,7 @@ As failsafe behaviour, evaluation returns `null` in the following cases: - The unitary minus operator is not working properly, e.g. the following expression doesn't work (it failsafes to `null`): `A||-1`. However, the following alternatives are working: `A||0-1` and `A||'-1'|parseInt)` - Negation operator `!` (supported in original JavaScript JEXL) is not supported -- Attributes names using JEXL operators (I.E: `:` or `-`) may lead to undesired expression results. For example, an atribute named `temperature-1`, when you use it as part of an expression, it would be the result uf substracting 1 to the value of the attribute `temperature`, if it is defined, or `null`, if the attribute `temperature` doesn't exist. +- Attribute names and entity identifiers using JEXL operators (eg. `:` or `-`) may lead to undesired expression results. For example, an attribute named `temperature-basic`, when you use it as part of an expression, it would be the result of subtracting the value of the attribute `basic` to the value of the attribute `temperature` (or `null`, if `temperature` or `basic` don't exist) instead the value of the attribute `temperature-basic`. ## Oneshot Subscriptions