Repository: incubator-unomi
Updated Branches:
  refs/heads/master 4ff30d4c0 -> cd3bc9ff0


DMF-599 "User was not on the site in the last" doesn't work in preview with 
persona / Last visit

- Fixed by introducing a new previousVisit property and fixing the context 
servlet to properly override the profile inside the session too.

Signed-off-by: Serge Huber <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/cd3bc9ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/cd3bc9ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/cd3bc9ff

Branch: refs/heads/master
Commit: cd3bc9ff0e5a6df2cb33954b69a827667006e164
Parents: 4ff30d4
Author: Serge Huber <[email protected]>
Authored: Fri Mar 17 16:45:19 2017 +0100
Committer: Serge Huber <[email protected]>
Committed: Fri Mar 17 16:45:19 2017 +0100

----------------------------------------------------------------------
 .../cxs/properties/profiles/system/previousVisit.json     | 10 ++++++++++
 .../main/java/org/apache/unomi/web/ContextServlet.java    |  1 +
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cd3bc9ff/services/src/main/resources/META-INF/cxs/properties/profiles/system/previousVisit.json
----------------------------------------------------------------------
diff --git 
a/services/src/main/resources/META-INF/cxs/properties/profiles/system/previousVisit.json
 
b/services/src/main/resources/META-INF/cxs/properties/profiles/system/previousVisit.json
new file mode 100644
index 0000000..6094746
--- /dev/null
+++ 
b/services/src/main/resources/META-INF/cxs/properties/profiles/system/previousVisit.json
@@ -0,0 +1,10 @@
+{
+  "metadata": {     "id": "previousVisit", "name": "Previous visit"   },
+  "type": "date",
+  "tags": [ "systemProfileProperties" ],
+  "defaultValue": "",
+  "automaticMappingsFrom": [ ],
+  "mergeStrategy": "mostRecentMergeStrategy",
+  "rank": "103.1",
+  "protected": true
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cd3bc9ff/wab/src/main/java/org/apache/unomi/web/ContextServlet.java
----------------------------------------------------------------------
diff --git a/wab/src/main/java/org/apache/unomi/web/ContextServlet.java 
b/wab/src/main/java/org/apache/unomi/web/ContextServlet.java
index c1c096c..d3e29fe 100644
--- a/wab/src/main/java/org/apache/unomi/web/ContextServlet.java
+++ b/wab/src/main/java/org/apache/unomi/web/ContextServlet.java
@@ -380,6 +380,7 @@ public class ContextServlet extends HttpServlet {
 
             if (contextRequest.getProfilePropertiesOverrides() != null) {
                 
profile.setProperties(contextRequest.getProfilePropertiesOverrides());
+                
session.getProfile().setProperties(contextRequest.getProfilePropertiesOverrides());
             }
 
             if (contextRequest.getSessionPropertiesOverrides() != null) {

Reply via email to