diff --git a/.liquibase/Data_alias/basic/2019.2/Classification/delete_salesprocejctClassification.xml b/.liquibase/Data_alias/basic/2019.2/Classification/delete_salesprocejctClassification.xml new file mode 100644 index 0000000000000000000000000000000000000000..7172aed01313dfc654025867864ffcc59fe101bb --- /dev/null +++ b/.liquibase/Data_alias/basic/2019.2/Classification/delete_salesprocejctClassification.xml @@ -0,0 +1,6 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="j.hoermann" id="85efe5d3-8032-4277-9177-3daa11951bb0"> + <dropTable tableName="SALESPROJECT_CLASSIFICATION"/> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_scores.xml b/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_scores.xml index c540fee5688e8a36a6047a7a7b87d3eab309e294..c3fa2cdbcd1404e081c526b55da6e299b01a8d7e 100644 --- a/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_scores.xml +++ b/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_scores.xml @@ -94,7 +94,7 @@ <insert tableName="CLASSIFICATIONSCORE"> <column name="CLASSIFICATIONSCOREID" value="3c9ceefa-5c98-4629-9c6d-d46b6cad8b78"/> <column name="SCORETYPE" value="ScoreUsers"/> - <column name="TITLE" value="251 to 1000"/> + <column name="TITLE" value="251 to 1,000"/> <column name="SCORE" valueNumeric="30.00"/> <column name="SORT" valueNumeric="20"/> </insert> diff --git a/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_types.xml b/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_types.xml index 04269b04e6331b3d90b2ec6a111d18796a17fe9c..9b41f5b635a4aaf4e9f9d2b5c99f4b0d3d9dab7e 100644 --- a/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_types.xml +++ b/.liquibase/Data_alias/basic/2019.2/Classification/insert_classification_types.xml @@ -1,5 +1,16 @@ <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> <changeSet author="j.hoermann" id="f904e9fd-d5e1-4f9b-b334-5621132449ce"> + + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="789667fe-519f-4dea-b691-62c14447d694"/> + <column name="KEYID" value="968eafa3-3e76-4afa-8999-878e51cc3bab"/> + <column name="TITLE" value="Salesproject"/> + <column name="CONTAINER" value="ClassificationType"/> + <column name="SORTING" valueNumeric="1"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="1"/> + </insert> + <insert tableName="CLASSIFICATIONTYPE"> <column name="CLASSIFICATIONTYPEID" value="54128957-c80b-4b5a-ad1b-cfce665dfb10"/> <column name="CLASSIFICATIONTYPE" value="968eafa3-3e76-4afa-8999-878e51cc3bab"/> diff --git a/.liquibase/Data_alias/basic/2019.2/changelog.xml b/.liquibase/Data_alias/basic/2019.2/changelog.xml index c667163ec915034d3692ea87b2acdab117cedd53..afd617ba0b4f3e9ed51ab4185c9b0d4dc90bb8bb 100644 --- a/.liquibase/Data_alias/basic/2019.2/changelog.xml +++ b/.liquibase/Data_alias/basic/2019.2/changelog.xml @@ -167,6 +167,7 @@ <include relativeToChangelogFile="true" file="Classification/create_classification_tables.xml"/> <include relativeToChangelogFile="true" file="Classification/insert_classification_scores.xml"/> <include relativeToChangelogFile="true" file="Classification/insert_classification_types.xml"/> + <include relativeToChangelogFile="true" file="Classification/delete_salesprocejctClassification.xml"/> <include relativeToChangelogFile="true" file="AditoBasic/extendKeywordOrganisationType.xml"/> <include relativeToChangelogFile="true" file="AditoBasic/removeAttributeKeywordTargetGroup.xml"/> diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 8de09d704e74582837bc2ffca80d301eb748ea31..60a0e9ce0c4eca997866e0ac824e76e3a2b1d1fc 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -4315,123 +4315,6 @@ </entityFieldDb> </entityFields> </entityDb> - <entityDb> - <name>SALESPROJECT_CLASSIFICATION</name> - <dbName></dbName> - <idColumn>SALESPROJECT_CLASSIFICATIONID</idColumn> - <idGeneratorType v="0" /> - <idGeneratorInterval v="1" /> - <title></title> - <description></description> - <auditSyncConfig> - <name>auditSyncConfig</name> - <auditMode v="1" /> - <syncActive v="false" /> - <syncComplete v="true" /> - <syncDirection v="1" /> - <syncIds></syncIds> - </auditSyncConfig> - <entityFields> - <entityFieldDb> - <name>SALESPROJECT_CLASSIFICATIONID</name> - <dbName></dbName> - <primaryKey v="true" /> - <columnType v="1" /> - <size v="36" /> - <scale v="0" /> - <notNull v="true" /> - <isUnique v="true" /> - <index v="false" /> - <documentation></documentation> - <title>Salesproject classification Id</title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>CLASS</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>Class</title> - <description></description> - <customProperties> - <customBooleanProperty> - <name>log</name> - <global v="false" /> - <property v="true" /> - </customBooleanProperty> - </customProperties> - </entityFieldDb> - <entityFieldDb> - <name>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>Value</title> - <description></description> - <customProperties> - <customBooleanProperty> - <name>log</name> - <global v="false" /> - <property v="true" /> - </customBooleanProperty> - </customProperties> - </entityFieldDb> - <entityFieldDb> - <name>SALESPROJECT_ID</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="1" /> - <size v="36" /> - <scale v="0" /> - <notNull v="true" /> - <isUnique v="false" /> - <index v="false" /> - <documentation></documentation> - <title>Salesproject Id</title> - <description></description> - <customProperties> - <customBooleanProperty> - <name>log</name> - <global v="false" /> - <property v="true" /> - </customBooleanProperty> - </customProperties> - </entityFieldDb> - <entityFieldDb> - <name>TYPE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="12" /> - <size v="50" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <documentation></documentation> - <title>Type</title> - <description></description> - <customProperties> - <customBooleanProperty> - <name>log</name> - <global v="false" /> - <property v="true" /> - </customBooleanProperty> - </customProperties> - </entityFieldDb> - </entityFields> - </entityDb> <entityDb> <name>TIMETRACKING</name> <dbName></dbName> diff --git a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod index c5b3232e4f301c7f625e92f15931fe092a3957f6..6979575e6bb69c708b1da1ac332b1d0dd848e725 100644 --- a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod +++ b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod @@ -11,6 +11,8 @@ </entityProvider> <entityField> <name>UID</name> + <consumer>KeywordClassificationTypes</consumer> + <displayValueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/uid/displayValueProcess.js</displayValueProcess> </entityField> <entityConsumer> <name>ClassificationsAdmin</name> @@ -27,6 +29,21 @@ </entityParameter> </children> </entityConsumer> + <entityConsumer> + <name>KeywordClassificationTypes</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/ClassificationAdmin_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b5e82ac38396ff9ccda20b257c1d0820f5294683 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/keywordclassificationtypes/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic") + +result.string($KeywordRegistry.classificationType()) \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/entityfields/uid/displayValueProcess.js b/entity/ClassificationAdmin_entity/entityfields/uid/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b92bfbc2e35eba18a9e8daf1ba5ab25180d8a837 --- /dev/null +++ b/entity/ClassificationAdmin_entity/entityfields/uid/displayValueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +result.string(KeywordUtils.getViewValue($KeywordRegistry.classificationType(), vars.get("$this.value"))) \ No newline at end of file diff --git a/entity/ClassificationScore_entity/ClassificationScore_entity.aod b/entity/ClassificationScore_entity/ClassificationScore_entity.aod index 33a68efe1c6f48cc4133c01d6e82de4f48421d0c..9fbd869a9bebad22a5120826668068105319ce7a 100644 --- a/entity/ClassificationScore_entity/ClassificationScore_entity.aod +++ b/entity/ClassificationScore_entity/ClassificationScore_entity.aod @@ -31,6 +31,8 @@ <entityField> <name>SCORE</name> <title>Score</title> + <contentType>NUMBER</contentType> + <outputFormat>#,##0.00</outputFormat> <mandatory v="true" /> <onValidation>%aditoprj%/entity/ClassificationScore_entity/entityfields/score/onValidation.js</onValidation> </entityField> @@ -69,6 +71,7 @@ <alias>Data_alias</alias> <conditionProcess>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <orderClauseProcess>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBDelete>%aditoprj%/entity/ClassificationScore_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> <name>e2fecaf8-bc95-4a4d-bd96-88731568b1a4</name> diff --git a/entity/ClassificationScore_entity/recordcontainers/db/onDBDelete.js b/entity/ClassificationScore_entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..41b093f08de18bd28403c0122382ef68ebdbb13a --- /dev/null +++ b/entity/ClassificationScore_entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.db"); +import("Sql_lib"); + +db.deleteData("CLASSIFICATION", SqlCondition.begin() + .andPrepare("CLASSIFICATION.CLASSIFICATIONSCORE_ID", vars.get("$field.CLASSIFICATIONSCOREID")) + .build("1=2")); \ No newline at end of file diff --git a/entity/Classification_entity/Classification_entity.aod b/entity/Classification_entity/Classification_entity.aod index 410357d231e67f03816954e976f0f2f762ad997b..f7bcb256a8e302d515f4668605beaa4bbcb5dcbb 100644 --- a/entity/Classification_entity/Classification_entity.aod +++ b/entity/Classification_entity/Classification_entity.aod @@ -70,7 +70,9 @@ <name>SCORETYPE</name> <title>Scoretype</title> <groupable v="true" /> + <stateProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/stateProcess.js</stateProcess> <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/displayValueProcess.js</displayValueProcess> + <onValidation>%aditoprj%/entity/Classification_entity/entityfields/scoretype/onValidation.js</onValidation> </entityField> <entityField> <name>CLASSIFICATIONNUMBER</name> @@ -175,6 +177,7 @@ <contentProcess>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/contentProcess.js</contentProcess> <onInsert>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onInsert.js</onInsert> <onUpdate>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onUpdate.js</onUpdate> + <onDelete>%aditoprj%/entity/Classification_entity/recordcontainers/jdito/onDelete.js</onDelete> <recordFields> <element>UID.value</element> <element>CLASSIFICATIONID.value</element> diff --git a/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js b/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js index 4e869dc96dea5ebac65b88b688e7c4c87b6b303e..9358b57687a079539606124e88b74f15c7e3ac72 100644 --- a/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js +++ b/entity/Classification_entity/entityfields/classifications/children/isadminmode_param/valueProcess.js @@ -1,4 +1,3 @@ -import("system.logging"); import("system.result"); -logging.log("asdf") + result.string(0); \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/edit/onActionProcess.js b/entity/Classification_entity/entityfields/edit/onActionProcess.js index eac189a4480128900fa2bd92cd2f2e8aee38c2ae..e600e52ac0c4d79ffb8973384015860e2b6bcb7a 100644 --- a/entity/Classification_entity/entityfields/edit/onActionProcess.js +++ b/entity/Classification_entity/entityfields/edit/onActionProcess.js @@ -11,7 +11,8 @@ if (selection.length > 0) var params = { "ClassificationType_param" : vars.get("$param.ClassificationType_param"), "ObjectType_param" : vars.get("$param.ObjectType_param"), - "ObjectRowid_param" : vars.get("$param.ObjectRowid_param") + "ObjectRowid_param" : vars.get("$param.ObjectRowid_param"), + "IsAdminMode_param" : vars.get("$param.IsAdminMode_param") } var view = "ClassificatonEdit_view"; diff --git a/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js b/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js index 0488a23572b30f97174720a23726a09b8b266381..55b3460083670fb4c229762303b24bd9585dbaaf 100644 --- a/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js +++ b/entity/Classification_entity/entityfields/isadminmode_param/valueProcess.js @@ -1,3 +1,4 @@ +import("system.vars"); import("system.result"); result.string(1); \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/scoretype/onValidation.js b/entity/Classification_entity/entityfields/scoretype/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..eb1b25be34a9a64fb2ffeec16abbd2511da1dd32 --- /dev/null +++ b/entity/Classification_entity/entityfields/scoretype/onValidation.js @@ -0,0 +1,25 @@ +import("system.neon"); +import("system.translate"); +import("system.logging"); +import("system.result"); +import("system.db"); +import("Entity_lib"); +import("Sql_lib"); +import("system.vars"); + +logging.log(vars.get("$param.IsAdminMode_param")) +if (vars.get("$param.IsAdminMode_param") == "1" && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + // do not allow the same name a second time + var type = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.SCORETYPE")); + var count = db.cell(SqlCondition.begin() + .andPrepare("CLASSIFICATIONTYPE.SCORETYPE", type) + .buildSql("select count(*) from CLASSIFICATIONTYPE")); + + logging.log("lol " + type) + + if (count != 0) + { + result.string(translate.text("${SCORETYPE_ALREADY_EXISTS}")); + } +} \ No newline at end of file diff --git a/entity/Classification_entity/entityfields/scoretype/stateProcess.js b/entity/Classification_entity/entityfields/scoretype/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..626da788b0307aee25ce6ab8849e3e9357ba0645 --- /dev/null +++ b/entity/Classification_entity/entityfields/scoretype/stateProcess.js @@ -0,0 +1,12 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(neon.COMPONENTSTATE_AUTO); +} +else +{ + result.string(neon.COMPONENTSTATE_DISABLED); +} \ No newline at end of file diff --git a/entity/Classification_entity/recordcontainers/jdito/onDelete.js b/entity/Classification_entity/recordcontainers/jdito/onDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..5e02ce7e27b58e7b2ac7141f28a7b01063cfe5f2 --- /dev/null +++ b/entity/Classification_entity/recordcontainers/jdito/onDelete.js @@ -0,0 +1,26 @@ +import("system.neon"); +import("system.question"); +import("Sql_lib"); +import("system.db"); +import("system.util"); +import("system.vars"); + +var type = vars.get("$field.SCORETYPE"); + +if (1 < db.cell(SqlCondition.begin() + .andPrepare("CLASSIFICATIONTYPE.CLASSIFICATIONTYPE", vars.get("$field.CLASSIFICATIONTYPE")) + .buildSql("select count(*) from CLASSIFICATIONTYPE", "1=2"))) +{ + db.deleteData("CLASSIFICATION", "CLASSIFICATION.CLASSIFICATIONTYPE_ID in (" + db.translateStatement( + SqlCondition.begin() + .andPrepare("CLASSIFICATIONTYPE.SCORETYPE", type) + .buildSql("select CLASSIFICATIONTYPE.CLASSIFICATIONTYPEID from CLASSIFICATIONTYPE", "1=2")) + ")"); + db.deleteData("CLASSIFICATIONTYPE", SqlCondition.equals("CLASSIFICATIONTYPE.SCORETYPE", type, "1=2")); + db.deleteData("CLASSIFICATIONSCORE", SqlCondition.equals("CLASSIFICATIONSCORE.SCORETYPE", type, "1=2")); +} +neon.refreshAll(); +//else +//{ + // do not delete anything, because it is the last one. If this one is deleted, there would be no way to add anything again. + // TODO: delete-button disable if count(*) <= 1 +//} diff --git a/entity/Classification_entity/recordcontainers/jdito/onUpdate.js b/entity/Classification_entity/recordcontainers/jdito/onUpdate.js index d856750d58b5aaa505819006a3e1e899415df880..060a72d4ee0a39795104ff2be3c7d4419a2e7290 100644 --- a/entity/Classification_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/Classification_entity/recordcontainers/jdito/onUpdate.js @@ -1,10 +1,13 @@ +import("system.logging"); import("system.neon"); import("system.util"); import("Sql_lib"); import("system.db"); import("system.vars"); -// check if it already exists +var changed = vars.get("$local.changed"); + +// check if it already exists. Else it only exists as ScoreType but has no Classification-Entry if (vars.get("$field.CLASSIFICATIONID")) { if (vars.get("$field.CLASSIFICATIONSCORE_ID")) diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod index 69b7a2f12da74c9c407f0a6746479609fe838a12..e52b848c0ec6a3b3108d1e779fd98b3e3eed574c 100644 --- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod +++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod @@ -386,6 +386,12 @@ <fieldName>KeywordCampaignManagementCostCategory</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>63bd7284-e9a0-4576-afe8-299d412e8def</name> + <entityName>ClassificationAdmin_entity</entityName> + <fieldName>KeywordClassificationTypes</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> <children> <entityParameter> diff --git a/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js b/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js index d120e5bb6d7d5b266e2b2a46ca2e13e3d5c8c382..aa00d635b63e157cb00b3861bf412fc79b426e16 100644 --- a/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js +++ b/entity/Salesproject_entity/entityfields/classificationresult/valueProcess.js @@ -1,6 +1,7 @@ +import("KeywordRegistry_basic"); import("system.vars"); import("system.result"); import("Classification_lib") import("Context_lib") -result.string(ClassificationUtils.getClass("968eafa3-3e76-4afa-8999-878e51cc3bab", ContextUtils.getCurrentContextId(), vars.get("$sys.uid"))); \ No newline at end of file +result.string(ClassificationUtils.getClass($KeywordRegistry.classificationType$salesproject(), ContextUtils.getCurrentContextId(), vars.get("$sys.uid"))); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/classifications/children/classificationtype_param/valueProcess.js b/entity/Salesproject_entity/entityfields/classifications/children/classificationtype_param/valueProcess.js index 0f664a349180456fb39a1e5ebc877015b49fc221..7915763a4b4a052218cd5ac386eae20fa55a6ef5 100644 --- a/entity/Salesproject_entity/entityfields/classifications/children/classificationtype_param/valueProcess.js +++ b/entity/Salesproject_entity/entityfields/classifications/children/classificationtype_param/valueProcess.js @@ -1,3 +1,4 @@ +import("KeywordRegistry_basic"); import("system.result"); -result.string("968eafa3-3e76-4afa-8999-878e51cc3bab"); \ No newline at end of file +result.string($KeywordRegistry.classificationType$salesproject()); \ No newline at end of file diff --git a/entity/Salesproject_entity/recordcontainers/db/onDBDelete.js b/entity/Salesproject_entity/recordcontainers/db/onDBDelete.js index 65d94ab76dadcf8189255ca1a84187d9132b9f1f..63f1823605ffbd72027c574e96024582fd2dc7fb 100644 --- a/entity/Salesproject_entity/recordcontainers/db/onDBDelete.js +++ b/entity/Salesproject_entity/recordcontainers/db/onDBDelete.js @@ -1,6 +1,7 @@ import("system.db"); import("system.vars"); import("Sql_lib"); +import("Context_lib"); var currentId = vars.getString("$field.SALESPROJECTID"); @@ -8,7 +9,6 @@ if (currentId) { var toDelete = [ "SALESPROJECT_COMPETITION", - "SALESPROJECT_CLASSIFICATION", "SALESPROJECT_MILESTONE", "SALESPROJECT_FORECAST", "SALESPROJECT_MEMBER", @@ -20,6 +20,9 @@ if (currentId) return [pTable, SqlCondition.equals(pTable + ".SALESPROJECT_ID", currentId, "1=2")] }); + toDelete.push(["CLASSIFICATION", sqlCondition.begin() + .andPrepare("CLASSIFICATION.OBJECT_TYPE", ContextUtils.getCurrentContextId()) + .andPrepare("CLASSIFICATION.OBJECT_ROWID", currentId).build("1=2")]) db.deletes(toDelete); // TODO: auch Dokumente, Aktivitäten, Aufgaben, Zeiterfassungen löschen? diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 25a34db25a81ca80fa35d7c000cb517da43c9daf..c8a231619ff2c5f981ace1e49534b82d6608a667 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -3810,6 +3810,45 @@ <entry> <key>Possible values</key> </entry> + <entry> + <key>e</key> + </entry> + <entry> + <key>ARCHIVE</key> + </entry> + <entry> + <key>huhu</key> + </entry> + <entry> + <key>archieve</key> + </entry> + <entry> + <key>setUnread</key> + </entry> + <entry> + <key>Rating</key> + </entry> + <entry> + <key>sum</key> + </entry> + <entry> + <key>A: 75 < </key> + </entry> + <entry> + <key>setRead</key> + </entry> + <entry> + <key>Possible Values</key> + </entry> + <entry> + <key>a</key> + </entry> + <entry> + <key>${SCORETYPE_ALREADY_EXISTS}</key> + </entry> + <entry> + <key>251 to 1,000</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 51533a49d4c36f1b0a45524071f906c1717bfdfd..3f05b947c82f1262d19ef4d8e217080eccd08038 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -4587,8 +4587,8 @@ <value>Leiter IT</value> </entry> <entry> - <key>251 to 1000</key> - <value>251 bis 1000</value> + <key>251 to 1,000</key> + <value>251 bis 1.000</value> </entry> <entry> <key>Electric</key> @@ -4792,6 +4792,16 @@ <entry> <key>Possible Values</key> </entry> + <entry> + <key>a</key> + </entry> + <entry> + <key>${SCORETYPE_ALREADY_EXISTS}</key> + <value>Der eingegebene Bewertungstyp existiert bereits in irgend einer Klassifizierung.</value> + </entry> + <entry> + <key>251 to 1000</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index a43bb221838f8fd42ab4d68c866d23d011808a09..9a8ec100003b2601e31f1d24ece8fb9c70d16206 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -3888,6 +3888,16 @@ <entry> <key>Possible Values</key> </entry> + <entry> + <key>a</key> + </entry> + <entry> + <key>${SCORETYPE_ALREADY_EXISTS}</key> + <value>The given Scoretype already exists in any Classification.</value> + </entry> + <entry> + <key>251 to 1,000</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index 4acc0874e2b9826453abbce9f47bc68ae3645cc3..3a7a6a8f8ce6e0aad7e5b2bc0ed6bfaa79aa3fb2 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -94,4 +94,6 @@ $KeywordRegistry.campaignStepCostCategory = function(){return "CampaignManagemen $KeywordRegistry.documentTemplateType = function(){return "DocumentTemplateType";}; $KeywordRegistry.documentTemplateTypeCategory = function(){return "DocumentTemplateTypeCategory";}; $KeywordRegistry.documentTemplateType$mail = function(){return "MAI ";}; -$KeywordRegistry.documentTemplateType$attachment = function(){return "ATT ";}; \ No newline at end of file +$KeywordRegistry.documentTemplateType$attachment = function(){return "ATT ";}; +$KeywordRegistry.classificationType = function(){return "ClassificationType";}; +$KeywordRegistry.classificationType$salesproject = function(){return "968eafa3-3e76-4afa-8999-878e51cc3bab";}; \ No newline at end of file