From 6f57b7435f51b60320c9076aa29f9f126aaca122 Mon Sep 17 00:00:00 2001
From: Machac <machac@netgrif.com>
Date: Mon, 15 Dec 2025 14:43:16 +0100
Subject: [PATCH 01/12] Release/7.0.0-RC10

---
 application-engine/pom.xml      | 2 +-
 nae-object-library/pom.xml      | 2 +-
 nae-spring-core-adapter/pom.xml | 2 +-
 nae-user-ce/pom.xml             | 2 +-
 nae-user-common/pom.xml         | 2 +-
 pom.xml                         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/application-engine/pom.xml b/application-engine/pom.xml
index a9669b0e11f..2e4cdead5e4 100644
--- a/application-engine/pom.xml
+++ b/application-engine/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC9</version>
+        <version>7.0.0-RC10</version>
     </parent>
 
     <artifactId>application-engine</artifactId>
diff --git a/nae-object-library/pom.xml b/nae-object-library/pom.xml
index 774d8390ec9..0038a8439bb 100644
--- a/nae-object-library/pom.xml
+++ b/nae-object-library/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC9</version>
+        <version>7.0.0-RC10</version>
     </parent>
 
     <artifactId>nae-object-library</artifactId>
diff --git a/nae-spring-core-adapter/pom.xml b/nae-spring-core-adapter/pom.xml
index fe96c23c056..645032dbeae 100644
--- a/nae-spring-core-adapter/pom.xml
+++ b/nae-spring-core-adapter/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC9</version>
+        <version>7.0.0-RC10</version>
     </parent>
 
     <artifactId>nae-spring-core-adapter</artifactId>
diff --git a/nae-user-ce/pom.xml b/nae-user-ce/pom.xml
index 83241c8c9dc..b43daa5f701 100644
--- a/nae-user-ce/pom.xml
+++ b/nae-user-ce/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC9</version>
+        <version>7.0.0-RC10</version>
     </parent>
 
     <artifactId>nae-user-ce</artifactId>
diff --git a/nae-user-common/pom.xml b/nae-user-common/pom.xml
index 31e74c86c94..14722d0a1cd 100644
--- a/nae-user-common/pom.xml
+++ b/nae-user-common/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC9</version>
+        <version>7.0.0-RC10</version>
     </parent>
 
     <artifactId>nae-user-common</artifactId>
diff --git a/pom.xml b/pom.xml
index cc61286299d..ebcf267b0fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
 
     <groupId>com.netgrif</groupId>
     <artifactId>application-engine-parent</artifactId>
-    <version>7.0.0-RC9</version>
+    <version>7.0.0-RC10</version>
     <packaging>pom</packaging>
 
     <name>NETGRIF Application Engine parent</name>

