From 66f755e94f626034f9491ed504447d66e9ed03ef Mon Sep 17 00:00:00 2001 From: "S.Listl" <S.Listl@SLISTL.aditosoftware.local> Date: Wed, 3 Apr 2019 13:35:36 +0200 Subject: [PATCH] Attribute: type memo removed --- aliasDefinition/Data_alias/Data_alias.aod | 44 +- .../AttributeRelation_entity.aod | 20 +- .../ab_attribute_id/onValueChange.js | 3 +- .../{bool_value => int_value}/valueProcess.js | 2 +- .../entityfields/valueproxy/valueProcess.js | 3 +- .../EmployeeRole_entity.aod | 114 ++-- .../entityfields/role/possibleItemsProcess.js | 15 +- entity/Employee_entity/Employee_entity.aod | 565 +++++++++--------- .../children/username_param/valueProcess.js | 4 + .../StoredSelection_entity.aod | 112 ++-- .../recordcontainers/jdito/onDelete.js | 29 + .../StoredSelectionFilter_view.aod | 53 +- .../2019.2/AditoBasic/init_AttributeType.xml | 15 - .../basic/2019.2/AttributeKeyword.xml | 10 +- process/Attribute_lib/process.js | 16 +- 15 files changed, 509 insertions(+), 496 deletions(-) rename entity/AttributeRelation_entity/entityfields/{bool_value => int_value}/valueProcess.js (65%) create mode 100644 entity/Employee_entity/entityfields/storedselections/children/username_param/valueProcess.js create mode 100644 entity/StoredSelection_entity/recordcontainers/jdito/onDelete.js diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 4c3d0ca72f..0c33b0d95f 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -4576,20 +4576,6 @@ <title></title> <description></description> </entityFieldDb> - <entityFieldDb> - <name>BOOL_VALUE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="5" /> - <size v="5" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <documentation></documentation> - <title></title> - <description></description> - </entityFieldDb> <entityFieldDb> <name>DATE_VALUE</name> <dbName></dbName> @@ -4651,7 +4637,7 @@ <dbName></dbName> <primaryKey v="false" /> <columnType v="12" /> - <size v="63" /> + <size v="512" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -4688,20 +4674,6 @@ <title></title> <description></description> </entityFieldDb> - <entityFieldDb> - <name>MEMO_VALUE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="2005" /> - <size v="2147483647" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <documentation></documentation> - <title></title> - <description></description> - </entityFieldDb> <entityFieldDb> <name>DATE_EDIT</name> <dbName></dbName> @@ -4758,6 +4730,20 @@ <title></title> <description></description> </entityFieldDb> + <entityFieldDb> + <name>INT_VALUE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> </entityFields> </entityDb> <entityDb> diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index e6588fbe36..d06a6101b3 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -131,10 +131,10 @@ <description>PARAMETER</description> </entityParameter> <entityField> - <name>BOOL_VALUE</name> + <name>INT_VALUE</name> <contentType>BOOLEAN</contentType> <searchable v="false" /> - <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/bool_value/valueProcess.js</valueProcess> + <valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/int_value/valueProcess.js</valueProcess> </entityField> <entityField> <name>ID_VALUE</name> @@ -169,10 +169,6 @@ </entityParameter> </children> </entityConsumer> - <entityField> - <name>MEMO_VALUE</name> - <searchable v="false" /> - </entityField> <entityParameter> <name>FilteredAttributeIds_param</name> <expose v="true" /> @@ -278,10 +274,6 @@ <name>NUMBER_VALUE.value</name> <recordfield>AB_ATTRIBUTERELATION.NUMBER_VALUE</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>BOOL_VALUE.value</name> - <recordfield>AB_ATTRIBUTERELATION.BOOL_VALUE</recordfield> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>ID_VALUE.value</name> <recordfield>AB_ATTRIBUTERELATION.ID_VALUE</recordfield> @@ -290,10 +282,6 @@ <name>ATTRIBUTE_PARENT_ID.value</name> <recordfield>AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>MEMO_VALUE.value</name> - <recordfield>AB_ATTRIBUTERELATION.MEMO_VALUE</recordfield> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>USER_NEW.value</name> <recordfield>AB_ATTRIBUTERELATION.USER_NEW</recordfield> @@ -310,6 +298,10 @@ <name>DATE_EDIT.value</name> <recordfield>AB_ATTRIBUTERELATION.DATE_EDIT</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>INT_VALUE.value</name> + <recordfield>AB_ATTRIBUTERELATION.INT_VALUE</recordfield> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/AttributeRelation_entity/entityfields/ab_attribute_id/onValueChange.js b/entity/AttributeRelation_entity/entityfields/ab_attribute_id/onValueChange.js index 9347efa6c0..132c9bbe34 100644 --- a/entity/AttributeRelation_entity/entityfields/ab_attribute_id/onValueChange.js +++ b/entity/AttributeRelation_entity/entityfields/ab_attribute_id/onValueChange.js @@ -3,10 +3,9 @@ import("system.neon"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) { - neon.setFieldValue("$field.BOOL_VALUE", null); + neon.setFieldValue("$field.INT_VALUE", null); neon.setFieldValue("$field.CHAR_VALUE", null); neon.setFieldValue("$field.DATE_VALUE", null); neon.setFieldValue("$field.ID_VALUE", null); neon.setFieldValue("$field.NUMBER_VALUE", null); - neon.setFieldValue("$field.MEMO_VALUE", null); } \ No newline at end of file diff --git a/entity/AttributeRelation_entity/entityfields/bool_value/valueProcess.js b/entity/AttributeRelation_entity/entityfields/int_value/valueProcess.js similarity index 65% rename from entity/AttributeRelation_entity/entityfields/bool_value/valueProcess.js rename to entity/AttributeRelation_entity/entityfields/int_value/valueProcess.js index c5937313ed..91ca68074f 100644 --- a/entity/AttributeRelation_entity/entityfields/bool_value/valueProcess.js +++ b/entity/AttributeRelation_entity/entityfields/int_value/valueProcess.js @@ -1,4 +1,4 @@ import("system.vars"); import("system.result"); -if(!vars.get("$field.BOOL_VALUE")) +if(!vars.get("$field.INT_VALUE")) result.string("0"); \ No newline at end of file diff --git a/entity/AttributeRelation_entity/entityfields/valueproxy/valueProcess.js b/entity/AttributeRelation_entity/entityfields/valueproxy/valueProcess.js index f1d1025828..bea46eecb1 100644 --- a/entity/AttributeRelation_entity/entityfields/valueproxy/valueProcess.js +++ b/entity/AttributeRelation_entity/entityfields/valueproxy/valueProcess.js @@ -6,9 +6,8 @@ import("Attribute_lib"); "$field.CHAR_VALUE"; "$field.DATE_VALUE"; "$field.NUMBER_VALUE"; -"$field.BOOL_VALUE"; +"$field.INT_VALUE"; "$field.ID_VALUE"; -"$field.MEMO_VALUE"; if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW) { diff --git a/entity/EmployeeRole_entity/EmployeeRole_entity.aod b/entity/EmployeeRole_entity/EmployeeRole_entity.aod index db73c36b4c..634f8e557f 100644 --- a/entity/EmployeeRole_entity/EmployeeRole_entity.aod +++ b/entity/EmployeeRole_entity/EmployeeRole_entity.aod @@ -1,56 +1,58 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1"> - <name>EmployeeRole_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>UID</name> - </entityField> - <entityParameter> - <name>UserTitle_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityProvider> - <name>EmployeeRoles</name> - <fieldType>DEPENDENCY_IN</fieldType> - <dependencies> - <entityDependency> - <name>3bcec57a-7165-4773-9253-5ecab26ee3f4</name> - <entityName>Employee_entity</entityName> - <fieldName>EmployeeRoles</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>UserTitle_param</name> - <expose v="true" /> - </entityParameter> - </children> - </entityProvider> - <entityField> - <name>ROLE</name> - <title>Role</title> - <possibleItemsProcess>%aditoprj%/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js</possibleItemsProcess> - </entityField> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js</onInsert> - <onUpdate>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js</onUpdate> - <onDelete>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js</onDelete> - <recordFields> - <element>UID.value</element> - <element>ROLE.value</element> - </recordFields> - </jDitoRecordContainer> - </recordContainers> -</entity> +<?xml version="1.0" encoding="UTF-8"?> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1"> + <name>EmployeeRole_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <recordContainer>jdito</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>UID</name> + </entityField> + <entityParameter> + <name>UserTitle_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityProvider> + <name>EmployeeRoles</name> + <fieldType>DEPENDENCY_IN</fieldType> + <dependencies> + <entityDependency> + <name>3bcec57a-7165-4773-9253-5ecab26ee3f4</name> + <entityName>Employee_entity</entityName> + <fieldName>EmployeeRoles</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>UserTitle_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + </children> + </entityProvider> + <entityField> + <name>ROLE</name> + <title>Role</title> + <possibleItemsProcess>%aditoprj%/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js</possibleItemsProcess> + </entityField> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <contentProcess>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <onInsert>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js</onInsert> + <onUpdate>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js</onUpdate> + <onDelete>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js</onDelete> + <recordFields> + <element>UID.value</element> + <element>ROLE.value</element> + </recordFields> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js b/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js index a9b4b9a616..6c9d51db74 100644 --- a/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js +++ b/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js @@ -1,10 +1,23 @@ +import("system.vars"); import("system.result"); import("system.tools"); var roles = []; var allRoles = tools.getAllRoles([tools.ROLE_INTERNAL, tools.ROLE_PROJECT, tools.ROLE_XMPP]); +var excludeRoles = { + "INTERNAL_GROUPWARE" : true, + "INTERNAL_SNMP" : true, + "INTERNAL_DESIGNER" : true, + "INTERNAL_TECHNICAL" : true +}; + +var userRoles = tools.getRoles(vars.get("$param.UserTitle_param")); +for (let i in userRoles) + if (vars.get("$field.ROLE") != userRoles[i]) + excludeRoles[userRoles[i]] = true; for (let roleId in allRoles) - roles.push([roleId, allRoles[roleId][0]]) + if (!excludeRoles[roleId]) + roles.push([roleId, allRoles[roleId][0]]); result.object(roles); \ No newline at end of file diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod index 6ec492b15b..c4d400c893 100644 --- a/entity/Employee_entity/Employee_entity.aod +++ b/entity/Employee_entity/Employee_entity.aod @@ -1,280 +1,285 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1"> - <name>Employee_entity</name> - <title>Employee</title> - <majorModelMode>DISTRIBUTED</majorModelMode> - <onValidation>%aditoprj%/entity/Employee_entity/onValidation.js</onValidation> - <afterOperatingState>%aditoprj%/entity/Employee_entity/afterOperatingState.js</afterOperatingState> - <iconId>VAADIN:GROUP</iconId> - <titleProcess>%aditoprj%/entity/Employee_entity/titleProcess.js</titleProcess> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - <lookupIdfield>CONTACT_ID</lookupIdfield> - </entityProvider> - <entityField> - <name>UID</name> - <title>Username</title> - <mandatory v="true" /> - <onValidation>%aditoprj%/entity/Employee_entity/entityfields/uid/onValidation.js</onValidation> - </entityField> - <entityField> - <name>TITLE_ORIGINAL</name> - <description>the original username, this is required to update the correct user when the username is changed</description> - <searchable v="false" /> - </entityField> - <entityField> - <name>CONTACT_ID</name> - <title>Person</title> - <consumer>Contacts</consumer> - <linkedContext>Person</linkedContext> - <mandatory v="true" /> - <onValidation>%aditoprj%/entity/Employee_entity/entityfields/contact_id/onValidation.js</onValidation> - </entityField> - <entityField> - <name>FIRSTNAME</name> - <title>Firstname</title> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/firstname/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>LASTNAME</name> - <title>Lastname</title> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/lastname/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>ISACTIVE</name> - <title>Active</title> - <contentType>BOOLEAN</contentType> - <possibleItemsProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js</possibleItemsProcess> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>EMAIL_ADDRESS</name> - <title>Email</title> - <mandatory v="true" /> - </entityField> - <entityField> - <name>PASSWORD</name> - <title>Password</title> - <contentType>PASSWORD</contentType> - <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/password/mandatoryProcess.js</mandatoryProcess> - <searchable v="false" /> - <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/password/stateProcess.js</stateProcess> - </entityField> - <entityField> - <name>CONFIRM_PASSWORD</name> - <title>Confirm password</title> - <contentType>PASSWORD</contentType> - <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/mandatoryProcess.js</mandatoryProcess> - <searchable v="false" /> - <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/stateProcess.js</stateProcess> - </entityField> - <entityActionField> - <name>setPassword</name> - <fieldType>ACTION</fieldType> - <title>Set password</title> - <onActionProcess>%aditoprj%/entity/Employee_entity/entityfields/setpassword/onActionProcess.js</onActionProcess> - <iconId>VAADIN:PASSWORD</iconId> - </entityActionField> - <entityParameter> - <name>PasswordChange_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OnlyActives_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/onlyactives_param/valueProcess.js</valueProcess> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityConsumer> - <name>Contacts</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>Person_entity</entityName> - <fieldName>#PROVIDER</fieldName> - </dependency> - </entityConsumer> - <entityConsumer> - <name>Attributes</name> - <title>Attributes</title> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>RelationsForSpecificObject</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectRowId_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityFieldGroup> - <name>NAME_fieldGroup</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js</valueProcess> - <title>Name</title> - <description>FIELDGROUP</description> - <fields> - <element>FIRSTNAME</element> - <element>LASTNAME</element> - </fields> - </entityFieldGroup> - <entityField> - <name>IMAGE</name> - <contentType>IMAGE</contentType> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/image/valueProcess.js</valueProcess> - <onValueChange>%aditoprj%/entity/Employee_entity/entityfields/image/onValueChange.js</onValueChange> - <onValueChangeTypes> - <element>MASK</element> - </onValueChangeTypes> - </entityField> - <entityField> - <name>DEPARTMENT</name> - <title>Department</title> - <state>INVISIBLE</state> - </entityField> - <entityField> - <name>DESCRIPTION</name> - <title>Description</title> - <contentType>LONG_TEXT</contentType> - </entityField> - <entityField> - <name>ROLES</name> - </entityField> - <entityConsumer> - <name>EmployeeRoles</name> - <title>Roles</title> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>EmployeeRole_entity</entityName> - <fieldName>EmployeeRoles</fieldName> - </dependency> - <children> - <entityParameter> - <name>UserTitle_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>AttributeTree</name> - <title>Attribute Tree</title> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>AttributeRelationTree_entity</entityName> - <fieldName>TreeProvider</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectRowId_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Documents</name> - <title>Documents</title> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> - <children> - <entityParameter> - <name>AssignmentName_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AssignmentTable_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AssignmentRowId_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>StoredSelections</name> - <title>Stored selections</title> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>StoredSelection_entity</entityName> - <fieldName>StoredSelections</fieldName> - </dependency> - <children> - <entityParameter> - <name>Base64String_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>STORED_SELECTIONS</name> - <searchable v="false" /> - </entityField> - <entityProvider> - <name>Employees</name> - <fieldType>DEPENDENCY_IN</fieldType> - <dependencies> - <entityDependency> - <name>0ca415b9-a940-424e-bee8-05c007b20659</name> - <entityName>Activity_entity</entityName> - <fieldName>Employees</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>73f93f34-bfe9-48fd-b9ce-7f8ba46014c9</name> - <entityName>Timetracking_entity</entityName> - <fieldName>Employees</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>OnlyActives_param</name> - <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employees/children/onlyactives_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityProvider> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onInsert.js</onInsert> - <onUpdate>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onUpdate.js</onUpdate> - <onDelete>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onDelete.js</onDelete> - <recordFields> - <element>UID.value</element> - <element>TITLE_ORIGINAL.value</element> - <element>ISACTIVE.value</element> - <element>FIRSTNAME.value</element> - <element>LASTNAME.value</element> - <element>EMAIL_ADDRESS.value</element> - <element>DESCRIPTION.value</element> - <element>CONTACT_ID.value</element> - <element>CONTACT_ID.displayValue</element> - <element>STORED_SELECTIONS.value</element> - </recordFields> - </jDitoRecordContainer> - </recordContainers> -</entity> +<?xml version="1.0" encoding="UTF-8"?> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1"> + <name>Employee_entity</name> + <title>Employee</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <onValidation>%aditoprj%/entity/Employee_entity/onValidation.js</onValidation> + <afterOperatingState>%aditoprj%/entity/Employee_entity/afterOperatingState.js</afterOperatingState> + <iconId>VAADIN:GROUP</iconId> + <titleProcess>%aditoprj%/entity/Employee_entity/titleProcess.js</titleProcess> + <recordContainer>jdito</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + <lookupIdfield>CONTACT_ID</lookupIdfield> + </entityProvider> + <entityField> + <name>UID</name> + <title>Username</title> + <mandatory v="true" /> + <onValidation>%aditoprj%/entity/Employee_entity/entityfields/uid/onValidation.js</onValidation> + </entityField> + <entityField> + <name>TITLE_ORIGINAL</name> + <description>the original username, this is required to update the correct user when the username is changed</description> + <searchable v="false" /> + </entityField> + <entityField> + <name>CONTACT_ID</name> + <title>Person</title> + <consumer>Contacts</consumer> + <linkedContext>Person</linkedContext> + <mandatory v="true" /> + <onValidation>%aditoprj%/entity/Employee_entity/entityfields/contact_id/onValidation.js</onValidation> + </entityField> + <entityField> + <name>FIRSTNAME</name> + <title>Firstname</title> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/firstname/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>LASTNAME</name> + <title>Lastname</title> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/lastname/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ISACTIVE</name> + <title>Active</title> + <contentType>BOOLEAN</contentType> + <possibleItemsProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js</possibleItemsProcess> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>EMAIL_ADDRESS</name> + <title>Email</title> + <mandatory v="true" /> + </entityField> + <entityField> + <name>PASSWORD</name> + <title>Password</title> + <contentType>PASSWORD</contentType> + <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/password/mandatoryProcess.js</mandatoryProcess> + <searchable v="false" /> + <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/password/stateProcess.js</stateProcess> + </entityField> + <entityField> + <name>CONFIRM_PASSWORD</name> + <title>Confirm password</title> + <contentType>PASSWORD</contentType> + <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/mandatoryProcess.js</mandatoryProcess> + <searchable v="false" /> + <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/stateProcess.js</stateProcess> + </entityField> + <entityActionField> + <name>setPassword</name> + <fieldType>ACTION</fieldType> + <title>Set password</title> + <onActionProcess>%aditoprj%/entity/Employee_entity/entityfields/setpassword/onActionProcess.js</onActionProcess> + <iconId>VAADIN:PASSWORD</iconId> + </entityActionField> + <entityParameter> + <name>PasswordChange_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OnlyActives_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/onlyactives_param/valueProcess.js</valueProcess> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityConsumer> + <name>Contacts</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Person_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Attributes</name> + <title>Attributes</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>RelationsForSpecificObject</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityFieldGroup> + <name>NAME_fieldGroup</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js</valueProcess> + <title>Name</title> + <description>FIELDGROUP</description> + <fields> + <element>FIRSTNAME</element> + <element>LASTNAME</element> + </fields> + </entityFieldGroup> + <entityField> + <name>IMAGE</name> + <contentType>IMAGE</contentType> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/image/valueProcess.js</valueProcess> + <onValueChange>%aditoprj%/entity/Employee_entity/entityfields/image/onValueChange.js</onValueChange> + <onValueChangeTypes> + <element>MASK</element> + </onValueChangeTypes> + </entityField> + <entityField> + <name>DEPARTMENT</name> + <title>Department</title> + <state>INVISIBLE</state> + </entityField> + <entityField> + <name>DESCRIPTION</name> + <title>Description</title> + <contentType>LONG_TEXT</contentType> + </entityField> + <entityField> + <name>ROLES</name> + </entityField> + <entityConsumer> + <name>EmployeeRoles</name> + <title>Roles</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>EmployeeRole_entity</entityName> + <fieldName>EmployeeRoles</fieldName> + </dependency> + <children> + <entityParameter> + <name>UserTitle_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>AttributeTree</name> + <title>Attribute Tree</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>AttributeRelationTree_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Documents</name> + <title>Documents</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> + <children> + <entityParameter> + <name>AssignmentName_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentTable_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentRowId_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>StoredSelections</name> + <title>Stored selections</title> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>StoredSelection_entity</entityName> + <fieldName>StoredSelections</fieldName> + </dependency> + <children> + <entityParameter> + <name>Base64String_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>UserName_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/storedselections/children/username_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>STORED_SELECTIONS</name> + <searchable v="false" /> + </entityField> + <entityProvider> + <name>Employees</name> + <fieldType>DEPENDENCY_IN</fieldType> + <lookupIdfield>CONTACT_ID</lookupIdfield> + <dependencies> + <entityDependency> + <name>0ca415b9-a940-424e-bee8-05c007b20659</name> + <entityName>Activity_entity</entityName> + <fieldName>Employees</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>73f93f34-bfe9-48fd-b9ce-7f8ba46014c9</name> + <entityName>Timetracking_entity</entityName> + <fieldName>Employees</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>OnlyActives_param</name> + <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employees/children/onlyactives_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityProvider> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <contentProcess>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <onInsert>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onInsert.js</onInsert> + <onUpdate>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onUpdate.js</onUpdate> + <onDelete>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onDelete.js</onDelete> + <recordFields> + <element>UID.value</element> + <element>TITLE_ORIGINAL.value</element> + <element>ISACTIVE.value</element> + <element>FIRSTNAME.value</element> + <element>LASTNAME.value</element> + <element>EMAIL_ADDRESS.value</element> + <element>DESCRIPTION.value</element> + <element>CONTACT_ID.value</element> + <element>CONTACT_ID.displayValue</element> + <element>STORED_SELECTIONS.value</element> + </recordFields> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/Employee_entity/entityfields/storedselections/children/username_param/valueProcess.js b/entity/Employee_entity/entityfields/storedselections/children/username_param/valueProcess.js new file mode 100644 index 0000000000..2c71e53a49 --- /dev/null +++ b/entity/Employee_entity/entityfields/storedselections/children/username_param/valueProcess.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/StoredSelection_entity/StoredSelection_entity.aod b/entity/StoredSelection_entity/StoredSelection_entity.aod index 66698e0d50..59114c2e09 100644 --- a/entity/StoredSelection_entity/StoredSelection_entity.aod +++ b/entity/StoredSelection_entity/StoredSelection_entity.aod @@ -1,53 +1,59 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1"> - <name>StoredSelection_entity</name> - <title>Stored selections</title> - <majorModelMode>DISTRIBUTED</majorModelMode> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>UID</name> - </entityField> - <entityParameter> - <name>Base64String_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityProvider> - <name>StoredSelections</name> - <fieldType>DEPENDENCY_IN</fieldType> - <dependencies> - <entityDependency> - <name>1386345f-0ed8-4c82-b96d-a249775314ee</name> - <entityName>Employee_entity</entityName> - <fieldName>StoredSelections</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - </entityProvider> - <entityField> - <name>CONTEXT_NAME</name> - <title>Module</title> - <state>READONLY</state> - </entityField> - <entityField> - <name>SELECTION_TITLE</name> - <title>Name</title> - <state>READONLY</state> - </entityField> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <contentProcess>%aditoprj%/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <recordFields> - <element>UID.value</element> - <element>CONTEXT_NAME.value</element> - <element>SELECTION_TITLE.value</element> - </recordFields> - </jDitoRecordContainer> - </recordContainers> -</entity> +<?xml version="1.0" encoding="UTF-8"?> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1"> + <name>StoredSelection_entity</name> + <title>Stored selections</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <recordContainer>jdito</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>UID</name> + </entityField> + <entityParameter> + <name>Base64String_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityProvider> + <name>StoredSelections</name> + <fieldType>DEPENDENCY_IN</fieldType> + <dependencies> + <entityDependency> + <name>1386345f-0ed8-4c82-b96d-a249775314ee</name> + <entityName>Employee_entity</entityName> + <fieldName>StoredSelections</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>CONTEXT_NAME</name> + <title>Module</title> + <state>READONLY</state> + </entityField> + <entityField> + <name>SELECTION_TITLE</name> + <title>Name</title> + <state>READONLY</state> + </entityField> + <entityParameter> + <name>UserName_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <contentProcess>%aditoprj%/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <onDelete>%aditoprj%/entity/StoredSelection_entity/recordcontainers/jdito/onDelete.js</onDelete> + <recordFields> + <element>UID.value</element> + <element>CONTEXT_NAME.value</element> + <element>SELECTION_TITLE.value</element> + </recordFields> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/StoredSelection_entity/recordcontainers/jdito/onDelete.js b/entity/StoredSelection_entity/recordcontainers/jdito/onDelete.js new file mode 100644 index 0000000000..cf864004f9 --- /dev/null +++ b/entity/StoredSelection_entity/recordcontainers/jdito/onDelete.js @@ -0,0 +1,29 @@ +import("system.util"); +import("system.pack"); +import("system.vars"); +import("system.tools"); +import("Employee_lib"); + +var userName = vars.exists("$param.UserName_param") && vars.get("$param.UserName_param"); +var contextName = vars.get("$field.CONTEXT_NAME"); +var selectionTitle = vars.get("$field.SELECTION_TITLE"); + +if (vars.exists("$param.Base64String_param") && vars.get("$param.Base64String_param") && user && tools.existUsers(user)) +{ + var user; + if (userName == EmployeeUtils.getCurrentUserName()) + user = tools.getCurrentUser(); + else + user = tools.getUser(userName, tools.PROFILE_FULL); + + var codedSelections = pack.gunzip(vars.get("$param.Base64String_param")); + var selections = new XML(util.decodeBase64String(codedSelections)); + delete selections.FRAME.(NAME == contextName).STORE.(ID == "#STORE_SAVED").ELEMENT.(TITLE == selectionTitle)[0]; + + user[tools.PARAMS][tools.FRAME_STOREDSEARCHES] = pack.gzip(util.encodeBase64String(selections.toString())); + + if (userName == EmployeeUtils.getCurrentUserName()) + tools.updateCurrentUser(user) + else + tools.updateUser(user); +} \ No newline at end of file diff --git a/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod b/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod index 0fc464bb78..9974513f1b 100644 --- a/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod +++ b/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod @@ -1,26 +1,27 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>StoredSelectionFilter_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <tableViewTemplate> - <name>Table</name> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>713574de-2d9c-4006-93a3-3860fb145c26</name> - <entityField>CONTEXT_NAME</entityField> - </neonTableColumn> - <neonTableColumn> - <name>4cc4d5ff-24cf-46d9-9941-cda11e445a17</name> - <entityField>SELECTION_TITLE</entityField> - </neonTableColumn> - </columns> - </tableViewTemplate> - </children> -</neonView> +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>StoredSelectionFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>Table</name> + <isEditable v="false" /> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>713574de-2d9c-4006-93a3-3860fb145c26</name> + <entityField>CONTEXT_NAME</entityField> + </neonTableColumn> + <neonTableColumn> + <name>4cc4d5ff-24cf-46d9-9941-cda11e445a17</name> + <entityField>SELECTION_TITLE</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/others/db_changes/Data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml b/others/db_changes/Data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml index 99852b24f7..d9d8b0d5c9 100644 --- a/others/db_changes/Data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml +++ b/others/db_changes/Data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml @@ -17,15 +17,6 @@ <column name="ISACTIVE" valueNumeric="1"/> <column name="ISESSENTIAL" valueNumeric="1"/> </insert> - <insert tableName="AB_KEYWORD_ENTRY"> - <column name="AB_KEYWORD_ENTRYID" value="1fa94dc3-b875-4e95-9ec1-8cb714f058fb"/> - <column name="KEYID" value="MEMO"/> - <column name="TITLE" value="Memo"/> - <column name="CONTAINER" value="AttributeType"/> - <column name="SORTING" valueNumeric="8"/> - <column name="ISACTIVE" valueNumeric="1"/> - <column name="ISESSENTIAL" valueNumeric="1"/> - </insert> <rollback> <delete tableName="AB_KEYWORD_ENTRY"> <where>AB_KEYWORD_ENTRYID = ?</where> @@ -33,12 +24,6 @@ <param value="9d2f9605-1a5e-47d3-8920-168f5637e37f"/> </whereParams> </delete> - <delete tableName="AB_KEYWORD_ENTRY"> - <where>AB_KEYWORD_ENTRYID = ?</where> - <whereParams> - <param value="1fa94dc3-b875-4e95-9ec1-8cb714f058fb"/> - </whereParams> - </delete> </rollback> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/others/db_changes/Data_alias/basic/2019.2/AttributeKeyword.xml b/others/db_changes/Data_alias/basic/2019.2/AttributeKeyword.xml index 0186627b55..272ae0c6a2 100644 --- a/others/db_changes/Data_alias/basic/2019.2/AttributeKeyword.xml +++ b/others/db_changes/Data_alias/basic/2019.2/AttributeKeyword.xml @@ -3,16 +3,16 @@ <changeSet author="s.listl" id="f527a5cc-f1e5-497f-a069-33aee944d421"> <addColumn tableName="AB_ATTRIBUTE"> <column name="KEYWORD_CONTAINER" type="VARCHAR(80)"/> - </addColumn> - <addColumn tableName="AB_ATTRIBUTE"> <column name="ATTRIBUTE_INFO" type="NCLOB"/> - </addColumn> - <addColumn tableName="AB_ATTRIBUTE"> <column name="SORTING" type="INTEGER"/> </addColumn> <addColumn tableName="AB_ATTRIBUTERELATION"> - <column name="MEMO_VALUE" type="NCLOB"/> + <column name="INT_VALUE" type="INTEGER"/> </addColumn> + <dropColumn tableName="AB_ATTRIBUTERELATION"> + <column name="BOOL_VALUE"/> + </dropColumn> + <modifyDataType tableName="AB_ATTRIBUTERELATION" columnName="CHAR_VALUE" newDataType="NVARCHAR(512)"/> <createIndex indexName="IDX_ATTRPARENT" tableName="AB_ATTRIBUTE"> <column name="ATTRIBUTE_PARENT_ID"/> </createIndex> diff --git a/process/Attribute_lib/process.js b/process/Attribute_lib/process.js index 08b0fba8f9..1427b7f21a 100644 --- a/process/Attribute_lib/process.js +++ b/process/Attribute_lib/process.js @@ -51,8 +51,8 @@ AttributeUtil.getPossibleAttributes = function (pObjectType, pIncludeGroups, pFi attrCond.andSqlCondition(filteredIdsCondition); } - if (!pIncludeGroups) - attrCond.and("ATTRIBUTE_TYPE != '" + $AttributeTypes.GROUP + "'"); +// if (!pIncludeGroups) +// attrCond.and("ATTRIBUTE_TYPE != '" + $AttributeTypes.GROUP + "'"); var attributes = db.array(db.COLUMN, attrCond.buildSql(attrSql)); @@ -377,8 +377,8 @@ $AttributeTypes.BOOLEAN = { toString : function () {return this.keyword}, keyword : "BOOLEAN", contentType : "BOOLEAN", - databaseField : "BOOL_VALUE", - entityField : "BOOL_VALUE", + databaseField : "INT_VALUE", + entityField : "INT_VALUE", getViewValue : function (pValue) { return pValue == "1" ? translate.text("Yes") : translate.text("No"); @@ -416,14 +416,6 @@ $AttributeTypes.KEYWORD = { return KeywordUtils.getViewValue(pKeyword, pValue); } }; -$AttributeTypes.MEMO = { - toString : function () {return this.keyword}, - keyword : "MEMO", - contentType : "TEXT", - databaseField : "MEMO_VALUE", - entityField : "MEMO_VALUE" -}; - function AttributeTypeUtil () {} -- GitLab