From e6900421ef638c8b2a61785d87aecf8b2c555cf7 Mon Sep 17 00:00:00 2001
From: "S.Listl" <S.Listl@SLISTL.aditosoftware.local>
Date: Tue, 23 Jul 2019 09:36:34 +0200
Subject: [PATCH] Bulk mail fix

---
 .../AttributeRelation_entity.aod                         | 1 +
 .../entityfields/value/valueProcess.js                   | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 entity/AttributeRelation_entity/entityfields/value/valueProcess.js

diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod
index 90f3b32a681..5e2d6bbd823 100644
--- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod
+++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod
@@ -108,6 +108,7 @@
       <mandatoryProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/mandatoryProcess.js</mandatoryProcess>
       <dropDownProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/dropDownProcess.js</dropDownProcess>
       <stateProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/stateProcess.js</stateProcess>
+      <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/valueProcess.js</valueProcess>
       <displayValueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/value/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityConsumer>
diff --git a/entity/AttributeRelation_entity/entityfields/value/valueProcess.js b/entity/AttributeRelation_entity/entityfields/value/valueProcess.js
new file mode 100644
index 00000000000..938b26f2b63
--- /dev/null
+++ b/entity/AttributeRelation_entity/entityfields/value/valueProcess.js
@@ -0,0 +1,9 @@
+import("Attribute_lib");
+import("system.vars");
+import("system.result");
+
+
+var attributeType = AttributeUtil.getAttributeType(vars.get("$field.AB_ATTRIBUTE_ID"));
+var contentType = AttributeTypeUtil.getContentType(attributeType);
+if (vars.get("$this.value") == null && contentType == "BOOLEAN")
+    result.string("0");
\ No newline at end of file
-- 
GitLab