Skip to content
Snippets Groups Projects
Commit 74f0349f authored by A.Voegl's avatar A.Voegl
Browse files

Merge origin/master into KeywordMigration

Conflicts:
	entity/Offer_entity/Offer_entity.aod
	entity/Organisation_entity/Organisation_entity.aod
	entity/Salesproject_entity/Salesproject_entity.aod
	entity/Task_entity/Task_entity.aod
	others/db_changes/data_alias/data/AditoBasic/ab_keyword_entry.xml
	others/db_changes/masterChangelog.xml
parents 115e64d5 e5f863eb
No related branches found
No related tags found
No related merge requests found
Showing
with 160 additions and 105 deletions
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.8" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/application/1.1.8">
<name>_____SYSTEM_APPLICATION</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<entityNode name="_____SYSTEM_COMPANY" kind="200">
<node name="Group" kind="123" title="">
<node name="Group2" kind="123" title="">
<node name="Util_lib" kind="103" />
<node name="INTERNAL_ADMINISTRATOR" kind="159" />
</node>
</node>
</entityNode>
<company>
<name>company</name>
<backgroundColor v="0xff83cbd8" />
</company>
</application>
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.8" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/application/1.1.8">
<name>_____SYSTEM_APPLICATION</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<entityNode name="_____SYSTEM_COMPANY" kind="200" />
<company>
<name>company</name>
<backgroundColor v="0xff83cbd8" />
</company>
</application>
......@@ -10,9 +10,11 @@
</entityProvider>
<entityField>
<name>ACTIVITYLINKID</name>
<valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/activitylinkid/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>OBJECT_TYPE</name>
<title>Object type</title>
<consumer>Contexts</consumer>
<linkedContext>Context</linkedContext>
<displayValueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess>
......@@ -22,22 +24,12 @@
<title>Beziehung</title>
<consumer>Objects</consumer>
<linkedContextProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/object_rowid/linkedContextProcess.js</linkedContextProcess>
<displayValueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/object_rowid/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>ACTIVITY_ID</name>
<valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/activity_id/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
<name>ObjectRowid_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityParameter>
<name>ObjectType_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityProvider>
<name>Link</name>
<fieldType>DEPENDENCY_IN</fieldType>
......@@ -54,11 +46,7 @@
</dependencies>
<children>
<entityParameter>
<name>ObjectRowid_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>ObjectType_param</name>
<name>ActivityId_param</name>
<expose v="true" />
</entityParameter>
</children>
......@@ -88,6 +76,11 @@
<fieldName>#PROVIDER</fieldName>
</dependency>
</entityConsumer>
<entityParameter>
<name>ActivityId_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("system.result");
result.string(vars.get("$param.ActivityId_param"))
\ No newline at end of file
import("system.util");
import("system.vars");
import("system.result");
import("system.neon");
import("system.vars");
//the code (tasknumber) value is genereated before save to prevent duplicate numbers
//so: no need to display it on new
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(neon.COMPONENTSTATE_READONLY);
\ No newline at end of file
result.string(util.getNewUUID());
\ No newline at end of file
import("system.vars");
import("system.db");
import("system.result");
import("Context_lib");
if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE"))
result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))));
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.db");
import("system.result");
import("Sql_lib");
logging.log("GET: " + vars.get("$param.ActivityId_param"))
var cond = SqlCondition.begin()
.andPrepareVars("ACTIVITYLINK.OBJECT_ROWID", "$param.ObjectRowid_param")
.andPrepareVars("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectType_param");
.andPrepareVars("ACTIVITYLINK.ACTIVITY_ID", "$param.ActivityId_param");
//TODO: use a preparedCondition when available #1030812 #1034026
result.string(db.translateCondition(cond.build("1 = 1")));
\ No newline at end of file
result.string(db.translateCondition(cond.build("1 = 0")));
\ No newline at end of file
......@@ -147,7 +147,6 @@
</entityField>
<entityParameter>
<name>ActivityId_param</name>
<expose v="true" />
<mandatory v="false" />
<description>PARAMETER</description>
</entityParameter>
......@@ -184,12 +183,9 @@
</dependency>
<children>
<entityParameter>
<name>ObjectRowid_param</name>
<code>%aditoprj%/entity/Activity_entity/entityfields/links/children/objectrowid_param/code.js</code>
</entityParameter>
<entityParameter>
<name>ObjectType_param</name>
<code>%aditoprj%/entity/Activity_entity/entityfields/links/children/objecttype_param/code.js</code>
<name>ActivityId_param</name>
<code>%aditoprj%/entity/Activity_entity/entityfields/links/children/activityid_param/code.js</code>
<expose v="true" />
</entityParameter>
</children>
</entityConsumer>
......@@ -238,6 +234,24 @@
<fieldName>Activities</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>207920cd-b4b8-4f40-b6c4-6e25d4df9947</name>
<entityName>Offer_entity</entityName>
<fieldName>Activities</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>b086fbf7-aa94-441f-a33c-e2ca8eda5dcd</name>
<entityName>Order_entity</entityName>
<fieldName>Activities</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>00b4f354-5b82-4071-b70c-acab4780a2de</name>
<entityName>Product_entity</entityName>
<fieldName>Activities</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
import("system.vars");
import("system.result");
result.string(vars.getString("$field.ATTRIBUTE_LEVEL"));
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.ACTIVITYID"));
\ No newline at end of file
......@@ -2,8 +2,5 @@ import("system.vars");
import("system.result");
import("Keyword_lib");
var histMedium;
histMedium = vars.get("$field.CATEGORY");
if (histMedium){
result.string(vars.get("$field.SUBJECT") + " (" + LegacyKeywordUtils.getViewValue("ACTIVITY.CATEGORY", histMedium) + ")");
}
\ No newline at end of file
var histMedium = vars.get("$field.CATEGORY");
result.string(vars.get("$field.SUBJECT") + (histMedium ? " (" + LegacyKeywordUtils.getViewValue("ACTIVITY.CATEGORY", histMedium) + ")" : ""));
......@@ -9,6 +9,7 @@ if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param") && vars.
var activityLinkCond = SqlCondition.begin().andPrepareVars("ACTIVITYLINK.OBJECT_ROWID", "$param.RowId_param")
.andPrepareVars("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectId_param");
// TODO: more performant way than IN. Maybe a join??
cond.and(db.translateStatement(activityLinkCond.buildSql("ACTIVITY.ACTIVITYID in (select ACTIVITYLINK.ACTIVITY_ID from ACTIVITYLINK", "1=2", ")")))
}
......
......@@ -115,16 +115,11 @@
</entityField>
<entityField>
<name>UID</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/uid/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>ATTENDEESLENGTH</name>
</entityField>
<entityField>
<name>LINKOBJECT</name>
<title>Linkobject</title>
<consumer>Objects</consumer>
<linkedContext>Object</linkedContext>
</entityField>
<entityField>
<name>ICON</name>
</entityField>
......@@ -187,12 +182,6 @@
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>LINKTYPE</name>
<title>Linktype</title>
<consumer>Contexts</consumer>
<linkedContext>Context</linkedContext>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
import("system.vars");
import("system.result");
import("system.util");
if(!(vars.get("$field.UID")))
result.string(util.getNewUUID());
else
result.string(vars.get("$field.UID"));
\ No newline at end of file
......@@ -34,7 +34,9 @@
<title>Value</title>
<contentTypeProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/contentTypeProcess.js</contentTypeProcess>
<resolution>DAY</resolution>
<possibleItemsProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/possibleItemsProcess.js</possibleItemsProcess>
<valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/onValueChange.js</onValueChange>
</entityField>
<entityField>
......@@ -57,6 +59,12 @@
<fieldName>AttributeChildren</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>ba8046ba-f58c-48f1-9c35-fe897247534a</name>
<entityName>Person_entity</entityName>
<fieldName>Attributes</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Attribute_lib");
result.object(AttributeUtil.getPossibleAttributes(vars.get("$param.objectType_param")));
result.object(AttributeUtil.getPossibleAttributes(vars.get("$param.objectType_param"), true));
import("system.db");
import("system.result");
import("system.vars");
import("Attribute_lib");
var attrType = AttributeHandler.begin(vars.get("$field.AB_ATTRIBUTE_ID")).getAttributeType();
if (attrType == $AttributeTypes.COMBO)
result.string(AttributeUtil.getSimpleAttributeName(vars.get("$field.ID_VALUE")));
else
result.string(vars.get("$field.ATTRIBUTERELATION_VALUE"));
import("system.db");
import("system.result");
import("system.vars");
import("Attribute_lib");
import("Sql_lib");
var attributeId = vars.get("$field.AB_ATTRIBUTE_ID");
var attrType = AttributeHandler.begin(attributeId).getAttributeType();
if (attrType == $AttributeTypes.COMBO)
{
var valueSql = SqlCondition.begin()
.andPrepare("AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID", attributeId)
.andPrepare("AB_ATTRIBUTE.ATTRIBUTE_TYPE", $AttributeTypes.COMBOVALUE)
.buildSql("select AB_ATTRIBUTEID, ATTRIBUTE_NAME from AB_ATTRIBUTE");
var valueList = db.table(valueSql);
result.object(valueList);
}
import("system.result");
import("system.vars");
import("Attribute_lib");
var attrField = AttributeHandler.begin(vars.get("$field.AB_ATTRIBUTE_ID")).getAttributeField();
if (attrField != null) //load the value from the correct field for the type
{
switch (attrField)
{
case "CHAR_VALUE":
result.string(vars.get("$field.CHAR_VALUE"));
break;
case "DATE_VALUE":
result.string(vars.get("$field.DATE_VALUE"));
break;
case "NUMBER_VALUE":
result.string(vars.get("$field.NUMBER_VALUE"));
break;
case "BOOL_VALUE":
result.string(vars.get("$field.BOOL_VALUE"));
break;
case "ID_VALUE":
result.string(vars.get("$field.ID_VALUE"));
break;
}
import("system.result");
import("system.vars");
import("Attribute_lib");
var attrType = AttributeHandler.begin(vars.get("$field.AB_ATTRIBUTE_ID")).getAttributeType();
if (attrType != null) //load the value from the correct field for the type
{
switch (attrType)
{
case $AttributeTypes.TEXT.toString():
result.string(vars.get("$field.CHAR_VALUE"));
break;
case $AttributeTypes.DATE.toString():
result.string(vars.get("$field.DATE_VALUE"));
break;
case $AttributeTypes.NUMBER.toString():
result.string(vars.get("$field.NUMBER_VALUE"));
break;
case $AttributeTypes.BOOLEAN.toString():
result.string(vars.get("$field.BOOL_VALUE"));
break;
case $AttributeTypes.COMBO.toString():
result.string(vars.get("$field.ID_VALUE"));
break;
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/Attribute_entity/documentation.adoc</documentation>
<iconId>VAADIN:TAG</iconId>
<titleProcess>%aditoprj%/entity/Attribute_entity/titleProcess.js</titleProcess>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
......@@ -22,6 +23,9 @@
<title>Type</title>
<consumer>KeywordAttributeType</consumer>
<mandatory v="true" />
<stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>AB_ATTRIBUTEID</name>
......@@ -32,7 +36,6 @@
<title>Parent Attribute</title>
<consumer>AttributeChildren</consumer>
<linkedContext>Attribute</linkedContext>
<groupable v="true" />
<stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/displayValueProcess.js</displayValueProcess>
......@@ -53,12 +56,6 @@
<triggerRecalculation v="true" />
<mandatory v="false" />
</entityParameter>
<entityParameter>
<name>attributeLevel_param</name>
<code>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/children/attributelevel_param/code.js</code>
<triggerRecalculation v="true" />
<mandatory v="false" />
</entityParameter>
</children>
</entityConsumer>
<entityProvider>
......@@ -124,11 +121,6 @@
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
<name>attributeLevel_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>ATTRIBUTE_LEVEL</name>
<title>Level</title>
......
import("system.db");
import("system.neon");
import("system.result");
import("system.vars");
import("Sql_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
if (vars.exists("$param.attributeLevel_param") && vars.get("$param.attributeLevel_param")
&& vars.exists("$param.attrParentId_param") && vars.get("$param.attrParentId_param"))
result.string(parseInt(vars.get("$param.attributeLevel_param")) + 1);
if (vars.get("$field.ATTRIBUTE_PARENT_ID") != "")
{
var level = db.cell(SqlCondition.begin()
.andPrepare("AB_ATTRIBUTE.AB_ATTRIBUTEID", vars.get("$field.ATTRIBUTE_PARENT_ID"))
.buildSql("select ATTRIBUTE_LEVEL from AB_ATTRIBUTE"));
result.string(parseInt(level) + 1);
}
else
result.string("0");
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Attribute_lib");
result.string(AttributeUtil.getAttributeNameById(vars.get("$field.AB_ATTRIBUTEID")));
\ No newline at end of file
result.string(AttributeUtil.getFullAttributeName(vars.get("$field.AB_ATTRIBUTEID")));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment