From 631503d6fbeecef5e3b783fb7a58bdbee702528a Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Fri, 21 Dec 2018 15:32:31 +0100
Subject: [PATCH] bugfix: comm insert

---
 entity/Comm_entity/entityfields/commid/valueProcess.js   | 4 ++--
 entity/Comm_entity/entityfields/standard/valueProcess.js | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/entity/Comm_entity/entityfields/commid/valueProcess.js b/entity/Comm_entity/entityfields/commid/valueProcess.js
index 580b42a632c..46a10710c68 100644
--- a/entity/Comm_entity/entityfields/commid/valueProcess.js
+++ b/entity/Comm_entity/entityfields/commid/valueProcess.js
@@ -3,6 +3,6 @@ import("system.result");
 import("system.neon");
 import("system.vars");
 
-
-if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && (vars.get("$this.value") == null || vars.get("$this.value") == ""))
+//do not check if own value is null or empty because the own value is currently not set correctly when you've got several COMM entries (e.g. in a list edit)
+if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW)
     result.string(util.getNewUUID());
\ No newline at end of file
diff --git a/entity/Comm_entity/entityfields/standard/valueProcess.js b/entity/Comm_entity/entityfields/standard/valueProcess.js
index c8fae64aee3..86534e08301 100644
--- a/entity/Comm_entity/entityfields/standard/valueProcess.js
+++ b/entity/Comm_entity/entityfields/standard/valueProcess.js
@@ -3,5 +3,6 @@ import("system.result");
 import("system.neon");
 import("system.vars");
 
-if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && (vars.get("$this.value") == "" || vars.get("$this.value") == null))
+//do not check if own value is null or empty because the own value is currently not set correctly when you've got several COMM entries (e.g. in a list edit)
+if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW)
     result.string("0");
\ No newline at end of file
-- 
GitLab