From 668fa4dcca2c706fdf615e589ad3d7dd983e63f8 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Wed, 7 Jan 2026 17:59:54 +0100
Subject: [PATCH 02/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- added permissions, users and userRefs attributes of case and ElasticCase to copy constructor of ElasticCase
---
 .../engine/objects/elastic/domain/ElasticCase.java            | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index c16316c9671..1e529f7ccd4 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -102,7 +102,9 @@ public ElasticCase(Case useCase) {
         viewUsers = new HashSet<>(useCase.getViewUsers());
         negativeViewUsers = new HashSet<>(useCase.getNegativeViewUsers());
         tags = new HashMap<>(useCase.getTags());
-
+        permissions = new HashMap<>(useCase.getPermissions());
+        users = new HashMap<>(useCase.getUsers());
+        userRefs = new HashMap<>(useCase.getUserRefs());
         dataSet = new HashMap<>();
         immediateData = useCase.getImmediateData().stream().map(ImmediateField::new).collect(Collectors.toList());
     }

From d408b4ddf80ee8728c6c6ccdc2c8cb2a4e2c9bc0 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Thu, 8 Jan 2026 10:02:34 +0100
Subject: [PATCH 03/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- added permissions, users and userRefs to update method of ElasticCase
---
 .../engine/objects/elastic/domain/ElasticCase.java            | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index 1e529f7ccd4..5ea41d5a94e 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -123,7 +123,9 @@ public void update(ElasticCase useCase) {
         viewUsers = useCase.getViewUsers();
         negativeViewUsers = useCase.getNegativeViewUsers();
         tags = useCase.getTags();
-
+        permissions = useCase.getPermissions();
+        users = useCase.getUsers();
+        userRefs = useCase.getUserRefs();
         dataSet = useCase.getDataSet();
         immediateData = useCase.getImmediateData();
     }

From 8162c8a255bb181b63dac6e837c2888bb411ecd9 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Mon, 12 Jan 2026 16:36:41 +0100
Subject: [PATCH 04/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- added defensive copying to update method for better consistency with constructor
---
 .../objects/elastic/domain/ElasticCase.java   | 30 +++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index 5ea41d5a94e..e2a60047c0d 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -113,20 +113,20 @@ public void update(ElasticCase useCase) {
         version++;
         lastModified = useCase.getLastModified();
         title = useCase.getTitle();
-        taskIds = useCase.getTaskIds();
-        taskMongoIds = useCase.getTaskMongoIds();
-        tasks = useCase.getTasks();
-        enabledRoles = useCase.getEnabledRoles();
-        viewRoles = useCase.getViewRoles();
-        viewUserRefs = useCase.getViewUserRefs();
-        negativeViewRoles = useCase.getNegativeViewRoles();
-        viewUsers = useCase.getViewUsers();
-        negativeViewUsers = useCase.getNegativeViewUsers();
-        tags = useCase.getTags();
-        permissions = useCase.getPermissions();
-        users = useCase.getUsers();
-        userRefs = useCase.getUserRefs();
-        dataSet = useCase.getDataSet();
-        immediateData = useCase.getImmediateData();
+        taskIds = new HashSet<>(useCase.getTaskIds());
+        taskMongoIds = new HashSet<>(useCase.getTaskMongoIds());
+        tasks = new HashSet<>(useCase.getTasks());
+        enabledRoles = new HashSet<>(useCase.getEnabledRoles());
+        viewRoles = new HashSet<>(useCase.getViewRoles());
+        viewUserRefs = new HashSet<>(useCase.getViewUserRefs());
+        negativeViewRoles = new HashSet<>(useCase.getNegativeViewRoles());
+        viewUsers = new HashSet<>(useCase.getViewUsers());
+        negativeViewUsers = new HashSet<>(useCase.getNegativeViewUsers());
+        tags = new HashMap<>(useCase.getTags());
+        permissions = new HashMap<>(useCase.getPermissions());
+        users = new HashMap<>(useCase.getUsers());
+        userRefs = new HashMap<>(useCase.getUserRefs());
+        dataSet = new HashMap<>(useCase.getDataSet());
+        immediateData = new ArrayList<>(useCase.getImmediateData());
     }
 }

From 8ec0e438cd471bb92b1cae263064641aef47eae2 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Mon, 12 Jan 2026 16:42:02 +0100
Subject: [PATCH 05/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- pom version revert
---
 application-engine/pom.xml      | 2 +-
 nae-object-library/pom.xml      | 2 +-
 nae-spring-core-adapter/pom.xml | 2 +-
 nae-user-ce/pom.xml             | 2 +-
 nae-user-common/pom.xml         | 2 +-
 pom.xml                         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/application-engine/pom.xml b/application-engine/pom.xml
index 2e4cdead5e4..a9669b0e11f 100644
--- a/application-engine/pom.xml
+++ b/application-engine/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC10</version>
+        <version>7.0.0-RC9</version>
     </parent>
 
     <artifactId>application-engine</artifactId>
diff --git a/nae-object-library/pom.xml b/nae-object-library/pom.xml
index 0038a8439bb..774d8390ec9 100644
--- a/nae-object-library/pom.xml
+++ b/nae-object-library/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC10</version>
+        <version>7.0.0-RC9</version>
     </parent>
 
     <artifactId>nae-object-library</artifactId>
diff --git a/nae-spring-core-adapter/pom.xml b/nae-spring-core-adapter/pom.xml
index 645032dbeae..fe96c23c056 100644
--- a/nae-spring-core-adapter/pom.xml
+++ b/nae-spring-core-adapter/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC10</version>
+        <version>7.0.0-RC9</version>
     </parent>
 
     <artifactId>nae-spring-core-adapter</artifactId>
diff --git a/nae-user-ce/pom.xml b/nae-user-ce/pom.xml
index b43daa5f701..83241c8c9dc 100644
--- a/nae-user-ce/pom.xml
+++ b/nae-user-ce/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC10</version>
+        <version>7.0.0-RC9</version>
     </parent>
 
     <artifactId>nae-user-ce</artifactId>
diff --git a/nae-user-common/pom.xml b/nae-user-common/pom.xml
index 14722d0a1cd..31e74c86c94 100644
--- a/nae-user-common/pom.xml
+++ b/nae-user-common/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>com.netgrif</groupId>
         <artifactId>application-engine-parent</artifactId>
-        <version>7.0.0-RC10</version>
+        <version>7.0.0-RC9</version>
     </parent>
 
     <artifactId>nae-user-common</artifactId>
diff --git a/pom.xml b/pom.xml
index ebcf267b0fd..cc61286299d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
 
     <groupId>com.netgrif</groupId>
     <artifactId>application-engine-parent</artifactId>
-    <version>7.0.0-RC10</version>
+    <version>7.0.0-RC9</version>
     <packaging>pom</packaging>
 
     <name>NETGRIF Application Engine parent</name>

From 2ea03c5791b85a4a1e0724de63c1b1805867c31d Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Mon, 12 Jan 2026 17:10:27 +0100
Subject: [PATCH 06/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- added creation of deep copy to permissions, users and userRefs
---
 .../objects/elastic/domain/ElasticCase.java   | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index e2a60047c0d..1686e7b0127 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -102,9 +102,9 @@ public ElasticCase(Case useCase) {
         viewUsers = new HashSet<>(useCase.getViewUsers());
         negativeViewUsers = new HashSet<>(useCase.getNegativeViewUsers());
         tags = new HashMap<>(useCase.getTags());
-        permissions = new HashMap<>(useCase.getPermissions());
-        users = new HashMap<>(useCase.getUsers());
-        userRefs = new HashMap<>(useCase.getUserRefs());
+        permissions = deepCopy(useCase.getPermissions());
+        users = deepCopy(useCase.getUsers());
+        userRefs = deepCopy(useCase.getUserRefs());
         dataSet = new HashMap<>();
         immediateData = useCase.getImmediateData().stream().map(ImmediateField::new).collect(Collectors.toList());
     }
@@ -123,10 +123,17 @@ public void update(ElasticCase useCase) {
         viewUsers = new HashSet<>(useCase.getViewUsers());
         negativeViewUsers = new HashSet<>(useCase.getNegativeViewUsers());
         tags = new HashMap<>(useCase.getTags());
-        permissions = new HashMap<>(useCase.getPermissions());
-        users = new HashMap<>(useCase.getUsers());
-        userRefs = new HashMap<>(useCase.getUserRefs());
+        permissions = deepCopy(useCase.getPermissions());
+        users = deepCopy(useCase.getUsers());
+        userRefs = deepCopy(useCase.getUserRefs());
         dataSet = new HashMap<>(useCase.getDataSet());
         immediateData = new ArrayList<>(useCase.getImmediateData());
     }
+
+    private static Map<String, Map<String, Boolean>> deepCopy(Map<String, Map<String, Boolean>> map) {
+        if (map == null || map.isEmpty()) {
+            return new HashMap<>();
+        }
+        return map.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> new HashMap<>(e.getValue())));
+    }
 }

From 1d6d21b5687e7c20ca21f4db3f69a3baefa84c99 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Mon, 12 Jan 2026 17:19:38 +0100
Subject: [PATCH 07/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- null check added
---
 .../application/engine/objects/elastic/domain/ElasticCase.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index 1686e7b0127..2d72a547536 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -134,6 +134,6 @@ private static Map<String, Map<String, Boolean>> deepCopy(Map<String, Map<String
         if (map == null || map.isEmpty()) {
             return new HashMap<>();
         }
-        return map.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> new HashMap<>(e.getValue())));
+        return map.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue() == null ? new HashMap<>() : new HashMap<>(e.getValue())));
     }
 }

