You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by GitBox <gi...@apache.org> on 2020/05/17 17:08:33 UTC
[GitHub] [unomi] sergehuber commented on a change in pull request #160: Unomi-336 fix past event count using custom timestamp
sergehuber commented on a change in pull request #160:
URL: https://github.com/apache/unomi/pull/160#discussion_r426283203
##########
File path: plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetEventOccurenceCountAction.java
##########
@@ -80,7 +86,16 @@ public int execute(Action action, Event event) {
pastEvents = new LinkedHashMap<>();
event.getProfile().getSystemProperties().put("pastEvents", pastEvents);
}
- pastEvents.put((String) pastEventCondition.getParameter("generatedPropertyKey"), count + 1);
+
+ //increase the counter by 1 if the current event fulfils the time condition
Review comment:
I think this comment needs to be a bit clearer, something like:
```suggestion
// Only increase the counter by 1 if the current event is in the now-numberofDays to now range
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org