You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "David Griffon (Jira)" <ji...@apache.org> on 2021/02/23 16:49:00 UTC

[jira] [Created] (UNOMI-439) Patch rule is not working properly.

David Griffon created UNOMI-439:
-----------------------------------

             Summary: Patch rule is not working properly.
                 Key: UNOMI-439
                 URL: https://issues.apache.org/jira/browse/UNOMI-439
             Project: Apache Unomi
          Issue Type: Bug
    Affects Versions: 2.0.0, 1.5.5
            Reporter: David Griffon


As the mapping of {{data}} in the patch mapping is not defined entirely, the first enry creates it. 
https://github.com/apache/unomi/blob/master/persistence-elasticsearch/core/src/main/resources/META-INF/cxs/mappings/patch.json#L31
{code}
"properties": {
    "patchedItemId": {
      "type": "text"
    },
    "patchedItemType": {
      "type": "text"
    },
    "operation": {
      "type": "text"
    },
    "data": {
      "type": "object"
    },
    "lastApplication": {
      "type": "date"
    }
  }
{code}

The side effect of this is that if a patch provide {{text}} as data, any other object that is not text cannot be stored. 

Step to reproduce

Update a condition from a rule after a patch has been provided for any condition. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)