From 7f21900b26462c7ae5b69afb5681aec1a7aa2e78 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Tue, 13 Jan 2026 09:53:43 +0100
Subject: [PATCH 08/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- deep copying of tasks in update method added
---
 .../engine/objects/elastic/domain/ElasticCase.java            | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index 2d72a547536..29144bd4717 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -115,7 +115,9 @@ public void update(ElasticCase useCase) {
         title = useCase.getTitle();
         taskIds = new HashSet<>(useCase.getTaskIds());
         taskMongoIds = new HashSet<>(useCase.getTaskMongoIds());
-        tasks = new HashSet<>(useCase.getTasks());
+        tasks = useCase.getTasks() == null ? new HashSet<>() : useCase.getTasks().stream()
+                .map(tp -> new ElasticTaskPair(tp.getTask(), tp.getTransition()))
+                .collect(Collectors.toSet());
         enabledRoles = new HashSet<>(useCase.getEnabledRoles());
         viewRoles = new HashSet<>(useCase.getViewRoles());
         viewUserRefs = new HashSet<>(useCase.getViewUserRefs());

From 325003cb8a3cecedf3628dee097b3d8595cca416 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Tue, 13 Jan 2026 11:06:12 +0100
Subject: [PATCH 09/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- deep copying of ImmediateField in update method added
---
 .../engine/objects/elastic/domain/ElasticCase.java          | 5 ++++-
 .../engine/objects/elastic/domain/ImmediateField.java       | 6 ++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index 29144bd4717..27b0d1ac4e1 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -1,5 +1,6 @@
 package com.netgrif.application.engine.objects.elastic.domain;
 
+import com.netgrif.application.engine.objects.petrinet.domain.I18nString;
 import com.netgrif.application.engine.objects.workflow.domain.Case;
 import com.netgrif.application.engine.objects.workflow.domain.TaskPair;
 import lombok.AllArgsConstructor;
@@ -129,7 +130,9 @@ public void update(ElasticCase useCase) {
         users = deepCopy(useCase.getUsers());
         userRefs = deepCopy(useCase.getUserRefs());
         dataSet = new HashMap<>(useCase.getDataSet());
-        immediateData = new ArrayList<>(useCase.getImmediateData());
+        immediateData = useCase.getImmediateData() == null ? new ArrayList<>() : useCase.getImmediateData().stream()
+                .map(field -> new ImmediateField(field.getStringId(), new I18nString(field.getName()), field.getType()))
+                .collect(Collectors.toList());
     }
 
     private static Map<String, Map<String, Boolean>> deepCopy(Map<String, Map<String, Boolean>> map) {
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java
index 868172bf230..08c72215b8b 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java
@@ -25,4 +25,10 @@ public ImmediateField(Field<?> field) {
         this.name = field.getName();
         this.type = field.getType().getName();
     }
+
+    public ImmediateField(String stringId, I18nString name, String type) {
+        this.stringId = stringId;
+        this.name = name;
+        this.type = type;
+    }
 }

From c83f86f532f405460d12f2e4ce725d9f1c7a2aa8 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Tue, 13 Jan 2026 15:35:33 +0100
Subject: [PATCH 10/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- deep copying of DataSet through reflection in update method of ElasticCase added
- copy constructors added do DataField and its subclasses
---
 .../objects/elastic/domain/BooleanField.java  |  5 +++++
 .../objects/elastic/domain/ButtonField.java   |  5 +++++
 .../objects/elastic/domain/CaseField.java     |  5 +++++
 .../objects/elastic/domain/DataField.java     |  5 +++++
 .../objects/elastic/domain/DateField.java     |  6 +++++
 .../objects/elastic/domain/ElasticCase.java   | 22 ++++++++++---------
 .../domain/FieldWithAllowedNetsField.java     |  6 +++++
 .../objects/elastic/domain/FileField.java     |  7 ++++++
 .../objects/elastic/domain/FilterField.java   |  5 +++++
 .../objects/elastic/domain/I18nField.java     |  8 +++++++
 .../objects/elastic/domain/MapField.java      |  9 ++++++++
 .../objects/elastic/domain/NumberField.java   |  5 +++++
 .../elastic/domain/StringCollectionField.java |  7 ++++++
 .../objects/elastic/domain/TextField.java     |  5 +++++
 .../objects/elastic/domain/UserField.java     |  9 ++++++++
 .../objects/elastic/domain/UserListField.java | 10 +++++++++
 .../spring/elastic/domain/BooleanField.java   |  5 +++++
 .../spring/elastic/domain/ButtonField.java    |  4 ++++
 .../spring/elastic/domain/CaseField.java      |  4 ++++
 .../spring/elastic/domain/DateField.java      |  4 ++++
 .../spring/elastic/domain/FileField.java      |  4 ++++
 .../spring/elastic/domain/FilterField.java    |  4 ++++
 .../spring/elastic/domain/I18nField.java      |  4 ++++
 .../spring/elastic/domain/MapField.java       |  4 ++++
 .../spring/elastic/domain/NumberField.java    |  4 ++++
 .../elastic/domain/StringCollectionField.java |  4 ++++
 .../spring/elastic/domain/TextField.java      |  4 ++++
 .../spring/elastic/domain/UserField.java      |  4 ++++
 .../spring/elastic/domain/UserListField.java  |  6 +++++
 29 files changed, 164 insertions(+), 10 deletions(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/BooleanField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/BooleanField.java
index 9e23aa144f7..d6f13e4089c 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/BooleanField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/BooleanField.java
@@ -12,6 +12,11 @@ public abstract class BooleanField extends DataField {
 
     public Boolean booleanValue;
 
+    public BooleanField(BooleanField field) {
+        super(field);
+        this.booleanValue = field.booleanValue;
+    }
+
     public BooleanField(Boolean value) {
         super(value.toString());
         this.booleanValue = value;
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ButtonField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ButtonField.java
index 3564ddca342..9cd58539d7c 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ButtonField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ButtonField.java
@@ -12,6 +12,11 @@ public abstract class ButtonField extends DataField {
 
     public Integer buttonValue;
 
+    public ButtonField(ButtonField field) {
+        super(field);
+        this.buttonValue = field.buttonValue;
+    }
+
     public ButtonField(Integer value) {
         super(value.toString());
         this.buttonValue = value;
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/CaseField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/CaseField.java
index 48292624f38..371e3ddde94 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/CaseField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/CaseField.java
@@ -15,6 +15,11 @@ public abstract class CaseField extends FieldWithAllowedNetsField {
 
     private List<String> caseValue;
 
+    public CaseField(CaseField field) {
+        super(field);
+        this.caseValue = field.caseValue == null ? null : new ArrayList<>(field.caseValue);
+    }
+
     public CaseField(String[] fullTextValue, String[] allowedNets) {
         super(fullTextValue, allowedNets);
         this.caseValue = Arrays.asList(fullTextValue);
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DataField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DataField.java
index 7c054eee54b..3fdc5dfc18b 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DataField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DataField.java
@@ -6,6 +6,7 @@
 import lombok.NoArgsConstructor;
 import java.io.Serial;
 import java.io.Serializable;
+import java.util.Arrays;
 
 @Data
 @NoArgsConstructor
@@ -18,6 +19,10 @@ public abstract class DataField implements Serializable {
 
     public String[] fulltextValue;
 
+    DataField(DataField dataField) {
+        this.fulltextValue = dataField.fulltextValue == null ? null : Arrays.copyOf(dataField.fulltextValue, dataField.fulltextValue.length);
+    }
+
     DataField(String fulltextValue) {
         this.fulltextValue = new String[1];
         this.fulltextValue[0] = fulltextValue;
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DateField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DateField.java
index 7d30aedcb0e..eba97c07425 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DateField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/DateField.java
@@ -18,6 +18,12 @@ public abstract class DateField extends DataField {
 
     public Long timestampValue;
 
+    public DateField(DateField field) {
+        super(field);
+        this.dateValue = field.dateValue;
+        this.timestampValue = field.timestampValue;
+    }
+
     public DateField(String value, LocalDateTime dateTime) {
         super(value);
         this.dateValue = dateTime;
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index 27b0d1ac4e1..f127f036714 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -1,6 +1,7 @@
 package com.netgrif.application.engine.objects.elastic.domain;
 
 import com.netgrif.application.engine.objects.petrinet.domain.I18nString;
+import com.netgrif.application.engine.objects.utils.CopyConstructorUtil;
 import com.netgrif.application.engine.objects.workflow.domain.Case;
 import com.netgrif.application.engine.objects.workflow.domain.TaskPair;
 import lombok.AllArgsConstructor;
@@ -114,22 +115,23 @@ public void update(ElasticCase useCase) {
         version++;
         lastModified = useCase.getLastModified();
         title = useCase.getTitle();
-        taskIds = new HashSet<>(useCase.getTaskIds());
-        taskMongoIds = new HashSet<>(useCase.getTaskMongoIds());
+        taskIds = useCase.getTaskIds() == null ? new HashSet<>() : new HashSet<>(useCase.getTaskIds());
+        taskMongoIds = useCase.getTaskMongoIds() == null ? new HashSet<>() : new HashSet<>(useCase.getTaskMongoIds());
         tasks = useCase.getTasks() == null ? new HashSet<>() : useCase.getTasks().stream()
                 .map(tp -> new ElasticTaskPair(tp.getTask(), tp.getTransition()))
                 .collect(Collectors.toSet());
-        enabledRoles = new HashSet<>(useCase.getEnabledRoles());
-        viewRoles = new HashSet<>(useCase.getViewRoles());
-        viewUserRefs = new HashSet<>(useCase.getViewUserRefs());
-        negativeViewRoles = new HashSet<>(useCase.getNegativeViewRoles());
-        viewUsers = new HashSet<>(useCase.getViewUsers());
-        negativeViewUsers = new HashSet<>(useCase.getNegativeViewUsers());
-        tags = new HashMap<>(useCase.getTags());
+        enabledRoles = useCase.getEnabledRoles() == null ? new HashSet<>() : new HashSet<>(useCase.getEnabledRoles());
+        viewRoles = useCase.getViewRoles() == null ? new HashSet<>() : new HashSet<>(useCase.getViewRoles());
+        viewUserRefs = useCase.getViewUserRefs() == null ? new HashSet<>() : new HashSet<>(useCase.getViewUserRefs());
+        negativeViewRoles = useCase.getNegativeViewRoles() == null ? new HashSet<>() : new HashSet<>(useCase.getNegativeViewRoles());
+        viewUsers = useCase.getViewUsers() == null ? new HashSet<>() : new HashSet<>(useCase.getViewUsers());
+        negativeViewUsers = useCase.getNegativeViewUsers() == null ? new HashSet<>() : new HashSet<>(useCase.getNegativeViewUsers());
+        tags = useCase.getTags() == null ? new HashMap<>() : new HashMap<>(useCase.getTags());
         permissions = deepCopy(useCase.getPermissions());
         users = deepCopy(useCase.getUsers());
         userRefs = deepCopy(useCase.getUserRefs());
-        dataSet = new HashMap<>(useCase.getDataSet());
+        dataSet = useCase.getDataSet() == null ? new HashMap<>() : useCase.getDataSet().entrySet().stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, entry -> CopyConstructorUtil.copy(entry.getValue().getClass(), entry.getValue())));
         immediateData = useCase.getImmediateData() == null ? new ArrayList<>() : useCase.getImmediateData().stream()
                 .map(field -> new ImmediateField(field.getStringId(), new I18nString(field.getName()), field.getType()))
                 .collect(Collectors.toList());
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FieldWithAllowedNetsField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FieldWithAllowedNetsField.java
index 4194ba0f812..07f002eae00 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FieldWithAllowedNetsField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FieldWithAllowedNetsField.java
@@ -4,6 +4,7 @@
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.util.Arrays;
 import java.util.List;
 
 
@@ -14,6 +15,11 @@ public abstract class FieldWithAllowedNetsField extends DataField {
 
     public String[] allowedNets;
 
+    public FieldWithAllowedNetsField(FieldWithAllowedNetsField field) {
+        super(field);
+        this.allowedNets = field.allowedNets == null ? null : Arrays.copyOf(field.allowedNets, field.allowedNets.length);
+    }
+
     public FieldWithAllowedNetsField(String fullTextValue, String[] allowedNets) {
         super(fullTextValue);
         this.allowedNets = allowedNets;
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FileField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FileField.java
index 875c5740800..45e82c47875 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FileField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FileField.java
@@ -21,6 +21,13 @@ public abstract class FileField extends DataField {
 
     public String[] fileExtensionValue;
 
+    public FileField(FileField fileField) {
+        super(fileField);
+        this.filePath = fileField.getFilePath() == null ? null : Arrays.copyOf(fileField.filePath, fileField.filePath.length);
+        this.fileNameValue = fileField.getFileNameValue() == null ? null : Arrays.copyOf(fileField.fileNameValue, fileField.fileNameValue.length);
+        this.fileExtensionValue = fileField.getFileExtensionValue() == null ? null : Arrays.copyOf(fileField.fileExtensionValue, fileField.fileExtensionValue.length);
+    }
+
     public FileField(FileFieldValue value) {
         super(value.getName());
         this.filePath = new String[1];
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FilterField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FilterField.java
index 1a4a02bd587..5e88bed0db3 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FilterField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/FilterField.java
@@ -14,6 +14,11 @@ public abstract class FilterField extends FieldWithAllowedNetsField {
 
     public Map<String, Object> filterMetadata;
 
+    public FilterField(FilterField field) {
+        super(field);
+        this.filterMetadata = field.filterMetadata == null ? null : new HashMap<>(field.filterMetadata);
+    }
+
     public FilterField(String fullTextValue, String[] allowedNets, Map<String, Object> filterMetadata) {
         super(fullTextValue, allowedNets);
         this.filterMetadata = filterMetadata != null ? filterMetadata : new HashMap<>();
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/I18nField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/I18nField.java
index fa6b590f4cf..4688570ae35 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/I18nField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/I18nField.java
@@ -5,6 +5,8 @@
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.util.Arrays;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
@@ -17,6 +19,12 @@ public abstract class I18nField extends TextField {
 
     public Map<String, String> translations;
 
+    public I18nField(I18nField field) {
+        super(field);
+        this.keyValue = field.keyValue == null ? null : Arrays.copyOf(field.keyValue, field.keyValue.length);
+        this.translations = field.translations == null ? null : new HashMap<>(field.translations);
+    }
+
     public I18nField(Set<String> keys, Set<String> values, Map<String, String> translations) {
         super(new String[0]);
         this.keyValue = keys.toArray(new String[0]);
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java
index d57d980ad40..ea582cf8bb3 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java
@@ -6,6 +6,7 @@
 import lombok.NoArgsConstructor;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Data
 @NoArgsConstructor
@@ -15,6 +16,14 @@ public abstract class MapField extends TextField {
     public String[] keyValue;
     public Map<String, I18nString> keyValueTranslations;
 
+    public MapField(MapField field) {
+        super(field);
+        this.keyValue = field.keyValue == null ? null : Arrays.copyOf(field.keyValue, field.keyValue.length);
+        this.keyValueTranslations = field.keyValueTranslations == null ? null
+                : new HashMap<>(field.keyValueTranslations.entrySet().stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, entry -> new I18nString(entry.getValue()))));
+    }
+
     public MapField(Map.Entry<String, I18nString> valueTranslationPair) {
         this(List.of(valueTranslationPair));
     }
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/NumberField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/NumberField.java
index 21cf9441285..4720e9033ac 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/NumberField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/NumberField.java
@@ -12,6 +12,11 @@ public abstract class NumberField extends DataField {
 
     public Double numberValue;
 
+    public NumberField(NumberField field) {
+        super(field);
+        this.numberValue = field.numberValue;
+    }
+
     public NumberField(Double value) {
         super(value.toString());
         this.numberValue = value;
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/StringCollectionField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/StringCollectionField.java
index c4b4cb972c2..e270249bbb8 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/StringCollectionField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/StringCollectionField.java
@@ -5,6 +5,8 @@
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.util.Arrays;
+
 @Data
 @NoArgsConstructor
 @EqualsAndHashCode(callSuper = true)
@@ -12,6 +14,11 @@ public abstract class StringCollectionField extends TextField {
 
     public String[] collectionValue;
 
+    public StringCollectionField(StringCollectionField field) {
+        super(field);
+        this.collectionValue = field.collectionValue == null ? null : Arrays.copyOf(field.collectionValue, field.collectionValue.length);
+    }
+
     public StringCollectionField(String[] values) {
         super(values);
         this.collectionValue = values;
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/TextField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/TextField.java
index 83a85604982..98a59b3d7f6 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/TextField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/TextField.java
@@ -11,6 +11,11 @@ public abstract class TextField extends DataField {
 
     public String[] textValue;
 
+    public TextField(TextField field) {
+        super(field);
+        this.textValue = field.textValue == null ? null : field.textValue.clone();
+    }
+
     public TextField(String value) {
         super(value);
         this.textValue = new String[1];
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserField.java
index e08b3852f2a..99bf3afcee7 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserField.java
@@ -6,6 +6,7 @@
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.util.Arrays;
 import java.util.stream.IntStream;
 
 @Data
@@ -23,6 +24,14 @@ public abstract class UserField extends DataField {
 
     private String[] userRealmIdValue;
 
+    public UserField(UserField field) {
+        super(field);
+        this.usernameValue = field.usernameValue == null ? null : Arrays.copyOf(field.usernameValue, field.usernameValue.length);
+        this.fullNameValue = field.fullNameValue == null ? null : Arrays.copyOf(field.fullNameValue, field.fullNameValue.length);
+        this.userIdValue = field.userIdValue == null ? null : Arrays.copyOf(field.userIdValue, field.userIdValue.length);
+        this.userRealmIdValue = field.userRealmIdValue == null ? null : Arrays.copyOf(field.userRealmIdValue, field.userRealmIdValue.length);
+    }
+
     public UserField(UserMappingData value) {
         super(String.format("%s %s", value.fullName, value.username));
         this.usernameValue = new String[1];
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserListField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserListField.java
index 1693fa5c2b8..83941f00730 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserListField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/UserListField.java
@@ -5,6 +5,8 @@
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.util.Arrays;
+
 @Data
 @NoArgsConstructor
 @AllArgsConstructor
@@ -19,6 +21,14 @@ public abstract class UserListField extends UserField {
 
     private String[] userRealmIdValue;
 
+    public UserListField(UserListField field) {
+        super(field);
+        this.usernameValue = field.usernameValue == null ? null : Arrays.copyOf(field.usernameValue, field.usernameValue.length);
+        this.fullNameValue = field.fullNameValue == null ? null : Arrays.copyOf(field.fullNameValue, field.fullNameValue.length);
+        this.userIdValue = field.userIdValue == null ? null : Arrays.copyOf(field.userIdValue, field.userIdValue.length);
+        this.userRealmIdValue = field.userRealmIdValue == null ? null : Arrays.copyOf(field.userRealmIdValue, field.userRealmIdValue.length);
+    }
+
     public UserListField(UserMappingData[] values) {
         super(values);
         this.usernameValue = new String[values.length];
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/BooleanField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/BooleanField.java
index 32392622807..cf50546e976 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/BooleanField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/BooleanField.java
@@ -12,6 +12,11 @@ public class BooleanField extends com.netgrif.application.engine.objects.elastic
     @Field(type = Boolean)
     public Boolean booleanValue;
 
+    public BooleanField(BooleanField field) {
+        super(field);
+        this.booleanValue = field.booleanValue;
+    }
+
     public BooleanField(Boolean value) {
         super(value);
         this.booleanValue = value;
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/ButtonField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/ButtonField.java
index 5322cdd317f..a29c5e63433 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/ButtonField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/ButtonField.java
@@ -13,6 +13,10 @@
 @EqualsAndHashCode(callSuper = true)
 public class ButtonField extends com.netgrif.application.engine.objects.elastic.domain.ButtonField {
 
+    public ButtonField(ButtonField field) {
+        super(field);
+    }
+
     public ButtonField(Integer value) {
         super(value);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/CaseField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/CaseField.java
index 7596000d6f1..f15d3bdf015 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/CaseField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/CaseField.java
@@ -10,6 +10,10 @@
 @NoArgsConstructor
 public class CaseField extends com.netgrif.application.engine.objects.elastic.domain.CaseField {
 
+    public CaseField(CaseField field) {
+        super(field);
+    }
+
     public CaseField(String[] values, String[] allowedNets) {
         super(values, allowedNets);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/DateField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/DateField.java
index 2ce6f55f20f..6482d6632e9 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/DateField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/DateField.java
@@ -13,6 +13,10 @@
 @NoArgsConstructor
 public class DateField extends com.netgrif.application.engine.objects.elastic.domain.DateField {
 
+    public DateField(DateField field) {
+        super(field);
+    }
+
     public DateField(String value, LocalDateTime dateTime) {
         super(value, dateTime);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FileField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FileField.java
index 4990f7299fc..e64794325d2 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FileField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FileField.java
@@ -12,6 +12,10 @@
 @EqualsAndHashCode(callSuper = true)
 public class FileField extends com.netgrif.application.engine.objects.elastic.domain.FileField {
 
+    public FileField(FileField field) {
+        super(field);
+    }
+
     public FileField(FileFieldValue value) {
         super(value);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FilterField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FilterField.java
index e3322b1fe31..6d3e386ba37 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FilterField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/FilterField.java
@@ -10,6 +10,10 @@
 @NoArgsConstructor
 public class FilterField extends com.netgrif.application.engine.objects.elastic.domain.FilterField {
 
+    public FilterField(FilterField field) {
+        super(field);
+    }
+
     public FilterField(String value, String[] allowedNets, Map<String, Object> filterMetadata) {
         super(value, allowedNets, filterMetadata);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/I18nField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/I18nField.java
index 6e7345b5596..d0c0453d234 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/I18nField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/I18nField.java
@@ -12,6 +12,10 @@
 @NoArgsConstructor
 public class I18nField extends com.netgrif.application.engine.objects.elastic.domain.I18nField {
 
+    public I18nField(I18nField field) {
+        super(field);
+    }
+
     public I18nField(Set<String> keys, Set<String> values, Map<String, String> translations) {
         super(keys, values, translations);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/MapField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/MapField.java
index 217ab8001da..3936cce8668 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/MapField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/MapField.java
@@ -13,6 +13,10 @@
 @NoArgsConstructor
 public class MapField extends com.netgrif.application.engine.objects.elastic.domain.MapField {
 
+    public MapField(MapField field) {
+        super(field);
+    }
+
     public MapField(Map.Entry<String, I18nString> valuePair) {
         super(valuePair);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/NumberField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/NumberField.java
index f643393df65..ad5d349b64e 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/NumberField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/NumberField.java
@@ -9,6 +9,10 @@
 @NoArgsConstructor
 public class NumberField extends com.netgrif.application.engine.objects.elastic.domain.NumberField {
 
+    public NumberField(NumberField field) {
+        super(field);
+    }
+
     public NumberField(Double value) {
         super(value);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/StringCollectionField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/StringCollectionField.java
index 4786a4d2d4a..cbdd0a19dc6 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/StringCollectionField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/StringCollectionField.java
@@ -13,6 +13,10 @@
 @EqualsAndHashCode(callSuper = true)
 public class StringCollectionField extends com.netgrif.application.engine.objects.elastic.domain.StringCollectionField {
 
+    public StringCollectionField(StringCollectionField field) {
+        super(field);
+    }
+
     public StringCollectionField(String[] values) {
         super(values);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/TextField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/TextField.java
index e1a09218675..7fab8f75ffe 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/TextField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/TextField.java
@@ -12,6 +12,10 @@
 @EqualsAndHashCode(callSuper = true)
 public class TextField extends com.netgrif.application.engine.objects.elastic.domain.TextField {
 
+    public TextField(TextField field) {
+        super(field);
+    }
+
     public TextField(String value) {
         super(value);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserField.java
index 7268f5b9f91..af11f581dca 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserField.java
@@ -8,6 +8,10 @@
 @NoArgsConstructor
 public class UserField extends com.netgrif.application.engine.objects.elastic.domain.UserField {
 
+    public UserField(UserField field) {
+        super(field);
+    }
+
     public UserField(UserMappingData value) {
         super(value);
     }
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java
index 8619879c718..5272511e0ea 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java
@@ -3,11 +3,17 @@
 import lombok.NoArgsConstructor;
 import org.springframework.data.elasticsearch.annotations.Field;
 
+import java.util.Arrays;
+
 import static org.springframework.data.elasticsearch.annotations.FieldType.Text;
 
 @NoArgsConstructor
 public class UserListField extends com.netgrif.application.engine.objects.elastic.domain.UserListField {
 
+    public UserListField(UserListField field) {
+        super(field);
+    }
+
     public UserListField(UserMappingData[] values) {
         super(values);
     }

From f6eb19838f0350a53192f9064b3ba1cffd16804f Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Tue, 13 Jan 2026 15:58:07 +0100
Subject: [PATCH 11/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- null checks added in ElasticCase
---
 .../engine/objects/elastic/domain/ElasticCase.java            | 3 ++-
 .../application/engine/objects/elastic/domain/MapField.java   | 4 ++--
 .../engine/adapter/spring/elastic/domain/UserListField.java   | 2 --
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
index f127f036714..2762fc90886 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ElasticCase.java
@@ -108,7 +108,7 @@ public ElasticCase(Case useCase) {
         users = deepCopy(useCase.getUsers());
         userRefs = deepCopy(useCase.getUserRefs());
         dataSet = new HashMap<>();
-        immediateData = useCase.getImmediateData().stream().map(ImmediateField::new).collect(Collectors.toList());
+        immediateData = useCase.getImmediateData() == null ? Collections.emptyList() : useCase.getImmediateData().stream().map(ImmediateField::new).collect(Collectors.toList());
     }
 
     public void update(ElasticCase useCase) {
@@ -131,6 +131,7 @@ public void update(ElasticCase useCase) {
         users = deepCopy(useCase.getUsers());
         userRefs = deepCopy(useCase.getUserRefs());
         dataSet = useCase.getDataSet() == null ? new HashMap<>() : useCase.getDataSet().entrySet().stream()
+                .filter(entry -> entry.getValue() != null)
                 .collect(Collectors.toMap(Map.Entry::getKey, entry -> CopyConstructorUtil.copy(entry.getValue().getClass(), entry.getValue())));
         immediateData = useCase.getImmediateData() == null ? new ArrayList<>() : useCase.getImmediateData().stream()
                 .map(field -> new ImmediateField(field.getStringId(), new I18nString(field.getName()), field.getType()))
diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java
index ea582cf8bb3..e989f209e1a 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/MapField.java
@@ -20,8 +20,8 @@ public MapField(MapField field) {
         super(field);
         this.keyValue = field.keyValue == null ? null : Arrays.copyOf(field.keyValue, field.keyValue.length);
         this.keyValueTranslations = field.keyValueTranslations == null ? null
-                : new HashMap<>(field.keyValueTranslations.entrySet().stream()
-                .collect(Collectors.toMap(Map.Entry::getKey, entry -> new I18nString(entry.getValue()))));
+                : field.keyValueTranslations.entrySet().stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, entry -> new I18nString(entry.getValue())));
     }
 
     public MapField(Map.Entry<String, I18nString> valueTranslationPair) {
diff --git a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java
index 5272511e0ea..5e32298febc 100644
--- a/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java
+++ b/nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/elastic/domain/UserListField.java
@@ -3,8 +3,6 @@
 import lombok.NoArgsConstructor;
 import org.springframework.data.elasticsearch.annotations.Field;
 
-import java.util.Arrays;
-
 import static org.springframework.data.elasticsearch.annotations.FieldType.Text;
 
 @NoArgsConstructor

From 21513c86d55b7cee9ee148575be5394f26159537 Mon Sep 17 00:00:00 2001
From: palajsamuel <palaj@netgrif.com>
Date: Tue, 13 Jan 2026 16:41:59 +0100
Subject: [PATCH 12/12] [NAE-2316] Case permissions are not propagated
 correctly in cloud deployment

- constructor call fix in ImmediateField
---
 .../engine/objects/elastic/domain/ImmediateField.java         | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java
index 08c72215b8b..8c770886ded 100644
--- a/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java
+++ b/nae-object-library/src/main/java/com/netgrif/application/engine/objects/elastic/domain/ImmediateField.java
@@ -21,9 +21,7 @@ public ImmediateField() {
     }
 
     public ImmediateField(Field<?> field) {
-        this.stringId = field.getStringId();
-        this.name = field.getName();
-        this.type = field.getType().getName();
+        this(field.getStringId(), field.getName(), field.getType().getName());
     }
 
     public ImmediateField(String stringId, I18nString name, String type) {
