Skip to content
Snippets Groups Projects
Commit ef94e980 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Merge master into 1035100-AnpassungenMeilensteinen

Conflicts:
	language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod
	others/db_changes/data_alias/data/AditoBasic/ab_keyword_entry/init_AttributeType.xml
	others/db_changes/data_alias/struct/create_salesproject.xml
parents 271f18b4 c00704a0
No related branches found
No related tags found
No related merge requests found
Showing
with 229 additions and 40 deletions
......@@ -3001,6 +3001,34 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>PARENT_CONTEXT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="64" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>PARENT_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......@@ -3541,8 +3569,8 @@
<columnType v="4" />
<size v="10" />
<scale v="0" />
<notNull v="true" />
<isUnique v="true" />
<notNull v="false" />
<isUnique v="false" />
<index v="true" />
<documentation></documentation>
<title></title>
......@@ -3646,6 +3674,34 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>PARENT_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>PARENT_CONTEXT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="64" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
<?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>
......@@ -279,6 +279,60 @@
<searchable v="false" />
<valueProcess>%aditoprj%/entity/Activity_entity/entityfields/creator/valueProcess.js</valueProcess>
</entityField>
<entityConsumer>
<name>ModuleTrees</name>
<title>Baum</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>ModuleTree_entity</entityName>
<fieldName>TreeProvider</fieldName>
</dependency>
<children>
<entityParameter>
<name>ContextName</name>
<code>%aditoprj%/entity/Activity_entity/entityfields/moduletrees/children/contextname/code.js</code>
</entityParameter>
<entityParameter>
<name>ID</name>
<code>%aditoprj%/entity/Activity_entity/entityfields/moduletrees/children/id/code.js</code>
</entityParameter>
</children>
</entityConsumer>
<entityActionField>
<name>newActivity_action</name>
<fieldType>ACTION</fieldType>
<title>Neue Aktivität</title>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newactivity_action/onActionProcess.js</onActionProcess>
<iconId>VAADIN:PLUS</iconId>
</entityActionField>
<entityActionField>
<name>newTask_action</name>
<fieldType>ACTION</fieldType>
<title>Neue Aufgabe</title>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newtask_action/onActionProcess.js</onActionProcess>
<iconId>VAADIN:PLUS</iconId>
</entityActionField>
<entityParameter>
<name>ParentId_param</name>
<expose v="true" />
<documentation>%aditoprj%/entity/Activity_entity/entityfields/parentid_param/documentation.adoc</documentation>
<description>PARAMETER</description>
</entityParameter>
<entityParameter>
<name>ParentContext_param</name>
<expose v="true" />
<documentation>%aditoprj%/entity/Activity_entity/entityfields/parentcontext_param/documentation.adoc</documentation>
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>PARENT_ID</name>
<valueProcess>%aditoprj%/entity/Activity_entity/entityfields/parent_id/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>PARENT_CONTEXT</name>
<valueProcess>%aditoprj%/entity/Activity_entity/entityfields/parent_context/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -330,6 +384,14 @@
<name>CREATOR.value</name>
<recordfield>ACTIVITY.CREATOR</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PARENT_CONTEXT.value</name>
<recordfield>ACTIVITY.PARENT_CONTEXT</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PARENT_ID.value</name>
<recordfield>ACTIVITY.PARENT_ID</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
import("system.result");
result.string("Activity");
\ No newline at end of file
import("system.result");
import("system.vars");
result.string(vars.get("$field.ACTIVITYID"));
\ No newline at end of file
import("system.neon");
import("system.vars");
var params = {
"ParentId_param": vars.get("$field.ACTIVITYID"),
"ParentContext_param": "Activity"
};
neon.openContext("Activity", "ActivityEdit_view", null, neon.OPERATINGSTATE_NEW, params)
\ No newline at end of file
import("system.neon");
import("system.vars");
var params = {
"ParentId_param": vars.get("$field.ACTIVITYID"),
"ParentContext_param": "Activity"
};
neon.openContext("Task", "TaskEdit_view", null, neon.OPERATINGSTATE_NEW, params)
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$param.ParentContext_param"));
import("system.vars");
import("system.result");
result.string(vars.get("$param.ParentId_param"));
Describes the name of the parent element's context name.
This parameter is used to link a new activity to an existing.
(Also see `ParentId_param`)
\ No newline at end of file
Describes the ID of the parent element's context name.
This parameter is used to link a new activity to an existing.
(Also see `ParentContextName_param`)
\ No newline at end of file
......@@ -59,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>
......
......@@ -23,6 +23,7 @@
<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>
......
import("system.db");
import("system.neon");
import("system.result");
import("system.vars");
import("Attribute_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$field.ATTRIBUTE_PARENT_ID") != "")
{
var type = AttributeHandler.begin(vars.get("$field.ATTRIBUTE_PARENT_ID")).getAttributeType();
if (type == $AttributeTypes.COMBO)
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
......@@ -7,24 +7,8 @@ import("Attribute_lib");
var condition = "AB_ATTRIBUTE.ATTRIBUTE_TYPE = '" + $AttributeTypes.GROUP + "'";
if (vars.exists("$param.attrParentId_param") && vars.get("$param.attrParentId_param"))
condition = "AB_ATTRIBUTE.AB_ATTRIBUTEID in ('" + getAllChildren(vars.getString("$param.attrParentId_param")).join("','") + "')";
condition = "AB_ATTRIBUTE.AB_ATTRIBUTEID in ('" + AttributeUtil.getAllChildren(vars.getString("$param.attrParentId_param")).join("','") + "')";
else if (vars.get("$param.attrParentId_param") !== "")
condition = "";
result.string(condition);
function getAllChildren (pAttributeId)
{
var childIds = [];
var attributes= [pAttributeId];
while (attributes.length > 0)
{
attributes = db.array(db.COLUMN, SqlCondition.begin()
.and("AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID in ('" + attributes.join("','") + "')")
.buildSql("select AB_ATTRIBUTEID from AB_ATTRIBUTE")
);
if (attributes.length > 0)
childIds = childIds.concat(attributes);
}
return childIds;
}
import("system.vars");
import("system.db");
import("Sql_lib");
import("Attribute_lib");
var attributeId = vars.get("$field.AB_ATTRIBUTEID");
var usageCondition = SqlCondition.begin()
.andPrepare("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", attributeId)
var childIds = AttributeUtil.getAllChildren(attributeId).concat(attributeId);
var condition = SqlCondition.begin()
.and("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID in ('" + childIds.join("','") + "')")
.build();
//delete all entries in AB_ATTRIBUTEUSAGE belonging to the attribute to avoid unrelated entries
db.deleteData("AB_ATTRIBUTEUSAGE", usageCondition);
\ No newline at end of file
db.deleteData("AB_ATTRIBUTEUSAGE", condition);
condition = SqlCondition.begin()
.and("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID in ('" + childIds.join("','") + "')")
.build();
//delete all entries in AB_ATTRIBUTERELATION for the attributes
db.deleteData("AB_ATTRIBUTERELATION", condition);
condition = SqlCondition.begin()
.and("AB_ATTRIBUTE.AB_ATTRIBUTEID in ('" + childIds.join("','") + "')")
.build();
//delete all attribute children
db.deleteData("AB_ATTRIBUTE", condition);
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
......@@ -92,6 +92,7 @@
<name>db</name>
<alias>Data_alias</alias>
<conditionProcess>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<onDBDelete>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<linkInformation>
<linkInformation>
<name>bd113d67-34ab-4708-b0e5-60a44332e6b8</name>
......
import("Sql_lib");
import("system.db");
var cond = SqlCondition.begin().andPrepareVars("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID", "$field.AB_KEYWORD_ATTRIBUTEID").build("1=2");
db.deleteData("AB_KEYWORD_ATTRIBUTERELATION", cond);
\ No newline at end of file
......@@ -22,6 +22,8 @@
<mandatory v="true" />
<possibleItemsProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/possibleItemsProcess.js</possibleItemsProcess>
<groupable v="true" />
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/stateProcess.js</stateProcess>
</entityField>
<entityField>
<name>AB_KEYWORD_ENTRYID</name>
......@@ -30,10 +32,13 @@
</entityField>
<entityField>
<name>KEYID</name>
<documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/documentation.adoc</documentation>
<title>Key</title>
<mandatory v="true" />
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/valueProcess.js</valueProcess>
<onValidation>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/onValidation.js</onValidation>
</entityField>
<entityField>
<name>TITLE</name>
......@@ -294,7 +299,7 @@
<alias>Data_alias</alias>
<conditionProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<orderClauseProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<onDBUpdate>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate>
<onDBDelete>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<linkInformation>
<linkInformation>
<name>52acbfe0-57f4-4614-83af-9882e168f431</name>
......
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