diff --git a/entity/TaskLink_entity/TaskLink_entity.aod b/entity/TaskLink_entity/TaskLink_entity.aod index 50aeb41fe5bd7d54fafc35a24f306d486f46fd6b..1d0f0f23551f990147f2ad5e1d82ef378139e96c 100644 --- a/entity/TaskLink_entity/TaskLink_entity.aod +++ b/entity/TaskLink_entity/TaskLink_entity.aod @@ -1,5 +1,5 @@ <?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.2.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.2.0"> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.2.1"> <name>TaskLink_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> <recordContainer>db</recordContainer> @@ -9,6 +9,7 @@ </entityProvider> <entityField> <name>TASKLINKID</name> + <valueProcess>%aditoprj%/entity/TaskLink_entity/entityfields/tasklinkid/valueProcess.js</valueProcess> </entityField> <entityField> <name>TASK_ID</name> @@ -68,7 +69,7 @@ <children> <entityParameter> <name>ObjectType_param</name> - <code>%aditoprj%/entity/TaskLink_entity/entityfields/objects/children/objecttype_param/code.js</code> + <valueProcess>%aditoprj%/entity/TaskLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js</valueProcess> <triggerRecalculation v="true" /> </entityParameter> </children> @@ -105,6 +106,10 @@ <name>TASKLINKID.value</name> <recordfield>TASKLINK.TASKLINKID</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_ROWID.displayValue</name> + <expression>%aditoprj%/entity/TaskLink_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/TaskLink_entity/entityfields/objects/children/objecttype_param/code.js b/entity/TaskLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js similarity index 100% rename from entity/TaskLink_entity/entityfields/objects/children/objecttype_param/code.js rename to entity/TaskLink_entity/entityfields/objects/children/objecttype_param/valueProcess.js diff --git a/entity/TaskLink_entity/entityfields/tasklinkid/valueProcess.js b/entity/TaskLink_entity/entityfields/tasklinkid/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a2378ee42b3638db13001b2890b78669e5c65d9e --- /dev/null +++ b/entity/TaskLink_entity/entityfields/tasklinkid/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(util.getNewUUID()); \ No newline at end of file diff --git a/entity/TaskLink_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js b/entity/TaskLink_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..4ac0690f62f32b1b0ad6df14648740404256a945 --- /dev/null +++ b/entity/TaskLink_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js @@ -0,0 +1,4 @@ +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getNameSubselectSql("OBJECT_TYPE", "OBJECT_ROWID")) \ No newline at end of file diff --git a/entity/Task_entity/Task_entity.aod b/entity/Task_entity/Task_entity.aod index bd4fb80d8efec4dde3ff2e2e827f5df4543dce8c..640e9c59c6ee34ae727541bc6c21fe2bee9388b7 100644 --- a/entity/Task_entity/Task_entity.aod +++ b/entity/Task_entity/Task_entity.aod @@ -278,7 +278,7 @@ <children> <entityParameter> <name>containerName_param</name> - <code>%aditoprj%/entity/Task_entity/entityfields/keywordprogress/children/containername_param/code.js</code> + <valueProcess>%aditoprj%/entity/Task_entity/entityfields/keywordprogress/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> </entityConsumer> @@ -294,7 +294,7 @@ <children> <entityParameter> <name>TaskId_param</name> - <code>%aditoprj%/entity/Task_entity/entityfields/links/children/taskid_param/code.js</code> + <valueProcess>%aditoprj%/entity/Task_entity/entityfields/links/children/taskid_param/valueProcess.js</valueProcess> </entityParameter> </children> </entityConsumer> @@ -305,6 +305,7 @@ <alias>Data_alias</alias> <orderClauseProcess>%aditoprj%/entity/Task_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> <onDBInsert>%aditoprj%/entity/Task_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBDelete>%aditoprj%/entity/Task_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> <name>47e1b4a5-6901-48b0-85ba-bec39b86a2d7</name> diff --git a/entity/Task_entity/entityfields/keywordprogress/children/containername_param/valueProcess.js b/entity/Task_entity/entityfields/keywordprogress/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a9e216fdcc594e8f3b52cb52b9c76d8429d17ec0 --- /dev/null +++ b/entity/Task_entity/entityfields/keywordprogress/children/containername_param/valueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.taskProgress()); \ No newline at end of file diff --git a/entity/Task_entity/entityfields/links/children/taskid_param/valueProcess.js b/entity/Task_entity/entityfields/links/children/taskid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..190bc0327501ce4d067e1e1a8f7ff571a6fdc09b --- /dev/null +++ b/entity/Task_entity/entityfields/links/children/taskid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.TASKID")); \ No newline at end of file diff --git a/entity/Task_entity/recordcontainers/db/onDBDelete.js b/entity/Task_entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..9cf43b7f168e605171479de2aa41a202d0ea0528 --- /dev/null +++ b/entity/Task_entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.db"); +import("Sql_lib"); + +var condition = SqlCondition.begin() + .andPrepareVars("TASKLINK.TASK_ID", "$field.TASKID"); + +db.deleteData("TASKLINK", condition.build("1=2")); + diff --git a/entity/Task_entity/recordcontainers/db/onDBInsert.js b/entity/Task_entity/recordcontainers/db/onDBInsert.js index 333d4d3ca97769c16660a9c6fa7459e28669b98e..832d42b125946d7c2ffa983cfa4a91f03c21670f 100644 --- a/entity/Task_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Task_entity/recordcontainers/db/onDBInsert.js @@ -3,11 +3,10 @@ import("system.util"); import("system.db"); if (vars.exists("$param.ObjectType_param") && vars.exists("$param.RowId_param") && vars.get("$param.ObjectType_param") && vars.get("$param.RowId_param")) - db.insertData("AB_OBJECTRELATION", ["AB_OBJECTRELATIONID", "OBJECT1_TYPE", "OBJECT1_ROWID", "OBJECT2_TYPE", "OBJECT2_ROWID"], null, - [ - util.getNewUUID(), - vars.get("$param.ObjectType_param"), - vars.get("$param.RowId_param"), - "Task", - vars.get("$field.TASKID") - ]); \ No newline at end of file + db.insertData("TASKLINK", ["TASKLINKID", "OBJECT_TYPE", "OBJECT_ROWID", "TASK_ID"], null, + [ + util.getNewUUID(), + vars.get("$param.ObjectType_param"), + vars.get("$param.RowId_param"), + vars.get("$field.TASKID") + ]); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index ffa69dc77725d79f52d63941e3d81c55724a2592..f9774437977655259896e65ed1742b514db4b5f6 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -2556,6 +2556,12 @@ <entry> <key>New attribute</key> </entry> + <entry> + <key>History</key> + </entry> + <entry> + <key>Progress</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> @@ -2574,4 +2580,4 @@ where AB_KEYWORD_ATTRIBUTE_ID in (&apos;6f81d079-d404-4bda-a7c7-b830ed3d80d5 </statements> </languageSql> </sqlModels> -</language +</language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index fb0c3663517aaa12edcd84482412a4795839ecfd..abbf572093d0f286c71424b49653862be97d33e0 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -2585,4 +2585,4 @@ </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> -</language +</language> diff --git a/neonView/TaskEdit_view/TaskEdit_view.aod b/neonView/TaskEdit_view/TaskEdit_view.aod index 75107e82b57c4e2893e578670527045adee99f47..b0a1d9bbfefdc8cafc03fbeee6ca9ce6c42e93e4 100644 --- a/neonView/TaskEdit_view/TaskEdit_view.aod +++ b/neonView/TaskEdit_view/TaskEdit_view.aod @@ -55,5 +55,10 @@ </entityFieldLink> </fields> </genericViewTemplate> + <neonViewReference> + <name>ee35d86f-aef9-4ebd-b90a-d31b32cc3d5f</name> + <entityField>Links</entityField> + <view>TaskLinkMultiEdit_view</view> + </neonViewReference> </children> </neonView> diff --git a/neonView/TaskLinkMultiEdit_view/TaskLinkMultiEdit_view.aod b/neonView/TaskLinkMultiEdit_view/TaskLinkMultiEdit_view.aod index 3a535fc78a3709dc94dff094588a21ad6802fc85..15b6f530163f122343671dd450a8a21577c37919 100644 --- a/neonView/TaskLinkMultiEdit_view/TaskLinkMultiEdit_view.aod +++ b/neonView/TaskLinkMultiEdit_view/TaskLinkMultiEdit_view.aod @@ -2,4 +2,25 @@ <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1"> <name>TaskLinkMultiEdit_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericMultipleViewTemplate> + <name>GenericMultiple</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>4f3bde0b-cdd7-46a3-b0fc-24eba3ff9b92</name> + <entityField>OBJECT_TYPE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>ef83bb53-da75-498c-8ad5-4927c83243e4</name> + <entityField>OBJECT_ROWID</entityField> + </neonTableColumn> + </columns> + </genericMultipleViewTemplate> + </children> </neonView> diff --git a/process/Task_lib/process.js b/process/Task_lib/process.js index 8d3f2f2525f11cf6da3da3f4c7c33f37241a43ec..3cb13fda69c2d45c88b465179bc99bdf17d55b6f 100644 --- a/process/Task_lib/process.js +++ b/process/Task_lib/process.js @@ -16,7 +16,7 @@ function TaskUtils () {} TaskUtils.createNewTask = function (pRowId) { var params = {}; - params["ObjectId_param"] = ContextUtils.getCurrentContextId(); + params["ObjectType_param"] = ContextUtils.getCurrentContextId(); params["RowId_param"] = pRowId; neon.openContext("Task", null, null, neon.OPERATINGSTATE_NEW, params); } \ No newline at end of file