From dc496f7e0b47cc2a09a8d3301e742d301b1c615e Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Wed, 30 Oct 2019 13:48:17 +0100
Subject: [PATCH] fix #1046081: keyword-attributes: clicking in edit mode made
 the text dissapear

---
 .../entityfields/valueproxy/valueProcess.js   | 39 ++++++++++---------
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/valueProcess.js b/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/valueProcess.js
index 5abab4366e..586823ef8a 100644
--- a/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/valueProcess.js
+++ b/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/valueProcess.js
@@ -1,25 +1,28 @@
 import("system.result");
 import("system.vars");
 
-var type = vars.get("$field.attributeType");
-var value;
-switch (type)
+var value = vars.get("$this.value");
+if (!value)
 {
-    case "BOOL_VALUE":
-        value = vars.get("$field.BOOL_VALUE");
-        break;
-    case "NUMBER_VALUE":
-        value = vars.get("$field.NUMBER_VALUE");
-        break;
-    case "CHAR_VALUE":
-        value = vars.get("$field.CHAR_VALUE");
-        break;    
-    case "LONG_CHAR_VALUE":
-        value = vars.get("$field.LONG_CHAR_VALUE");
-        break;
-    default: 
-        value = null;
-        break;
+    var type = vars.get("$field.attributeType");
+    switch (type)
+    {
+        case "BOOL_VALUE":
+            value = vars.get("$field.BOOL_VALUE");
+            break;
+        case "NUMBER_VALUE":
+            value = vars.get("$field.NUMBER_VALUE");
+            break;
+        case "CHAR_VALUE":
+            value = vars.get("$field.CHAR_VALUE");
+            break;    
+        case "LONG_CHAR_VALUE":
+            value = vars.get("$field.LONG_CHAR_VALUE");
+            break;
+        default: 
+            value = null;
+            break;
+    }
 }
 
 result.string(value);
\ No newline at end of file
-- 
GitLab