From 4afa06a662ce6984ad853c470af8bd7f268f0011 Mon Sep 17 00:00:00 2001 From: "a.schindlbeck" <a.schindlbeck@adito.de> Date: Mon, 11 Feb 2019 13:36:45 +0100 Subject: [PATCH] Object relation zwischenstand Appointments --- .../Appointment_entity/Appointment_entity.aod | 30 +++++++++++++++++++ .../children/anyobjectrowid_param/code.js | 4 +++ .../children/anyobjecttype_param/code.js | 4 +++ .../recordcontainers/jdito/contentProcess.js | 1 - .../ObjectRelation_entity.aod | 6 ++++ .../_____PREFERENCES_PROJECT.aod | 1 + process/Context_lib/process.js | 3 +- 7 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 entity/Appointment_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js create mode 100644 entity/Appointment_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js diff --git a/entity/Appointment_entity/Appointment_entity.aod b/entity/Appointment_entity/Appointment_entity.aod index afa818a7903..6fbc883175d 100644 --- a/entity/Appointment_entity/Appointment_entity.aod +++ b/entity/Appointment_entity/Appointment_entity.aod @@ -129,6 +129,36 @@ <expose v="true" /> <description>PARAMETER</description> </entityParameter> + <entityConsumer> + <name>ObjectRelations</name> + <title>Relations</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>ObjectRelation_entity</entityName> + <fieldName>AnyObject</fieldName> + </dependency> + <children> + <entityParameter> + <name>AnyObjectRowid_param</name> + <code>%aditoprj%/entity/Appointment_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js</code> + <expose v="true" /> + <mandatory v="false" /> + </entityParameter> + <entityParameter> + <name>AnyObjectType_param</name> + <code>%aditoprj%/entity/Appointment_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js</code> + </entityParameter> + </children> + </entityConsumer> + <entityParameter> + <name>AnyObjectRowid_param</name> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>AnyObjectType_param</name> + <description>PARAMETER</description> + </entityParameter> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/Appointment_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js b/entity/Appointment_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js new file mode 100644 index 00000000000..fa08fc1fd16 --- /dev/null +++ b/entity/Appointment_entity/entityfields/objectrelations/children/anyobjectrowid_param/code.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.UID")) \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js b/entity/Appointment_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js new file mode 100644 index 00000000000..efc405cb8b7 --- /dev/null +++ b/entity/Appointment_entity/entityfields/objectrelations/children/anyobjecttype_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getCurrentContextId()) \ No newline at end of file diff --git a/entity/Appointment_entity/recordcontainers/jdito/contentProcess.js b/entity/Appointment_entity/recordcontainers/jdito/contentProcess.js index e6467cae5b4..a30df98ad48 100644 --- a/entity/Appointment_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Appointment_entity/recordcontainers/jdito/contentProcess.js @@ -6,7 +6,6 @@ import("system.datetime"); import("system.eMath"); import("system.util"); -//logging.log("contentProcess") if(vars.exists("$param.Entry_param")) { var entry = JSON.parse(vars.getString("$param.Entry_param")); diff --git a/entity/ObjectRelation_entity/ObjectRelation_entity.aod b/entity/ObjectRelation_entity/ObjectRelation_entity.aod index 20aaa80e490..af84b90dd67 100644 --- a/entity/ObjectRelation_entity/ObjectRelation_entity.aod +++ b/entity/ObjectRelation_entity/ObjectRelation_entity.aod @@ -213,6 +213,12 @@ <fieldName>ObjectRelation_dfo</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>f3b9bfa5-e04d-45b4-8bd6-baed4c7ceac0</name> + <entityName>Appointment_entity</entityName> + <fieldName>ObjectRelations</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index 336d6b092bd..6315a5a483b 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -30,3 +30,4 @@ <indexsearchIncrementingIndexerBunchSize v="250" /> <indexsearchMaximumHits v="50000" /> </preferences> + diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index 0ee031cecc2..1cbfa06eaea 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -63,7 +63,8 @@ ContextUtils._getSelectMap = function() "Salesproject_context": [maskingUtils.concat([maskingUtils.cast("PROJECTCODE", SQLTYPES.VARCHAR, 10), "':'", "PROJECTTITLE"]), "SALESPROJECT", "SALESPROJECTID"], // TODO: keywords sind noch nicht in der DB somit gibt es nichts ähnliches zu getKeySQL. // maskingUtils.concat([SqlMaskingUtils.cast("CONTRACTCODE", "varchar", 10), getKeySQL("CONTRACTTYPE", "CONTRACTTYPE" )]) - "Contract_context": [maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10), "CONTRACT", "CONTRACTID"] + "Contract_context": [maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10), "CONTRACT", "CONTRACTID"], + "Appointment_context": ["SUMMARY", "ASYS_CALENDARBACKEND", "UID"] } } -- GitLab