[ 
https://issues.apache.org/jira/browse/UNOMI-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17111094#comment-17111094
 ] 

Noa commented on UNOMI-336:
---------------------------

Create segment cURL:

curl --location --request POST 'http://localhost:8181/cxs/segments' \curl 
--location --request POST 'http://localhost:8181/cxs/segments' \--header 
'Content-Type: application/json' \--header 'Authorization: Basic 
a2FyYWY6a2FyYWY=' \--header 'Content-Type: text/plain' \--data-raw '\{    
"metadata": {        "id": "pastEvents",        "name": "pastEvents",        
"scope": "systemscope",        "description": "Past event segment.",        
"readOnly": true    },    "condition": \{        "parameterValues": {           
 "subConditions": [                {                    "type": 
"pastEventCondition",                    "parameterValues": {                   
     "minimumEventCount": 2, "numberOfDays": 30, "eventCondition": { 
"parameterValues": { "eventTypeId": "type1" }, "type": "eventTypeCondition" }   
                 }                }            ],            "operator": "and"  
      },        "type": "booleanCondition"    }}'

> Segment with PastEventCondition doesn't work properly 
> ------------------------------------------------------
>
>                 Key: UNOMI-336
>                 URL: https://issues.apache.org/jira/browse/UNOMI-336
>             Project: Apache Unomi
>          Issue Type: Bug
>          Components: core
>            Reporter: Noa
>            Priority: Major
>             Fix For: 1.5.2
>
>
> Segment with PastEventCondition doesn't work properly when adding events with 
> a customized timestamp. 
> Steps to reproduce:
> 1) Create a segment with a pastEventCondition with minimumEventCount = 2 and 
> numberOfDays = 30d.
> 2) Create an event through the context servlet, that satistfies the 
> eventCondition of the pastEventCondition.
> A profile should have been created, with 
> systemProperies.pastEvents.eventTriggered.... = 1.
> 3)  Create another event, from the same profile, that satisfies the 
> eventCondition, BUT send a "timestamp" parameter in the URL with a timestamp 
> that is over 30d ago. 
> This event didn't occure in the last 30d, so the profile shouldn't be part of 
> the segment.
> Expected result: the profile's segments list should be empty and 
> systemProperies.pastEvents.eventTriggered should be 1.
> Actual result: The profile segments list contains the segment and 
> systemProperies.pastEvents.eventTriggered = 2



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

Reply via email to