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 2021/05/10 14:05:50 UTC

[GitHub] [unomi] amitco1 opened a new pull request #309: feat(UNOMI-482-setPropertyAction-eventArrivalTime):added eventArrival…

amitco1 opened a new pull request #309:
URL: https://github.com/apache/unomi/pull/309


   …Time
   
   PR Title format: 
   
       [UNOMI-XXX] Pull request title with JIRA reference
   
   **Please** add a meaningful description for your change here
   
   ----
   
   **Please** following this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/UNOMI) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
    - [ ] Format the pull request title like `[UNOMI-XXX] - Title of the pull request`
    - [ ] Provide integration tests for your changes, especially if you are changing the behavior of existing code or adding
          significant new parts of code.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. 
          Copy the description to the related JIRA issue
    - [ ] Run `mvn clean install -P integration-tests` to make sure basic checks pass. A more thorough check will be 
           performed on your pull request automatically.
    
   Trivial changes like typos do not require a JIRA issue (javadoc, project build changes, small doc changes, comments...). 
    
   If this is your first contribution, you have to read the [Contribution Guidelines](https://unomi.apache.org/contribute.html)
   
   If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) 
   if you are unsure please ask on the developers list.
   
   To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   


-- 
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



[GitHub] [unomi] sergehuber commented on pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
sergehuber commented on pull request #309:
URL: https://github.com/apache/unomi/pull/309#issuecomment-855872354


   @amitco1 Could you please provide integration tests for this ?


-- 
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



[GitHub] [unomi] jkevan commented on a change in pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
jkevan commented on a change in pull request #309:
URL: https://github.com/apache/unomi/pull/309#discussion_r662412180



##########
File path: plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
##########
@@ -102,6 +102,12 @@ public int execute(Action action, Event event) {
             propertyValue = format.format(date);
         }
 
+        if (propertyValue != null && propertyValue.equals("eventArrivalTime")) {

Review comment:
       I would rename "eventArrivalTime" to "timeStamp" or "actionExecutionTimeStamp" or "currentDate".
   Because it's not really true that this timeStamp is the real event arrival time. Event could arrive sooner and the action being executed few seconds after.




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [unomi] jkevan closed pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
jkevan closed pull request #309:
URL: https://github.com/apache/unomi/pull/309


   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [unomi] jkevan commented on pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
jkevan commented on pull request #309:
URL: https://github.com/apache/unomi/pull/309#issuecomment-883416831


   @amitco1 would love your answer on this or we'll have to close the PR.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [unomi] jkevan commented on pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
jkevan commented on pull request #309:
URL: https://github.com/apache/unomi/pull/309#issuecomment-872361674


   Overal I approve this because of the explaination I provided on the ticket: https://issues.apache.org/jira/browse/UNOMI-482


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [unomi] jkevan commented on pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
jkevan commented on pull request #309:
URL: https://github.com/apache/unomi/pull/309#issuecomment-889769077


   I'm working on implementing this in a proper way, it will be part of version 2.0.0-SNAPSHOT and 1.6.0-SNAPSHOT.
   Basically I deprecated the "now" option (it will be still supported, but deprecated)
   And I added this two action parameter:
   
   - setPropertyValueCurrentDate
   - setPropertyValueCurrentEventTimestamp
   
   using the value of the parameter: setPropertyValue was not a good idea for people that would like to set the value: "now" or "eventArrivalTime". That is why I prefer to implement dedicated parameters to handle this cases.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [unomi] jkevan commented on a change in pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
jkevan commented on a change in pull request #309:
URL: https://github.com/apache/unomi/pull/309#discussion_r662412180



##########
File path: plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
##########
@@ -102,6 +102,12 @@ public int execute(Action action, Event event) {
             propertyValue = format.format(date);
         }
 
+        if (propertyValue != null && propertyValue.equals("eventArrivalTime")) {

Review comment:
       I would rename "eventArrivalTime" to "timeStamp" or "actionExecutionTimeStamp".
   Because it's not really true that this timeStamp is the real event arrival time. Event could arrive sooner and the action being executed few seconds after.




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [unomi] jkevan commented on a change in pull request #309: UNOMI-482 SetPropertyAction eventArrivalTime

Posted by GitBox <gi...@apache.org>.
jkevan commented on a change in pull request #309:
URL: https://github.com/apache/unomi/pull/309#discussion_r662412180



##########
File path: plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
##########
@@ -102,6 +102,12 @@ public int execute(Action action, Event event) {
             propertyValue = format.format(date);
         }
 
+        if (propertyValue != null && propertyValue.equals("eventArrivalTime")) {

Review comment:
       I would rename "eventArrivalTime" to "timeStamp" or "actionExecutionTimeStamp" or "currentDate".
   Because it's not really true that this timeStamp is the real event arrival time. Event could arrive sooner and the action being executed few seconds after.




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org