Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI bugfix for Rules: When-Then: text attribute with specific operator did not show correct field for value (#1708)

Dominique Kleeven60aed8d0b05d
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
index e966ed016..211bd66f5 100644
--- a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
+++ b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
@@ -844,12 +844,13 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
negated: value === AssetQueryOperator.NOT_CONTAINS
};
} else if (valueDescriptor.jsonType === "string") {
- predicate = {
- predicateType: "string",
- negate: value === AssetQueryOperator.NOT_CONTAINS,
- match: AssetQueryMatch.CONTAINS
- };
- }
+ predicate = {
+ predicateType: "string",
+ negate: value === AssetQueryOperator.NOT_CONTAINS,
+ match: AssetQueryMatch.CONTAINS
+ };
+ }
+ break;
// operator without value predicate - since timestamp is being used rather than attribute value
case AssetQueryOperator.NOT_UPDATED_FOR:
attributePredicate.timestampOlderThan = "";