diff --git a/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js b/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js index 415e8d2a1af6a882e10fdc486befb142aa59713e..738c1a7ab7fbcce5cfacd7a11d57d3122be0c30c 100644 --- a/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js +++ b/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js @@ -14,11 +14,8 @@ var res = { "groupByKeyword":"OrderType" }, "Contract": {}, - "SupportTicket": { - "subContext":"TaskLink", - "childField":"TASK_ID", - "parentField":"TASK_TASKID", - "contactIdField":"OBJECT_ROWID" + "SupportTicket": { + "connectionField":"TASK_REQUESTOR_CONTACT_ID" }, "Campaign": { "subContext":"CampaignParticipant", diff --git a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod index 17f075c645ad79860c201c3534a6310a24fd70a4..1f4270024c189074fb928c3d230af6e1e498df48 100644 --- a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod +++ b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod @@ -165,7 +165,6 @@ <onValueChangeTypes> <element>MASK</element> </onValueChangeTypes> - <onValidation></onValidation> </entityField> <entityConsumer> <name>DocumentTemplateTypeCategory</name> diff --git a/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js b/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js index b6482e533bfaca580e8687788e6860726fe8520f..0f764f5e3f168f6916af16d84e27a1fad880e478 100644 --- a/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js +++ b/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js @@ -6,7 +6,7 @@ import("system.vars"); // --> only set in $field.Content.valueProcess if $field.Content is null and set it from here only if MASK triggered change if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)) { - [content, type] = DocumentTemplateUtils.getTemplateContent(vars.get("$field."), new FileUpload(vars.get("$local.value"))); + [content, type] = DocumentTemplateUtils.getTemplateContent(vars.get("$field.DOCUMENTTEMPLATEID"), new FileUpload(vars.get("$local.value"))); vars.set("$context.currentTemplateType", type); vars.set("$field.Content", content); diff --git a/entity/DocumentTemplate_entity/entityfields/classification/stateProcess.js b/entity/DocumentTemplate_entity/entityfields/classification/stateProcess.js index 3e355079f4d1a56e8cb0750909f476765d887614..6fcf14fa75d5ac836bd68df2ee8fed4bbc6835ae 100644 --- a/entity/DocumentTemplate_entity/entityfields/classification/stateProcess.js +++ b/entity/DocumentTemplate_entity/entityfields/classification/stateProcess.js @@ -4,10 +4,11 @@ import("system.vars"); import("system.result"); import("system.neon"); -if(vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$attachment() -|| vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$signature() -|| vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$replymail() - && vars.exists("$context.currentTemplateType") && vars.get("$context.currentTemplateType") != DocumentTemplate.types.ODT) +if((vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$attachment() + || vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$signature() + || vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$replymail()) +|| (vars.get("$field.KIND") == $KeywordRegistry.documentTemplateType$letter() + && vars.exists("$context.currentTemplateType") && vars.get("$context.currentTemplateType") != DocumentTemplate.types.ODT)) { result.string(neon.COMPONENTSTATE_DISABLED); } diff --git a/entity/EmployeeGroupContactRelation_entity/EmployeeGroupContactRelation_entity.aod b/entity/EmployeeGroupContactRelation_entity/EmployeeGroupContactRelation_entity.aod index 964b64aa8e9a81cfbe45a723b2cafad844a9d9c4..289e21e87ed155012e2ea6ba6403d1fafa0a0341 100644 --- a/entity/EmployeeGroupContactRelation_entity/EmployeeGroupContactRelation_entity.aod +++ b/entity/EmployeeGroupContactRelation_entity/EmployeeGroupContactRelation_entity.aod @@ -17,6 +17,7 @@ <consumer>Employees</consumer> <linkedContextProcess></linkedContextProcess> <displayValueProcess>%aditoprj%/entity/EmployeeGroupContactRelation_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess> + <onValidation>%aditoprj%/entity/EmployeeGroupContactRelation_entity/entityfields/contact_id/onValidation.js</onValidation> </entityField> <entityField> <name>EMPLOYEEGROUP_CONTACT_RELATIONID</name> diff --git a/entity/EmployeeGroupContactRelation_entity/entityfields/contact_id/onValidation.js b/entity/EmployeeGroupContactRelation_entity/entityfields/contact_id/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..89007aafec39152c565838fe3b89fdeefe7c4c3c --- /dev/null +++ b/entity/EmployeeGroupContactRelation_entity/entityfields/contact_id/onValidation.js @@ -0,0 +1,19 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("CONTACT_ID") + .from("EMPLOYEEGROUP_CONTACT_RELATION") + .where("EMPLOYEEGROUP_CONTACT_RELATION.CONTACT_ID", vars.get("$field.CONTACT_ID")) + .and("EMPLOYEEGROUP_CONTACT_RELATION.EMPLOYEEGROUP_ID", vars.get("$field.EMPLOYEEGROUP_ID")) + .andIfSet("EMPLOYEEGROUP_CONTACT_RELATION.EMPLOYEEGROUP_CONTACT_RELATIONID", vars.get("$field.EMPLOYEEGROUP_CONTACT_RELATIONID"),SqlBuilder.NOT_EQUAL()) + .cell(); + + +if (sql > 0 ) +{ + result.string(translate.text("Employee already selected") + "."); +} diff --git a/entity/EmployeeGroupRuleGroup_entity/EmployeeGroupRuleGroup_entity.aod b/entity/EmployeeGroupRuleGroup_entity/EmployeeGroupRuleGroup_entity.aod index b46580ea5bcf69b18c5cf43da210b641f11366d3..2d96b5aaf88b57df50d9a2aa00d84db3d68502d4 100644 --- a/entity/EmployeeGroupRuleGroup_entity/EmployeeGroupRuleGroup_entity.aod +++ b/entity/EmployeeGroupRuleGroup_entity/EmployeeGroupRuleGroup_entity.aod @@ -31,6 +31,7 @@ <name>NAME</name> <title>Name</title> <mandatory v="true" /> + <onValidation>%aditoprj%/entity/EmployeeGroupRuleGroup_entity/entityfields/name/onValidation.js</onValidation> </entityField> <entityConsumer> <name>EmpGroupRules</name> diff --git a/entity/EmployeeGroupRuleGroup_entity/entityfields/name/onValidation.js b/entity/EmployeeGroupRuleGroup_entity/entityfields/name/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..2e1930affbd4098a8d1ef811958273041ea1d9e8 --- /dev/null +++ b/entity/EmployeeGroupRuleGroup_entity/entityfields/name/onValidation.js @@ -0,0 +1,17 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("NAME") + .from("EMPLOYEEGROUP_RULEGROUP") + .where("EMPLOYEEGROUP_RULEGROUP.NAME", vars.get("$field.NAME")) + .and("EMPLOYEEGROUP_RULEGROUP.EMPLOYEEGROUP_RULEGROUPID", vars.get("sys.uid"),SqlBuilder.NOT()) + .cell(); + +if (sql > 0) +{ + result.string(translate.text("Name has to be unique") + "."); +} \ No newline at end of file diff --git a/entity/EmployeeGroupRule_entity/EmployeeGroupRule_entity.aod b/entity/EmployeeGroupRule_entity/EmployeeGroupRule_entity.aod index 1c235b5a30f278f46c5a6c593a7d1365e1c3b489..f53e3460a1c2478956099f11a8bb0c2109c89f9d 100644 --- a/entity/EmployeeGroupRule_entity/EmployeeGroupRule_entity.aod +++ b/entity/EmployeeGroupRule_entity/EmployeeGroupRule_entity.aod @@ -36,6 +36,7 @@ <name>NAME</name> <title>Name</title> <mandatory v="true" /> + <onValidation>%aditoprj%/entity/EmployeeGroupRule_entity/entityfields/name/onValidation.js</onValidation> </entityField> <entityProvider> <name>#PROVIDER_AGGREGATES</name> diff --git a/entity/EmployeeGroupRule_entity/entityfields/name/onValidation.js b/entity/EmployeeGroupRule_entity/entityfields/name/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..6cd8121c41e8437c62ae7265945b9ff48507a15e --- /dev/null +++ b/entity/EmployeeGroupRule_entity/entityfields/name/onValidation.js @@ -0,0 +1,16 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("NAME") + .from("EMPLOYEEGROUP_RULEGROUP") + .where("EMPLOYEEGROUP_RULEGROUP.NAME", vars.get("$field.NAME")) + .andIfSet("EMPLOYEEGROUP_RULEGROUP.EMPLOYEEGROUP_RULEGROUPID", vars.get("$field.EMPLOYEEGROUP_RULEGROUP_ID"),SqlBuilder.NOT_EQUAL()) + .cell(); +if (sql > 0) +{ + result.string(translate.text("Name has to be unique") + "."); +} \ No newline at end of file diff --git a/entity/EmployeeGroup_entity/EmployeeGroup_entity.aod b/entity/EmployeeGroup_entity/EmployeeGroup_entity.aod index 7166da239b1f917854bacf1061491d459ea2a1ad..da7a223f92849ab3bb95a659ecd53f8f30845bd7 100644 --- a/entity/EmployeeGroup_entity/EmployeeGroup_entity.aod +++ b/entity/EmployeeGroup_entity/EmployeeGroup_entity.aod @@ -21,6 +21,7 @@ <name>GROUPNAME</name> <title>Group name</title> <mandatory v="true" /> + <onValidation>%aditoprj%/entity/EmployeeGroup_entity/entityfields/groupname/onValidation.js</onValidation> </entityField> <entityProvider> <name>EmployeesGroups</name> diff --git a/entity/EmployeeGroup_entity/entityfields/groupname/onValidation.js b/entity/EmployeeGroup_entity/entityfields/groupname/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..2556968f99e2f972b472208d5405c38b5e4fbed3 --- /dev/null +++ b/entity/EmployeeGroup_entity/entityfields/groupname/onValidation.js @@ -0,0 +1,16 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("GROUPNAME") + .from("EMPLOYEEGROUP") + .where("EMPLOYEEGROUP.GROUPNAME", vars.get("$field.GROUPNAME")) + .and("EMPLOYEEGROUP.EMPLOYEEGROUPID", vars.get("sys.uid"),SqlBuilder.NOT()) + .cell(); +if (sql > 0) +{ + result.string(translate.text("Name has to be unique") + "."); +} \ No newline at end of file diff --git a/entity/InboxEmployeegroupRelation_entity/InboxEmployeegroupRelation_entity.aod b/entity/InboxEmployeegroupRelation_entity/InboxEmployeegroupRelation_entity.aod index 4bd204d10578d094b7334eb88b79edc1e3c08d80..bf862f146661c7997f952d398ddf0b1060464017 100644 --- a/entity/InboxEmployeegroupRelation_entity/InboxEmployeegroupRelation_entity.aod +++ b/entity/InboxEmployeegroupRelation_entity/InboxEmployeegroupRelation_entity.aod @@ -19,6 +19,7 @@ <title>Employee Group</title> <consumer>EmployeesGroupsForCompanyGroup</consumer> <displayValueProcess>%aditoprj%/entity/InboxEmployeegroupRelation_entity/entityfields/employeegroup_id/displayValueProcess.js</displayValueProcess> + <onValidation>%aditoprj%/entity/InboxEmployeegroupRelation_entity/entityfields/employeegroup_id/onValidation.js</onValidation> </entityField> <entityField> <name>INBOX_ID</name> diff --git a/entity/InboxEmployeegroupRelation_entity/entityfields/employeegroup_id/onValidation.js b/entity/InboxEmployeegroupRelation_entity/entityfields/employeegroup_id/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..a221833a595548cdf760326ff6ee505bba243ffd --- /dev/null +++ b/entity/InboxEmployeegroupRelation_entity/entityfields/employeegroup_id/onValidation.js @@ -0,0 +1,19 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + + +var sql = new SqlBuilder() + .selectCount("EMPLOYEEGROUP_ID") + .from("INBOX_EMPLOYEEGROUP_RELATION") + .where("INBOX_EMPLOYEEGROUP_RELATION.EMPLOYEEGROUP_ID", vars.get("$field.EMPLOYEEGROUP_ID")) + .and("INBOX_EMPLOYEEGROUP_RELATION.INBOX_ID", vars.get("$field.INBOX_ID")) + .andIfSet("INBOX_EMPLOYEEGROUP_RELATION.INBOX_EMPLOYEEGROUP_RELATIONID", vars.get("$field.INBOX_EMPLOYEEGROUP_RELATIONID"),SqlBuilder.NOT_EQUAL()) + .cell(); + +if (sql > 0) +{ + result.string(translate.text("Employee group already selected") + "."); +} \ No newline at end of file diff --git a/entity/InboxFilterGroupRelation_entity/InboxFilterGroupRelation_entity.aod b/entity/InboxFilterGroupRelation_entity/InboxFilterGroupRelation_entity.aod index 633b529675e5237b28a01282ffb3ab5e539bb03f..bc52ff958a5b667ab02683c038b38a9e23ab1619 100644 --- a/entity/InboxFilterGroupRelation_entity/InboxFilterGroupRelation_entity.aod +++ b/entity/InboxFilterGroupRelation_entity/InboxFilterGroupRelation_entity.aod @@ -16,6 +16,8 @@ <name>INBOXFILTERGROUP_ID</name> <title>Inbox filter group</title> <consumer>InboxFilterGroups</consumer> + <displayValueProcess>%aditoprj%/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/displayValueProcess.js</displayValueProcess> + <onValidation>%aditoprj%/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/onValidation.js</onValidation> </entityField> <entityField> <name>INBOX_ID</name> @@ -78,7 +80,6 @@ </dbRecordFieldMapping> <dbRecordFieldMapping> <name>INBOXFILTERGROUP_ID.displayValue</name> - <expression>%aditoprj%/entity/InboxFilterGroupRelation_entity/recordcontainers/db/recordfieldmappings/inboxfiltergroup_id.displayvalue/expression.js</expression> </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> diff --git a/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/displayValueProcess.js b/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..0f2db0bf1cddbe8f3c565406b434296eece29489 --- /dev/null +++ b/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/displayValueProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.result"); +import("Sql_lib"); + +result.string(newSelect("NAME") +.from("INBOXFILTERGROUP") +.where("INBOXFILTERGROUP.INBOXFILTERGROUPID", vars.get("$field.INBOXFILTERGROUP_ID")).cell()); \ No newline at end of file diff --git a/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/onValidation.js b/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..1d234c44a60d6d854f716b853f947d021ea8e13d --- /dev/null +++ b/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroup_id/onValidation.js @@ -0,0 +1,17 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("INBOXFILTERGROUP_ID") + .from("INBOXFILTERGROUP_RELATION") + .where("INBOXFILTERGROUP_RELATION.INBOXFILTERGROUP_ID", vars.get("$field.INBOXFILTERGROUP_ID")) + .cell(); + +if (sql > 0) +{ + result.string(translate.text("Rulegroup already selected") + "."); +} + diff --git a/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroups/children/excludeinboxfiltergroups_param/valueProcess.js b/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroups/children/excludeinboxfiltergroups_param/valueProcess.js index 52e04d7128121199cd05f34d3d5a6181f35c4f45..e743c07a2228759bd7bbde62ba333bafdabb1458 100644 --- a/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroups/children/excludeinboxfiltergroups_param/valueProcess.js +++ b/entity/InboxFilterGroupRelation_entity/entityfields/inboxfiltergroups/children/excludeinboxfiltergroups_param/valueProcess.js @@ -1,9 +1,11 @@ import("system.result"); import("system.vars"); +import("Sql_lib"); var sql = new SqlBuilder() .select("INBOXFILTERGROUP_RELATION.INBOXFILTERGROUP_ID") .from("INBOXFILTERGROUP_RELATION") - .where("INBOX_ID", vars.get("$param.InboxId_param")) - .arrayColumn(); -result.object(sql); \ No newline at end of file + .where("INBOXFILTERGROUP_RELATION.INBOX_ID", vars.get("$param.InboxId_param")) + .arrayColumn(); + +result.object(sql); diff --git a/entity/InboxFilterGroupRelation_entity/recordcontainers/db/recordfieldmappings/inboxfiltergroup_id.displayvalue/expression.js b/entity/InboxFilterGroupRelation_entity/recordcontainers/db/recordfieldmappings/inboxfiltergroup_id.displayvalue/expression.js deleted file mode 100644 index 234d5690451a6793590572b93a2e69423ab4c277..0000000000000000000000000000000000000000 --- a/entity/InboxFilterGroupRelation_entity/recordcontainers/db/recordfieldmappings/inboxfiltergroup_id.displayvalue/expression.js +++ /dev/null @@ -1,6 +0,0 @@ -import("system.result"); -import("Sql_lib"); - -result.string(newSelect("NAME") -.from("INBOXFILTERGROUP") -.where("INBOXFILTERGROUPID = INBOXFILTERGROUP_ID").toString()); \ No newline at end of file diff --git a/entity/InboxFilterGroup_entity/InboxFilterGroup_entity.aod b/entity/InboxFilterGroup_entity/InboxFilterGroup_entity.aod index a57f3d4421506abc8cacb5a7eb37236042ff4b64..e5c6a604f7c1fc270baf9f25ad5de3bd3df6b99f 100644 --- a/entity/InboxFilterGroup_entity/InboxFilterGroup_entity.aod +++ b/entity/InboxFilterGroup_entity/InboxFilterGroup_entity.aod @@ -26,6 +26,7 @@ <name>NAME</name> <title>Name</title> <mandatory v="true" /> + <onValidation>%aditoprj%/entity/InboxFilterGroup_entity/entityfields/name/onValidation.js</onValidation> </entityField> <entityField> <name>DATE</name> @@ -75,6 +76,9 @@ <name>PRIORITY</name> <title>Priority</title> <contentType>NUMBER</contentType> + <maxValue v="9999" /> + <minValue v="1" /> + <inputFormat>#</inputFormat> <onValidation>%aditoprj%/entity/InboxFilterGroup_entity/entityfields/priority/onValidation.js</onValidation> </entityField> <entityProvider> diff --git a/entity/InboxFilterGroup_entity/entityfields/name/onValidation.js b/entity/InboxFilterGroup_entity/entityfields/name/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..5f2a7b84bb1a7be48d3319a6978042734c878416 --- /dev/null +++ b/entity/InboxFilterGroup_entity/entityfields/name/onValidation.js @@ -0,0 +1,19 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + var sql = new SqlBuilder() + .selectCount("NAME") + .from("INBOXFILTERGROUP") + .where("INBOXFILTERGROUP.NAME", vars.get("$field.NAME")) + .cell(); + + if (sql > 0) + { + result.string(translate.text("Name has to be unique") + "."); + } +} diff --git a/entity/InboxFilterGroup_entity/recordcontainers/db/conditionProcess.js b/entity/InboxFilterGroup_entity/recordcontainers/db/conditionProcess.js index 79067f745f39cc71feb32de8cf86a3d9bfb87290..e729ee44133e252a15704c57c27d24bcaab28182 100644 --- a/entity/InboxFilterGroup_entity/recordcontainers/db/conditionProcess.js +++ b/entity/InboxFilterGroup_entity/recordcontainers/db/conditionProcess.js @@ -1,8 +1,13 @@ +import("system.vars"); import("system.result"); import("Sql_lib"); -var cond = newWhereIfSet("INBOXFILTERGROUP.INBOXFILTERGROUPID", "$param.ExcludeInboxFilterGroups_param",SqlBuilder.NOT_IN()); +if (vars.get("$param.ExcludeInboxFilterGroups_param")) +{ + var cond = newWhereIfSet("INBOXFILTERGROUP.INBOXFILTERGROUPID", [vars.get("$param.ExcludeInboxFilterGroups_param")],SqlBuilder.NOT_IN()); + result.string(cond.toString()); +} + + -result.string(cond.toString()); - diff --git a/entity/Inbox_entity/Inbox_entity.aod b/entity/Inbox_entity/Inbox_entity.aod index 4dafa5bfcb40428b30f89912a583ce12cca3034a..40918ab17a08543a1133feb0e3b085b96b8ab04f 100644 --- a/entity/Inbox_entity/Inbox_entity.aod +++ b/entity/Inbox_entity/Inbox_entity.aod @@ -4,6 +4,7 @@ <title>Inboxes</title> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/Inbox_entity/documentation.adoc</documentation> + <grantDelete v="false" /> <contentTitleProcess>%aditoprj%/entity/Inbox_entity/contentTitleProcess.js</contentTitleProcess> <iconId>VAADIN:ENVELOPES</iconId> <imageProcess>%aditoprj%/entity/Inbox_entity/imageProcess.js</imageProcess> @@ -20,11 +21,13 @@ <name>INBOXNAME</name> <title>Name</title> <mandatory v="true" /> + <onValidation>%aditoprj%/entity/Inbox_entity/entityfields/inboxname/onValidation.js</onValidation> </entityField> <entityField> <name>EMAILADDRESS</name> <title>E-Mail Adresse</title> <mandatory v="true" /> + <onValidation>%aditoprj%/entity/Inbox_entity/entityfields/emailaddress/onValidation.js</onValidation> </entityField> <entityField> <name>INBOXDATE</name> @@ -119,7 +122,7 @@ <dependency> <name>dependency</name> <entityName>SupportTicket_entity</entityName> - <fieldName>TicketsProvider</fieldName> + <fieldName>SupportTickets</fieldName> </dependency> <children> <entityParameter> @@ -201,12 +204,26 @@ <titleProcess>%aditoprj%/entity/Inbox_entity/entityfields/closure_dayspreview/titleProcess.js</titleProcess> <displayValueProcess>%aditoprj%/entity/Inbox_entity/entityfields/closure_dayspreview/displayValueProcess.js</displayValueProcess> </entityField> + <entityActionGroup> + <name>deleteActionGroup</name> + <children> + <entityActionField> + <name>deleteInbox</name> + <title>Delete Inbox</title> + <onActionProcess>%aditoprj%/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <selectionType>UNBOUND</selectionType> + <iconId>NEON:TRASH</iconId> + <titleProcess>%aditoprj%/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/titleProcess.js</titleProcess> + <tooltipProcess>%aditoprj%/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/tooltipProcess.js</tooltipProcess> + </entityActionField> + </children> + </entityActionGroup> </entityFields> <recordContainers> <dbRecordContainer> <name>db</name> <conditionProcess>%aditoprj%/entity/Inbox_entity/recordcontainers/db/conditionProcess.js</conditionProcess> - <onDBDelete>%aditoprj%/entity/Inbox_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <alias>Data_alias</alias> <recordFieldMappings> <dbRecordFieldMapping> diff --git a/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/onActionProcess.js b/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..870ad8d179c7c96b10b89ffadcdfc571f4010857 --- /dev/null +++ b/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/onActionProcess.js @@ -0,0 +1,20 @@ +import("system.neon"); +import("system.translate"); +import("system.question"); +import("system.vars"); +import("system.db"); +import("Sql_lib"); + +var answer = question.askYesNo(translate.text("Confirmation dialog"), translate.withArguments("Do you really want to delete \"%0\"? If tickets still use this inbox, this might cause problems.", [vars.get("$field.INBOXNAME")]), false); + +if (answer == true){ + if (vars.get("$field.INBOXID")) + { + newWhereIfSet("INBOX.INBOXID", "$field.INBOXID").deleteData(true, "INBOX"); + newWhereIfSet("INBOX_EMPLOYEEGROUP_RELATION.INBOX_ID", "$field.INBOXID").deleteData(true, "INBOX_EMPLOYEEGROUP_RELATION"); + newWhereIfSet("INBOXFILTERGROUP_RELATION.INBOX_ID","$field.INBOXID").deleteData(true, "INBOXFILTERGROUP_RELATION"); + + question.showMessage(translate.withArguments("Inbox \"%0\" has been deleted.", [vars.get("$field.INBOXNAME")]), question.INFORMATION, translate.text("Successful")); + neon.refresh(); + } +} \ No newline at end of file diff --git a/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/titleProcess.js b/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4c735eec0a19f45f6fb85acf727bdc1167ac935e --- /dev/null +++ b/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/titleProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.result"); + + +result.string(translate.text("Delete Inbox")); \ No newline at end of file diff --git a/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/tooltipProcess.js b/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/tooltipProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..aab4212fb6f2124ccf2bd5c28a309bc54d09ec4b --- /dev/null +++ b/entity/Inbox_entity/entityfields/deleteactiongroup/children/deleteinbox/tooltipProcess.js @@ -0,0 +1,4 @@ +import("system.translate"); +import("system.result"); + +result.string(translate.text("Remove Inbox and it's occurance in Tickets.")); \ No newline at end of file diff --git a/entity/Inbox_entity/entityfields/emailaddress/onValidation.js b/entity/Inbox_entity/entityfields/emailaddress/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..507d9d8532a1cbac486f4f2b758dcc2ccce54883 --- /dev/null +++ b/entity/Inbox_entity/entityfields/emailaddress/onValidation.js @@ -0,0 +1,37 @@ +import("KeywordRegistry_basic"); +import("Communication_lib"); +import("Keyword_lib"); +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("EMAIL_ADDRESS") + .from("INBOX") + .where("INBOX.EMAIL_ADDRESS", vars.get("$field.EMAILADDRESS")) + .andIfSet("INBOX.INBOXID", vars.get("$field.INBOXID"),SqlBuilder.NOT_EQUAL()) + .cell(); +if (sql > 0) +{ + result.string(translate.text("Email address has to be unique") + "."); +} + +var commMedium = "COMMEMAIL"; + +var keywordAttributes = KeywordUtils.getAttributeRelationsByKey(commMedium, $KeywordRegistry.communicationMedium()); +var commCategory = keywordAttributes.contentType || "TEXT"; + +var fn = CommValidationUtil.makeValidationFn(commCategory); +if (fn != null) +{ + var commAddr = vars.get("$local.value"); + var additional = CommValidationUtil.getExtensionsBlueprint(); + + var res = fn.call(null, commAddr, additional); + if (res != null) + { + result.string(res); + } +} \ No newline at end of file diff --git a/entity/Inbox_entity/entityfields/inboxname/onValidation.js b/entity/Inbox_entity/entityfields/inboxname/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..473fa0fa759bda8d0267ec9390156f30f0f688ce --- /dev/null +++ b/entity/Inbox_entity/entityfields/inboxname/onValidation.js @@ -0,0 +1,17 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("NAME") + .from("INBOX") + .where("INBOX.NAME", vars.get("$field.INBOXNAME")) + .andIfSet("INBOX.INBOXID", vars.get("$field.INBOXID"),SqlBuilder.NOT_EQUAL()) + .cell(); + +if (sql > 0) +{ + result.string(translate.text("Name has to be unique") + "."); +} \ No newline at end of file diff --git a/entity/Inbox_entity/recordcontainers/db/onDBDelete.js b/entity/Inbox_entity/recordcontainers/db/onDBDelete.js deleted file mode 100644 index 822cd6d44276a07416ff880be0be41a469ec0100..0000000000000000000000000000000000000000 --- a/entity/Inbox_entity/recordcontainers/db/onDBDelete.js +++ /dev/null @@ -1,10 +0,0 @@ -import("Sql_lib"); -import("system.vars"); -import("system.db"); - -let inboxID = vars.getString("$field.INBOXID"); -if(inboxID) -{ - newWhereIfSet("INBOX_EMPLOYEEGROUP_RELATION.INBOX_ID", inboxID).deleteData(); - newWhereIfSet("INBOXFIITERGROUP_RELATION.INBOX_ID",inboxID).deleteData(); -} \ No newline at end of file diff --git a/entity/Letter_entity/Letter_entity.aod b/entity/Letter_entity/Letter_entity.aod index ca8ce950d521606798a60856041330c7d396a368..b928cf5d32e9ff7583f67b026d9eec857d701b2e 100644 --- a/entity/Letter_entity/Letter_entity.aod +++ b/entity/Letter_entity/Letter_entity.aod @@ -40,6 +40,7 @@ <entityParameter> <name>IncludeDocumentTemplateIds_param</name> <valueProcess>%aditoprj%/entity/Letter_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js</valueProcess> + <title></title> </entityParameter> </children> </entityConsumer> diff --git a/entity/Letter_entity/entityfields/documenttemplates/children/comingfrom_param/valueProcess.js b/entity/Letter_entity/entityfields/documenttemplates/children/comingfrom_param/valueProcess.js index 3e13e00bc051c6f70f830b1c02ab242268887787..489ff072d50288d03c732806a74e476c8eb99807 100644 --- a/entity/Letter_entity/entityfields/documenttemplates/children/comingfrom_param/valueProcess.js +++ b/entity/Letter_entity/entityfields/documenttemplates/children/comingfrom_param/valueProcess.js @@ -1,9 +1,4 @@ import("system.vars"); import("system.result"); -var actionName = vars.get("$param.ActionName_param") - -if(actionName != "ServiceLetter") -{ - result.string(vars.get("$field.comingfrom")); -} \ No newline at end of file +result.string(vars.get("$field.comingfrom")); \ No newline at end of file diff --git a/entity/Letter_entity/entityfields/documenttemplates/children/documenttemplatetype_param/valueProcess.js b/entity/Letter_entity/entityfields/documenttemplates/children/documenttemplatetype_param/valueProcess.js index 2db34ec5ae810d121fdab2280e91c78d72f5d1a2..11178b6b4c4b3854d383a9067877120aed771ccd 100644 --- a/entity/Letter_entity/entityfields/documenttemplates/children/documenttemplatetype_param/valueProcess.js +++ b/entity/Letter_entity/entityfields/documenttemplates/children/documenttemplatetype_param/valueProcess.js @@ -1,10 +1,4 @@ -import("system.vars"); import("KeywordRegistry_basic"); import("system.result"); -var actionName = vars.get("$param.ActionName_param") - -if (actionName != "ServiceLetter") -{ - result.string($KeywordRegistry.documentTemplateType$letter()); -} \ No newline at end of file +result.string($KeywordRegistry.documentTemplateType$letter()); diff --git a/entity/Letter_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js b/entity/Letter_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js index 87c558625abc2db1e8a706eecbeadc6335f2ccd2..2411e8b9b345db0ed5e6aa25842d28daec667994 100644 --- a/entity/Letter_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js +++ b/entity/Letter_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js @@ -11,10 +11,14 @@ if (actionName == "ServiceLetter") documenttemplates = newSelect("DOCUMENTTEMPLATEID") .from("DOCUMENTTEMPLATE") .leftJoin("DOCUMENTTEMPLATE_TICKETCATEGORY", "DOCUMENTTEMPLATE_ID = DOCUMENTTEMPLATEID") - .whereIfSet("DOCUMENTTEMPLATE.KIND", $KeywordRegistry.documentTemplateType$letter()) - .andIfSet("DOCUMENTTEMPLATE_TICKETCATEGORY.CLASSIFICATION", "$param.TicketCategory_param") - .or("DOCUMENTTEMPLATE.CLASSIFICATION", 10) + .where("DOCUMENTTEMPLATE.KIND", $KeywordRegistry.documentTemplateType$letter()) + .and(newWhere() + .or("DOCUMENTTEMPLATE.CLASSIFICATION", $KeywordRegistry.documentTemplateTypeCategory$singleall()) + .or("DOCUMENTTEMPLATE.CLASSIFICATION", $KeywordRegistry.documentTemplateTypeCategory$singleinternal()) + .or("DOCUMENTTEMPLATE.CLASSIFICATION", $KeywordRegistry.documentTemplateTypeCategory$singleexternal())) + .and(newWhere() .or("DOCUMENTTEMPLATE.ALL_TICKET_CATEGORIES", 1) + .or("DOCUMENTTEMPLATE_TICKETCATEGORY.CLASSIFICATION", "$param.TicketCategory_param")) .arrayColumn(); result.string(JSON.stringify(documenttemplates)); } diff --git a/entity/MailSignature_entity/entityfields/mail_address/onValidation.js b/entity/MailSignature_entity/entityfields/mail_address/onValidation.js index 02cab60da6883adeb8db01a91e73c5517ad83657..58b3402b3df4874097c94f5b50adbe94fa44aac8 100644 --- a/entity/MailSignature_entity/entityfields/mail_address/onValidation.js +++ b/entity/MailSignature_entity/entityfields/mail_address/onValidation.js @@ -1,9 +1,23 @@ +import("Sql_lib"); +import("system.translate"); +import("system.neon"); import("system.result"); import("Communication_lib"); import("system.vars"); import("KeywordRegistry_basic"); import("Keyword_lib"); +var sql = new SqlBuilder() + .selectCount("MAIL_ADDRESS") + .from("MAILSIGNATURE") + .where("MAILSIGNATURE.MAIL_ADDRESS", vars.get("$field.MAIL_ADDRESS")) + .andIfSet("MAILSIGNATURE.MAILSIGNATUREID", vars.get("$field.MAILSIGNATUREID"),SqlBuilder.NOT_EQUAL()) + .cell(); + +if (sql > 0) +{ + result.string(translate.text("Email address has to be unique") + "."); +} var commMedium = "COMMEMAIL"; diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 5668029cc950db0f04026a5a0abf6b8ce60676f4..057d30016a75808bf365324c215ef214b43c29ea 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -1375,7 +1375,7 @@ <dependency> <name>dependency</name> <entityName>SupportTicket_entity</entityName> - <fieldName>TicketsProvider</fieldName> + <fieldName>SupportTickets</fieldName> </dependency> <children> <entityParameter> diff --git a/entity/Person_entity/entityfields/serviceticket/children/returnempty_param/valueProcess.js b/entity/Person_entity/entityfields/serviceticket/children/returnempty_param/valueProcess.js index b691020ed6224d159383287eb2b841b9d5d225bd..dc28dd1668428cd72a6afb49c02147bd36f8ba42 100644 --- a/entity/Person_entity/entityfields/serviceticket/children/returnempty_param/valueProcess.js +++ b/entity/Person_entity/entityfields/serviceticket/children/returnempty_param/valueProcess.js @@ -1,4 +1,4 @@ import("system.result"); -result.string( true); \ No newline at end of file +result.string( false); \ No newline at end of file diff --git a/entity/QuickEntry_entity/entityfields/quickentrysupporttickets/children/returnempty_param/valueProcess.js b/entity/QuickEntry_entity/entityfields/supporttickets/children/returnempty_param/valueProcess.js similarity index 100% rename from entity/QuickEntry_entity/entityfields/quickentrysupporttickets/children/returnempty_param/valueProcess.js rename to entity/QuickEntry_entity/entityfields/supporttickets/children/returnempty_param/valueProcess.js diff --git a/entity/QuickEntry_entity/entityfields/quickentrysupporttickets/children/taskrequestorcontactid_param/valueProcess.js b/entity/QuickEntry_entity/entityfields/supporttickets/children/taskrequestorcontactid_param/valueProcess.js similarity index 100% rename from entity/QuickEntry_entity/entityfields/quickentrysupporttickets/children/taskrequestorcontactid_param/valueProcess.js rename to entity/QuickEntry_entity/entityfields/supporttickets/children/taskrequestorcontactid_param/valueProcess.js diff --git a/entity/ServiceEmailRecipients_entity/ServiceEmailRecipients_entity.aod b/entity/ServiceEmailRecipients_entity/ServiceEmailRecipients_entity.aod index 14587c1c59fe4274ae3e95bf5b7ccc2defde911e..e91a4c5f39a803af31846213648d3a6a13e4605d 100644 --- a/entity/ServiceEmailRecipients_entity/ServiceEmailRecipients_entity.aod +++ b/entity/ServiceEmailRecipients_entity/ServiceEmailRecipients_entity.aod @@ -20,12 +20,6 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> - <entityConsumer> - <name>ServiceMail</name> - <dependency> - <name>dependency</name> - </dependency> - </entityConsumer> <entityConsumer> <name>PersonsConsumer</name> <dependency> @@ -34,18 +28,6 @@ <fieldName>Contacts</fieldName> </dependency> </entityConsumer> - <entityConsumer> - <name>ServiceEmailRecipientsEmployeesConsumer</name> - <dependency> - <name>dependency</name> - </dependency> - </entityConsumer> - <entityConsumer> - <name>ServiceEmailRecipientsPersonsConsumer</name> - <dependency> - <name>dependency</name> - </dependency> - </entityConsumer> <entityField> <name>contact_id</name> <title>Contact</title> diff --git a/entity/ServiceEmail_entity/ServiceEmail_entity.aod b/entity/ServiceEmail_entity/ServiceEmail_entity.aod index 155c7b6436fd82ebdfccd9a828097368c6544ff6..02fc4d48fa8c01c2539e67a24f1003eca47eb915 100644 --- a/entity/ServiceEmail_entity/ServiceEmail_entity.aod +++ b/entity/ServiceEmail_entity/ServiceEmail_entity.aod @@ -173,10 +173,6 @@ <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> - <entityParameter> - <name>ExcludedKeyIdsSubquery_param</name> - <valueProcess>%aditoprj%/entity/ServiceEmail_entity/entityfields/keywordsticketstatus/children/excludedkeyidssubquery_param/valueProcess.js</valueProcess> - </entityParameter> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/ServiceEmail_entity/entityfields/keywordsticketstatus/children/containername_param/valueProcess.js</valueProcess> @@ -251,16 +247,9 @@ </entityProvider> <entityField> <name>ServiceEmailRecipientsEmployee</name> - <consumer>ServiceEmailRecipientsEmployeeConsumer</consumer> <linkedContext>Employee</linkedContext> <valueProcess>%aditoprj%/entity/ServiceEmail_entity/entityfields/serviceemailrecipientsemployee/valueProcess.js</valueProcess> </entityField> - <entityConsumer> - <name>ServiceEmailRecipientsEmployeeConsumer</name> - <dependency> - <name>dependency</name> - </dependency> - </entityConsumer> <entityParameter> <name>DocumentTemplateType_param</name> <expose v="true" /> diff --git a/entity/ServiceEmail_entity/entityfields/conclusion/stateProcess.js b/entity/ServiceEmail_entity/entityfields/conclusion/stateProcess.js index ed6bf1f9fe8458ff48dc0e7c13a43888182e6b03..3f5af3519d294c871f6d10ce934ac626f91595d7 100644 --- a/entity/ServiceEmail_entity/entityfields/conclusion/stateProcess.js +++ b/entity/ServiceEmail_entity/entityfields/conclusion/stateProcess.js @@ -8,7 +8,7 @@ import("KeywordRegistry_basic"); var str_ret = neon.COMPONENTSTATE_INVISIBLE; var str_status = vars.get( "$field.TICKET_STATUS_AFTER_SEND"); -if( [ $KeywordRegistry.taskStatus$ended(), $KeywordRegistry.taskStatus$endedAbandoned(), $KeywordRegistry.taskStatus$endedDone()].includes( str_status) != -1) +if( [$KeywordRegistry.taskStatus$ended(), $KeywordRegistry.taskStatus$endedAbandoned(), $KeywordRegistry.taskStatus$endedDone()].includes( str_status)) { str_ret = ( [neon.OPERATINGSTATE_EDIT, neon.OPERATINGSTATE_NEW].indexOf( vars.get( "$sys.recordstate")) != -1)? neon.COMPONENTSTATE_EDITABLE : neon.COMPONENTSTATE_READONLY; diff --git a/entity/ServiceEmail_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js b/entity/ServiceEmail_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js index ff0a6c5305debd67631c04ad323b40fabcafbe24..30deec0d2f3960f2eefc91b1121c84170502e531 100644 --- a/entity/ServiceEmail_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js +++ b/entity/ServiceEmail_entity/entityfields/documenttemplates/children/includedocumenttemplateids_param/valueProcess.js @@ -11,11 +11,13 @@ if (actionName == "replayEmailAction") documenttemplates = newSelect("DOCUMENTTEMPLATEID") .from("DOCUMENTTEMPLATE") .leftJoin("DOCUMENTTEMPLATE_TICKETCATEGORY", "DOCUMENTTEMPLATE_ID = DOCUMENTTEMPLATEID") - .whereIfSet("DOCUMENTTEMPLATE.KIND", $KeywordRegistry.documentTemplateType$mail()) - .andIfSet("DOCUMENTTEMPLATE_TICKETCATEGORY.CLASSIFICATION", "$param.TicketCategory_param") - .or("DOCUMENTTEMPLATE.CLASSIFICATION", 10) - .or("DOCUMENTTEMPLATE.CLASSIFICATION", 12) + .where("DOCUMENTTEMPLATE.KIND", $KeywordRegistry.documentTemplateType$mail()) + .and(newWhere() + .or("DOCUMENTTEMPLATE.CLASSIFICATION", $KeywordRegistry.documentTemplateTypeCategory$singleall()) + .or("DOCUMENTTEMPLATE.CLASSIFICATION", $KeywordRegistry.documentTemplateTypeCategory$singleexternal())) + .and(newWhere() .or("DOCUMENTTEMPLATE.ALL_TICKET_CATEGORIES", 1) + .or("DOCUMENTTEMPLATE_TICKETCATEGORY.CLASSIFICATION", "$param.TicketCategory_param")) .arrayColumn(); } @@ -24,11 +26,13 @@ if (actionName == "forwardEmailAction") documenttemplates = newSelect("DOCUMENTTEMPLATEID") .from("DOCUMENTTEMPLATE") .leftJoin("DOCUMENTTEMPLATE_TICKETCATEGORY", "DOCUMENTTEMPLATE_ID = DOCUMENTTEMPLATEID") - .whereIfSet("DOCUMENTTEMPLATE.KIND", $KeywordRegistry.documentTemplateType$mail()) - .andIfSet("DOCUMENTTEMPLATE_TICKETCATEGORY.CLASSIFICATION", "$param.TicketCategory_param") - .or("DOCUMENTTEMPLATE.CLASSIFICATION", 10) - .or("DOCUMENTTEMPLATE.CLASSIFICATION", 11) + .where("DOCUMENTTEMPLATE.KIND", $KeywordRegistry.documentTemplateType$mail()) + .and(newWhere() + .or("DOCUMENTTEMPLATE.CLASSIFICATION", $KeywordRegistry.documentTemplateTypeCategory$singleall()) + .or("DOCUMENTTEMPLATE.CLASSIFICATION", $KeywordRegistry.documentTemplateTypeCategory$singleinternal())) + .and(newWhere() .or("DOCUMENTTEMPLATE.ALL_TICKET_CATEGORIES", 1) + .or("DOCUMENTTEMPLATE_TICKETCATEGORY.CLASSIFICATION", "$param.TicketCategory_param")) .arrayColumn(); } diff --git a/entity/ServiceEmail_entity/entityfields/keywordsticketstatus/children/excludedkeyidssubquery_param/valueProcess.js b/entity/ServiceEmail_entity/entityfields/keywordsticketstatus/children/excludedkeyidssubquery_param/valueProcess.js deleted file mode 100644 index f5116087517790fd336c6c9b251962582ca41451..0000000000000000000000000000000000000000 --- a/entity/ServiceEmail_entity/entityfields/keywordsticketstatus/children/excludedkeyidssubquery_param/valueProcess.js +++ /dev/null @@ -1,25 +0,0 @@ -import("system.vars"); -import("system.result"); -import("KeywordRegistry_basic") - -if(vars.get("$param.ActionName_param")) -{ - var actionName = vars.get("$param.ActionName_param"); - - if(actionName != null) - { - - if( (actionName == "replayEmailAction") || (actionName == "replayEmailToAllAction") ) - { - result.string($KeywordRegistry.taskStatus$entry(),$KeywordRegistry.taskStatus$reopen(),$KeywordRegistry.taskStatus$inProgress(),$KeywordRegistry.taskStatus$internalreply()); - } - if(actionName == 'forwardEmailAction') - { - result.string($KeywordRegistry.taskStatus$entry(),$KeywordRegistry.taskStatus$reopen(),$KeywordRegistry.taskStatus$request(),$KeywordRegistry.taskStatus$reply(),$KeywordRegistry.taskStatus$inProgress()); - } - } -} - - - - diff --git a/entity/ServiceEmail_entity/onValidation.js b/entity/ServiceEmail_entity/onValidation.js index 44b92991eac08e87aa241696ab5beae4f1ef470f..fbfb40d8866791fa449d85148dbb94af5ea9d82d 100644 --- a/entity/ServiceEmail_entity/onValidation.js +++ b/entity/ServiceEmail_entity/onValidation.js @@ -4,37 +4,6 @@ import("system.neon"); import("system.translate"); import("system.result"); import("system.vars"); - -var noRecipient = true; - -var recipientsTo = []; - -if(vars.exists("$field.Recipients_TO.insertedRows")) -{ - recipientsTo = vars.get("$field.Recipients_TO.insertedRows"); - recipientsTo.forEach(function(obj) - { - if(obj.Recipient) - { - noRecipient = false; - } - }); -} - -if(noRecipient) -{ - if( vars.exists("$field.Recipients_ToLookup.insertedRows")) - { - recipientsTo = vars.get("$field.Recipients_ToLookup.insertedRows"); - recipientsTo.forEach(function(obj) - { - if(obj.RecipientPerson) - { - noRecipient = false; - } - }); - } -} //// CHECK SENDER diff --git a/entity/ServiceEmail_entity/recordcontainers/jdito/onInsert.js b/entity/ServiceEmail_entity/recordcontainers/jdito/onInsert.js index 2cb651be1bb7534c4ff52488a1163eb808219d77..8c507747bc810136d2b47e3289006557b8678a66 100644 --- a/entity/ServiceEmail_entity/recordcontainers/jdito/onInsert.js +++ b/entity/ServiceEmail_entity/recordcontainers/jdito/onInsert.js @@ -17,6 +17,8 @@ import("ActivityTask_lib"); var recArray = []; var ccArray = []; var bccArray = []; +var TaskfieldValues = {}; +var TicketfieldValues = {}; var fromEmail = vars.get("$field.from"); var subject = vars.get("$field.subject"); @@ -188,17 +190,14 @@ if(returnedMsgAfterSend == true) // insert for ACTIVITY var DataPreset = { - "directionKeywordId" : $KeywordRegistry.activityDirection$outgoing, + "directionKeywordId" : $KeywordRegistry.activityDirection$outgoing(), "subject" : infoText, "content" : contentActivity, - "categoryKeywordId" : $KeywordRegistry.activityCategory$mail() - } - var ActivityLink = - { - "SupportTicket" : ticketID - } - - ActivityUtils.insertNewActivity(DataPreset, ActivityLink); + "categoryKeywordId" : $KeywordRegistry.activityCategory$mail() + }; + var ActivityLink = ["Supportticket", ticketID]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); /// UPDATE TICKET FIELD: CONCLUSION & DATE_EDIT_STATUS if( ticketID) @@ -290,18 +289,15 @@ if(returnedMsgAfterSend == true) // insert for ACTIVITY var DataPreset = { - "directionKeywordId" : $KeywordRegistry.activityDirection$outgoing, + "directionKeywordId" : $KeywordRegistry.activityDirection$outgoing(), "responsibleContactId" : vars.get( "$param.ContactId_param"), "subject" : translate.text("EMAIL ERROR") + "!", "content" : contentActivity, "categoryKeywordId" : $KeywordRegistry.activityCategory$mail() - } - var ActivityLink = - { - "SupportTicket" : ticketID - } - - ActivityUtils.insertNewActivity(DataPreset, ActivityLink); + }; + var ActivityLink = ["Supportticket", ticketID]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); } diff --git a/entity/SupportTicketMultiSelect_entity/SupportTicketMultiSelect_entity.aod b/entity/SupportTicketMultiSelect_entity/SupportTicketMultiSelect_entity.aod index cc6a0d3c3d385168837672224094486386f02d8b..c8daea565749df730da1358a2480166421e75c80 100644 --- a/entity/SupportTicketMultiSelect_entity/SupportTicketMultiSelect_entity.aod +++ b/entity/SupportTicketMultiSelect_entity/SupportTicketMultiSelect_entity.aod @@ -103,11 +103,35 @@ <name>ChangeData</name> <title>Save changes</title> <onActionProcess>%aditoprj%/entity/SupportTicketMultiSelect_entity/entityfields/changedata/onActionProcess.js</onActionProcess> + <titleProcess>%aditoprj%/entity/SupportTicketMultiSelect_entity/entityfields/changedata/titleProcess.js</titleProcess> </entityActionField> <entityProvider> <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>CONCLUSION</name> + <title>Conclusion</title> + <consumer>KeywordTicketConclusion</consumer> + <mandatoryProcess>%aditoprj%/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/mandatoryProcess.js</mandatoryProcess> + <stateProcess>%aditoprj%/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/displayValueProcess.js</displayValueProcess> + </entityField> + <entityConsumer> + <name>KeywordTicketConclusion</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/SupportTicketMultiSelect_entity/entityfields/keywordticketconclusion/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <datalessRecordContainer> diff --git a/entity/SupportTicketMultiSelect_entity/entityfields/changedata/onActionProcess.js b/entity/SupportTicketMultiSelect_entity/entityfields/changedata/onActionProcess.js index dd746b7f0eb2f24b041346fc721ecd79fe12e2c2..41ee4231cb9743c4c282d138cef7ec27294f9cb4 100644 --- a/entity/SupportTicketMultiSelect_entity/entityfields/changedata/onActionProcess.js +++ b/entity/SupportTicketMultiSelect_entity/entityfields/changedata/onActionProcess.js @@ -1,34 +1,58 @@ +import("ActivityTask_lib"); +import("system.translate"); +import("system.tools"); import("Util_lib"); import("Sql_lib"); import("system.neon"); import("system.vars"); +import("KeywordRegistry_basic"); var taskIDs= JSON.parse(vars.get("$param.TaskIds_param")); var TaskfieldValues = {}; var TicketfieldValues = {}; -/// TASK +/// PRIORITY if(vars.exists("$field.PRIORITY") && (vars.get("$field.PRIORITY") != "" )) { TaskfieldValues["PRIORITY"] = vars.get("$field.PRIORITY"); } - +/// STATUS if(vars.exists("$field.STATUS") && (vars.get("$field.STATUS") != "" )) { TaskfieldValues["STATUS"] = vars.get("$field.STATUS"); -} - -/// UPDATE TASK -TaskfieldValues["STATUS"] = vars.get("$field.TICKET_STATUS_AFTER_SEND"); -newWhere("TASK.TASKID",taskIDs,SqlBuilder.IN()).updateFields(TaskfieldValues); - -/// TICKET -var TicketfieldValues = {}; - + TicketfieldValues["DATE_EDIT_STATUS"] = vars.get("$sys.date"); + if(vars.get("$field.STATUS") == $KeywordRegistry.taskStatus$unassigned()) + { + TicketfieldValues["EDITOR_CONTACT_ID"] = ""; + } + if(vars.get("field.STATUS") == $KeywordRegistry.taskStatus$ended()) + { + TicketfieldValues["DATE_END"] = vars.get("$sys.date"); + TicketfieldValues["CONCLUSION"] = vars.get("$field.CONCLUSION"); + + var obj_toolsUser = tools.getCurrentUser()[tools.PARAMS]; + + //insert Activity + DataPreset = + { + "directionKeywordId" : $KeywordRegistry.activityDirection$internal(), + "subject" : translate.text("Ticket returned"), + "content" : translate.text("Ticket returned to pool") + ". " + +"\n"+ translate.text("Original editor") + ": " + vars.get( "$field.EDITOR_CONTACT_ID") + +"\n"+ translate.text("Returned by") + ": "+ obj_toolsUser[tools.FIRSTNAME] +" "+ obj_toolsUser[tools.LASTNAME], + "categoryKeywordId" : $KeywordRegistry.activityCategory$sys() + }; + var ActivityLink = ["Supportticket", ticketID]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); + } +} +/// EDITOR if(vars.exists("$field.EDITOR_CONTACT_ID") && (vars.get("$field.EDITOR_CONTACT_ID") != "" )) { TicketfieldValues["EDITOR_CONTACT_ID"] = vars.get("$field.EDITOR_CONTACT_ID"); } +/// CATEGORY if(vars.exists("$field.CATEGORY") && (vars.get("$field.CATEGORY") != "" )) { TicketfieldValues["CATEGORY"] = vars.get("$field.CATEGORY"); diff --git a/entity/SupportTicketMultiSelect_entity/entityfields/changedata/titleProcess.js b/entity/SupportTicketMultiSelect_entity/entityfields/changedata/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c68d9bac28840d78e04d019b6712de9e5678792a --- /dev/null +++ b/entity/SupportTicketMultiSelect_entity/entityfields/changedata/titleProcess.js @@ -0,0 +1,5 @@ +import("system.translate"); +import("system.result"); + + +result.string(translate.text("Save changes")); \ No newline at end of file diff --git a/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/displayValueProcess.js b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5bb3f4ad5d00d2b1ae6e2e765f47bc3725d4b079 --- /dev/null +++ b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/displayValueProcess.js @@ -0,0 +1,14 @@ +import("Keyword_lib"); +import("system.vars"); +import("system.result"); + + +var subject = KeywordUtils.getViewValue("TICKETCONCLUSION", vars.get("$field.CONCLUSION")); +if (!subject) +{ + result.string("-"); +} +else +{ + result.string(subject); +} \ No newline at end of file diff --git a/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/mandatoryProcess.js b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/mandatoryProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4147675923951e3dd12d802aa5bd8044a5cd7cf4 --- /dev/null +++ b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/mandatoryProcess.js @@ -0,0 +1,15 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); +import("KeywordRegistry_basic"); + + + +if (vars.get ("$field.STATUS") != $KeywordRegistry.taskStatus$ended()) +{ + result.string("false"); +} +else +{ + result.string("true"); +} \ No newline at end of file diff --git a/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/stateProcess.js b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8a8894566f092594ea56b3f54fcb5ccd15066004 --- /dev/null +++ b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/stateProcess.js @@ -0,0 +1,14 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); +import("KeywordRegistry_basic"); + + +var str_ret = neon.COMPONENTSTATE_INVISIBLE; +var str_status = vars.get( "$field.STATUS"); + +if( [ $KeywordRegistry.taskStatus$ended(), $KeywordRegistry.taskStatus$endedDone(), $KeywordRegistry.taskStatus$endedAbandoned()].includes( str_status)) +{ + str_ret = neon.COMPONENTSTATE_EDITABLE; +} +result.string( str_ret); \ No newline at end of file diff --git a/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/valueProcess.js b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8d5e191ffdbee7d8428d18f99fed8d0cfd5d27b5 --- /dev/null +++ b/entity/SupportTicketMultiSelect_entity/entityfields/conclusion/valueProcess.js @@ -0,0 +1,10 @@ +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (!vars.get("$this.value") && vars.get("$field.STATUS") == $KeywordRegistry.taskStatus$ended()) +{ + result.string($KeywordRegistry.ticketConclusion$success()); +} \ No newline at end of file diff --git a/entity/SupportTicketMultiSelect_entity/entityfields/keywordticketconclusion/children/containername_param/valueProcess.js b/entity/SupportTicketMultiSelect_entity/entityfields/keywordticketconclusion/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..aac3b38f48946a1e010bf845ed0f789709f9e832 --- /dev/null +++ b/entity/SupportTicketMultiSelect_entity/entityfields/keywordticketconclusion/children/containername_param/valueProcess.js @@ -0,0 +1,5 @@ +import("KeywordRegistry_basic"); +import("system.result"); + + +result.string( $KeywordRegistry.ticketConclusion()) \ No newline at end of file diff --git a/entity/SupportTicketTemplate_entity/SupportTicketTemplate_entity.aod b/entity/SupportTicketTemplate_entity/SupportTicketTemplate_entity.aod index 355b20d2d6c8c1f1919de2498ea5bba4e7d35d6e..3be511ca9e18e41d4535ae5011c9784eb3a7710f 100644 --- a/entity/SupportTicketTemplate_entity/SupportTicketTemplate_entity.aod +++ b/entity/SupportTicketTemplate_entity/SupportTicketTemplate_entity.aod @@ -26,6 +26,7 @@ <name>NAME</name> <title>Name</title> <mandatory v="true" /> + <onValidation>%aditoprj%/entity/SupportTicketTemplate_entity/entityfields/name/onValidation.js</onValidation> </entityField> <entityField> <name>INBOX_ID</name> @@ -91,9 +92,8 @@ <name>TEMPLATENO</name> <title>Template No.</title> <contentType>NUMBER</contentType> + <maxValue v="999" /> <minValue v="1" /> - <outputFormat>000</outputFormat> - <inputFormat>000</inputFormat> <mandatory v="true" /> <state>READONLY</state> <valueProcess>%aditoprj%/entity/SupportTicketTemplate_entity/entityfields/templateno/valueProcess.js</valueProcess> diff --git a/entity/SupportTicketTemplate_entity/entityfields/name/onValidation.js b/entity/SupportTicketTemplate_entity/entityfields/name/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..8b6d36c1fa248ae56bd1fbac857ae1ea3dd7479a --- /dev/null +++ b/entity/SupportTicketTemplate_entity/entityfields/name/onValidation.js @@ -0,0 +1,16 @@ +import("system.neon"); +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); + +var sql = new SqlBuilder() + .selectCount("TEMPLATENAME") + .from("TICKETTEMPLATE") + .where("TICKETTEMPLATE.TEMPLATENAME", vars.get("$field.NAME")) + .andIfSet("TICKETTEMPLATE.TICKETTEMPLATEID", vars.get("$field.TEMPLATE_ID"),SqlBuilder.NOT_EQUAL()) + .cell(); +if (sql > 0) +{ + result.string(translate.text("Name has to be unique") + "."); +} \ No newline at end of file diff --git a/entity/SupportTicket_entity/SupportTicket_entity.aod b/entity/SupportTicket_entity/SupportTicket_entity.aod index 09b4e657147e68251bedb97e5d305b1c94f0b4e3..2a2933e68495dca2ec5179f3001e3838b9ffc35b 100644 --- a/entity/SupportTicket_entity/SupportTicket_entity.aod +++ b/entity/SupportTicket_entity/SupportTicket_entity.aod @@ -16,27 +16,6 @@ <titlePlural>Service tickets</titlePlural> <recordContainer>db</recordContainer> <entityFields> - <entityActionGroup> - <name>observeActionGroup</name> - <children> - <entityActionField> - <name>observe</name> - <title>Observe</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> - <isObjectAction v="true" /> - <iconId>VAADIN:EYE</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> - <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> - </entityActionField> - <entityActionField> - <name>cancelObservation</name> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> - <iconId>VAADIN:EYE_SLASH</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> - <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> - </entityActionField> - </children> - </entityActionGroup> <entityProvider> <name>#PROVIDER</name> </entityProvider> @@ -57,7 +36,7 @@ </entityField> <entityField> <name>TASK_STATUS</name> - <title>{$TICKET_STATUS}</title> + <title>{$TASK_STATUS}</title> <consumer>KeywordTaskState</consumer> <groupable v="true" /> <mandatory v="true" /> @@ -363,22 +342,6 @@ <fieldName>Contact</fieldName> </dependency> </entityConsumer> - <entityActionField> - <name>newActivity</name> - <title>New activity</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> - <isMenuAction v="true" /> - <isObjectAction v="true" /> - <iconId>VAADIN:HOURGLASS_END</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newactivity/stateProcess.js</stateProcess> - <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess> - </entityActionField> - <entityActionField> - <name>newTask</name> - <title>New task</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newtask/onActionProcess.js</onActionProcess> - <iconId>VAADIN:TASKS</iconId> - </entityActionField> <entityConsumer> <name>ModuleTrees</name> <dependency> @@ -517,8 +480,8 @@ <expose v="true" /> </entityParameter> <entityProvider> - <name>TicketsProvider</name> - <documentation>%aditoprj%/entity/SupportTicket_entity/entityfields/ticketsprovider/documentation.adoc</documentation> + <name>SupportTickets</name> + <documentation>%aditoprj%/entity/SupportTicket_entity/entityfields/supporttickets/documentation.adoc</documentation> </entityProvider> <entityParameter> <name>InboxId_param</name> @@ -576,29 +539,11 @@ <name>EMAILMAILSIGNATURE</name> <state>READONLY</state> </entityField> - <entityActionField> - <name>replyEmail</name> - <title>Reply</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - <iconId>VAADIN:AT</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/replyemail/stateProcess.js</stateProcess> - <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/replyemail/tooltipProcess.js</tooltipProcess> - </entityActionField> <entityField> <name>SENDEREMAIL</name> <title>Sender</title> <groupable v="true" /> </entityField> - <entityActionField> - <name>forwardTicket</name> - <title>Forward</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/forwardticket/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - <iconId>NEON:EXPORT</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/forwardticket/stateProcess.js</stateProcess> - <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/forwardticket/tooltipProcess.js</tooltipProcess> - </entityActionField> <entityField> <name>CC_RECIPIENTS</name> </entityField> @@ -608,14 +553,6 @@ <state>READONLY</state> <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/ticket_title/valueProcess.js</valueProcess> </entityField> - <entityActionField> - <name>pullNextTicket</name> - <title>Pull tickets</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/pullnextticket/onActionProcess.js</onActionProcess> - <isMenuAction v="true" /> - <isObjectAction v="false" /> - <iconId>VAADIN:ARCHIVE</iconId> - </entityActionField> <entityParameter> <name>BasedOnRoles_param</name> <expose v="true" /> @@ -660,19 +597,6 @@ <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/date_edit_status/titleProcess.js</titleProcess> <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/date_edit_status/valueProcess.js</valueProcess> </entityField> - <entityActionGroup> - <name>FilterActionsGroup</name> - <children> - <entityActionField> - <name>changeMultiple</name> - <title>Change selected</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/filteractionsgroup/children/changemultiple/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - <selectionType>MULTI</selectionType> - <iconId>VAADIN:PENCIL</iconId> - </entityActionField> - </children> - </entityActionGroup> <entityConsumer> <name>KeywordTicketCategory</name> <dependency> @@ -692,26 +616,6 @@ <title>Activities</title> <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/counteractivities/valueProcess.js</valueProcess> </entityField> - <entityActionField> - <name>newNote</name> - <title>New note</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newnote/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - <iconId>VAADIN:NOTEBOOK</iconId> - <tooltip></tooltip> - <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newnote/tooltipProcess.js</tooltipProcess> - </entityActionField> - <entityActionField> - <name>returnTicket</name> - <title>Return Ticket</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/onActionProcess.js</onActionProcess> - <isMenuAction v="true" /> - <isObjectAction v="false" /> - <iconId>VAADIN:INBOX</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/stateProcess.js</stateProcess> - <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/titleProcess.js</titleProcess> - <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/tooltipProcess.js</tooltipProcess> - </entityActionField> <entityParameter> <name>TaskRequestorContactId_param</name> <expose v="true" /> @@ -741,12 +645,6 @@ <entityName>Inbox_entity</entityName> <fieldName>Indexes</fieldName> </dependency> - <children> - <entityParameter> - <name>ExcludedInboxes_param</name> - <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/inboxes/children/excludedinboxes_param/valueProcess.js</valueProcess> - </entityParameter> - </children> </entityConsumer> <entityConsumer> <name>Activities</name> @@ -836,20 +734,6 @@ </entityParameter> </children> </entityConsumer> - <entityActionField> - <name>openAdminView</name> - <title>Open admin view</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/openadminview/onActionProcess.js</onActionProcess> - <iconId>VAADIN:CURLY_BRACKETS</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/openadminview/stateProcess.js</stateProcess> - </entityActionField> - <entityActionField> - <name>duplicateTicket</name> - <title>Duplicate Ticket</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/duplicateticket/onActionProcess.js</onActionProcess> - <selectionType>UNBOUND</selectionType> - <iconId>VAADIN:COPY</iconId> - </entityActionField> <entityParameter> <name>TicketCategory_param</name> <expose v="true" /> @@ -862,22 +746,6 @@ <name>TicketConclusion_param</name> <expose v="true" /> </entityParameter> - <entityActionField> - <name>reopenTicket</name> - <title>Re-open</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/reopenticket/onActionProcess.js</onActionProcess> - <iconId>VAADIN:TIME_BACKWARD</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/reopenticket/stateProcess.js</stateProcess> - </entityActionField> - <entityActionField> - <name>resubmitTicket</name> - <title>Follow-Up</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/resubmitticket/onActionProcess.js</onActionProcess> - <selectionType>UNBOUND</selectionType> - <isSaveAction v="false" /> - <iconId>NEON:RECURRING_APPOINTMENT</iconId> - <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/resubmitticket/stateProcess.js</stateProcess> - </entityActionField> <entityField> <name>IS_OVERDUE_SYMBOL</name> <title></title> @@ -886,14 +754,6 @@ <groupable v="false" /> <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/is_overdue_symbol/valueProcess.js</valueProcess> </entityField> - <entityActionField> - <name>newTicket</name> - <title>Enter new Ticket</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newticket/onActionProcess.js</onActionProcess> - <isMenuAction v="true" /> - <isObjectAction v="false" /> - <iconId>VAADIN:CHAT</iconId> - </entityActionField> <entityField> <name>NEW_TICKET</name> <title>Enter new Ticket</title> @@ -906,13 +766,6 @@ <color>priority-low-color</color> <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/new_ticketcontact/titleProcess.js</titleProcess> </entityField> - <entityActionField> - <name>newTicketContact</name> - <title>Enter new Ticket & Contact</title> - <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newticketcontact/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - <iconId>VAADIN:CHAT</iconId> - </entityActionField> <entityField> <name>isoverdue</name> <contentType>TEXT</contentType> @@ -933,6 +786,144 @@ <name>TicketNo_param</name> <expose v="true" /> </entityParameter> + <entityField> + <name>EMAILMAILSIGNATURE_ANSWER</name> + </entityField> + <entityActionGroup> + <name>observeActionGroup</name> + <children> + <entityActionField> + <name>observe</name> + <title>Observe</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/onActionProcess.js</onActionProcess> + <isObjectAction v="true" /> + <iconId>VAADIN:EYE</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/observe/titleProcess.js</titleProcess> + </entityActionField> + <entityActionField> + <name>cancelObservation</name> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/onActionProcess.js</onActionProcess> + <iconId>VAADIN:EYE_SLASH</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/observeactiongroup/children/cancelobservation/titleProcess.js</titleProcess> + </entityActionField> + </children> + </entityActionGroup> + <entityActionField> + <name>newActivity</name> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="true" /> + <iconId>VAADIN:HOURGLASS_END</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newactivity/stateProcess.js</stateProcess> + <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess> + </entityActionField> + <entityActionField> + <name>newTask</name> + <title>New task</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newtask/onActionProcess.js</onActionProcess> + <iconId>VAADIN:TASKS</iconId> + </entityActionField> + <entityActionField> + <name>replyEmail</name> + <title>Reply</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>VAADIN:AT</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/replyemail/stateProcess.js</stateProcess> + <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/replyemail/tooltipProcess.js</tooltipProcess> + </entityActionField> + <entityActionField> + <name>forwardTicket</name> + <title>Forward</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/forwardticket/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>NEON:EXPORT</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/forwardticket/stateProcess.js</stateProcess> + <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/forwardticket/tooltipProcess.js</tooltipProcess> + </entityActionField> + <entityActionField> + <name>pullNextTicket</name> + <title>Pull tickets</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/pullnextticket/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> + <iconId>VAADIN:ARCHIVE</iconId> + </entityActionField> + <entityActionGroup> + <name>FilterActionsGroup</name> + <children> + <entityActionField> + <name>changeMultiple</name> + <title>Change selected</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/filteractionsgroup/children/changemultiple/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <selectionType>MULTI</selectionType> + <iconId>VAADIN:PENCIL</iconId> + </entityActionField> + </children> + </entityActionGroup> + <entityActionField> + <name>newNote</name> + <title>New note</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newnote/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>VAADIN:NOTEBOOK</iconId> + <tooltip></tooltip> + <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newnote/tooltipProcess.js</tooltipProcess> + </entityActionField> + <entityActionField> + <name>returnTicket</name> + <title>Return Ticket</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> + <iconId>VAADIN:INBOX</iconId> + <state>EDITABLE</state> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/titleProcess.js</titleProcess> + <tooltipProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/returnticket/tooltipProcess.js</tooltipProcess> + </entityActionField> + <entityActionField> + <name>duplicateTicket</name> + <title>Duplicate Ticket</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/duplicateticket/onActionProcess.js</onActionProcess> + <selectionType>UNBOUND</selectionType> + <iconId>VAADIN:COPY</iconId> + </entityActionField> + <entityActionField> + <name>reopenTicket</name> + <title>Re-open</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/reopenticket/onActionProcess.js</onActionProcess> + <iconId>VAADIN:TIME_BACKWARD</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/reopenticket/stateProcess.js</stateProcess> + </entityActionField> + <entityActionField> + <name>resubmitTicket</name> + <title>Follow-Up</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/resubmitticket/onActionProcess.js</onActionProcess> + <selectionType>UNBOUND</selectionType> + <isSaveAction v="false" /> + <iconId>NEON:RECURRING_APPOINTMENT</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/resubmitticket/stateProcess.js</stateProcess> + </entityActionField> + <entityActionField> + <name>newTicket</name> + <title>Enter new Ticket</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newticket/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isObjectAction v="false" /> + <iconId>VAADIN:CHAT</iconId> + </entityActionField> + <entityActionField> + <name>newTicketContact</name> + <title>Enter new Ticket & Contact</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newticketcontact/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>VAADIN:CHAT</iconId> + </entityActionField> <entityActionField> <name>newLetter</name> <title>New letter</title> @@ -940,8 +931,16 @@ <iconId>VAADIN:ENVELOPE</iconId> <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/newletter/stateProcess.js</stateProcess> </entityActionField> + <entityActionField> + <name>openAdminView</name> + <title>Open admin view</title> + <onActionProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/openadminview/onActionProcess.js</onActionProcess> + <iconId>VAADIN:CURLY_BRACKETS</iconId> + <stateProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/openadminview/stateProcess.js</stateProcess> + </entityActionField> <entityField> - <name>EMAILMAILSIGNATURE_ANSWER</name> + <name>DATE_NEW</name> + <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/date_new/valueProcess.js</valueProcess> </entityField> </entityFields> <recordContainers> @@ -1176,6 +1175,10 @@ <name>EMAILMAILSIGNATURE_ANSWER.value</name> <recordfield>MAILSIGNATURE.ANSWER_MAIL_ADDRESS</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>TASK.DATE_NEW</recordfield> + </dbRecordFieldMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/SupportTicket_entity/contentDescriptionProcess.js b/entity/SupportTicket_entity/contentDescriptionProcess.js index 1f7017d97a63a7920c8af208b0940f731f99c3d1..b7c56c40086f4501fe27a729df1441449c186e65 100644 --- a/entity/SupportTicket_entity/contentDescriptionProcess.js +++ b/entity/SupportTicket_entity/contentDescriptionProcess.js @@ -12,7 +12,6 @@ if(vars.get("$field.TICKET_EDITOR_CONTACT_ID")) res = [translate.text("{$TICKET_EDITOR}") + ": " + vars.get("$field.TICKET_EDITOR_CONTACT_ID.displayValue")]; } res.push(translate.text("Maturity") + ": " + datetime.toDate(vars.get("$field.TASK_MATURITY_DATE"), translate.text("dd.MM.yyyy"))); -res.push(translate.text("Progress") + ": " + KeywordUtils.getViewValue($KeywordRegistry.taskProgress(), vars.get("$field.TASK_PROGRESS"))); res.push(translate.text("Creation date") + ": " + datetime.toDate(vars.get("$field.TASK_START_DATE"), translate.text("dd.MM.yyyy"))); result.string(res.join(" | ")); diff --git a/entity/SupportTicket_entity/entityfields/date_new/valueProcess.js b/entity/SupportTicket_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6835658dc430852893df25cf22145e1c6aae259e --- /dev/null +++ b/entity/SupportTicket_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if (vars.getString("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(vars.get("$sys.date")); +} \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/inboxes/children/excludedinboxes_param/valueProcess.js b/entity/SupportTicket_entity/entityfields/inboxes/children/excludedinboxes_param/valueProcess.js deleted file mode 100644 index 92147d3453d5ee06e7d309e10ce145653776797d..0000000000000000000000000000000000000000 --- a/entity/SupportTicket_entity/entityfields/inboxes/children/excludedinboxes_param/valueProcess.js +++ /dev/null @@ -1,7 +0,0 @@ -import("system.result"); -import("system.vars"); - -if(vars.exists("$param.InitialInboxId_param")) -{ - result.object([vars.get("$param.InitialInboxId_param")]); -} \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/keywordtaskstate/children/whitelistids_param/valueProcess.js b/entity/SupportTicket_entity/entityfields/keywordtaskstate/children/whitelistids_param/valueProcess.js index 33db9e5f8b0b112fd0d6c28ba63538f7821a7a35..c6ec8ba2a666a0a6e6d9d0743a607ca2c2bd25b3 100644 --- a/entity/SupportTicket_entity/entityfields/keywordtaskstate/children/whitelistids_param/valueProcess.js +++ b/entity/SupportTicket_entity/entityfields/keywordtaskstate/children/whitelistids_param/valueProcess.js @@ -1,5 +1,5 @@ -import("system.vars"); import("system.result"); import("Ticket_lib"); +import("KeywordRegistry_basic"); -result.object(TicketUtils.begin(vars.get("$field.TICKETTYPE")).getAvailableStatus()) \ No newline at end of file +result.object(TicketUtils.begin($KeywordRegistry.ticketType$supportTicket()).getAvailableStatus()); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/newtask/onActionProcess.js b/entity/SupportTicket_entity/entityfields/newtask/onActionProcess.js index be994af3d1ae682b70b4dacdd41dd60805761258..96b6c1edd7ea6029338d30b1191dbc8b7d950ef4 100644 --- a/entity/SupportTicket_entity/entityfields/newtask/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/newtask/onActionProcess.js @@ -2,4 +2,6 @@ import("system.vars"); import("ActivityTask_lib"); import("Context_lib"); -TaskUtils.createNewTask(undefined, undefined, ContextUtils.getCurrentContextId(), vars.get("$field.TICKETID")); \ No newline at end of file +var TicketLink = [ContextUtils.getCurrentContextId(),vars.get("$field.TICKETID")]; + +TaskUtils.createNewTask(vars.get("$field.TICKETID"),[TicketLink]); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/reopenticket/onActionProcess.js b/entity/SupportTicket_entity/entityfields/reopenticket/onActionProcess.js index 58807b50dc20764ac06abde46ef2c3e32a33518e..fe5cf5667d6d68f766d7d2de3cb97f8b70dfbf7b 100644 --- a/entity/SupportTicket_entity/entityfields/reopenticket/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/reopenticket/onActionProcess.js @@ -1,3 +1,4 @@ +import("Context_lib"); import("ActivityTask_lib"); import("system.translate"); import("KeywordRegistry_basic"); @@ -13,8 +14,8 @@ var TicketfieldValues = {}; var TaskfieldValues = {}; var obj_toolsUser = tools.getCurrentUser()[tools.PARAMS], - str_ticketId = vars.get( "$field.TICKETID"), - str_taskId = vars.get( "$field.TASK_ID"); + ticketID = vars.get( "$field.TICKETID"), + taskID = vars.get( "$field.TASK_ID"); // insert ACTIVITY @@ -22,24 +23,20 @@ var DataPreset = { "directionKeywordId" : $KeywordRegistry.activityDirection$internal(), "subject" : translate.text("Ticket reopen"), - "content" : translate.text("Ticket was reopen.") + "/n" - + translate.text("Reopen by") + ": "+ obj_toolsUser[tools.FIRSTNAME] +" " + "content" : translate.text("Ticket was reopen by") + ": "+ obj_toolsUser[tools.FIRSTNAME] +" " + obj_toolsUser[tools.LASTNAME], "categoryKeywordId" : $KeywordRegistry.activityCategory$sys() } - var ActivityLink = - { - "SupportTicket" : ticketID - } - - ActivityUtils.insertNewActivity(DataPreset, ActivityLink); + var ActivityLink = [ContextUtils.getCurrentContextId(), ticketID]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); //change Ticketstatus, editor & DATE_EDIT_STATUS TaskfieldValues["STATUS"] = $KeywordRegistry.taskStatus$reopen(); TicketfieldValues["DATE_EDIT_STATUS"] = vars.get("$sys.date"); -TicketfieldValues["DATE_END_"] = ""; +TicketfieldValues["DATE_END"] = ""; //Update task & Ticket -newWhereIfSet("TASK.TASKID", str_taskId).updateFields(TaskfieldValues); -newWhereIfSet("TICKET.TICKETID", vars.get("field.TICKETID")).updateFields(TicketfieldValues); +newWhereIfSet("TASK.TASKID", taskID).updateFields(TaskfieldValues); +newWhereIfSet("TICKET.TICKETID", ticketID).updateFields(TicketfieldValues); neon.refresh(); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js b/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js index 468a96ed35c76eff31308686e71be8ea50cfe9ca..1b8ba2a613f47f46625ccbadb58632dbb51d4f68 100644 --- a/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js +++ b/entity/SupportTicket_entity/entityfields/replyemail/onActionProcess.js @@ -6,8 +6,7 @@ import("Ticket_lib") var params = { - "SignatureId_param": vars.get("$field.MAILSIGNATURE_ID"), - "SenderEmail_param": vars.get("$field.SENDEREMAIL"), + "SignatureId_param": vars.get("$field.MAILSIGNATURE_ID"), "RequestorContactId_param": vars.get("$field.TASK_REQUESTOR_CONTACT_ID"), "TicketCode_param": vars.get("$field.CODE"), "TicketSubject_param": vars.get("$field.TASK_SUBJECT"), @@ -29,5 +28,15 @@ else { params["From_param"] = vars.get("$field.EMAILMAILSIGNATURE"); } - + +// if alternative email address is set use it +if (vars.get("$field.ALTERNATIVE_EMAILADDR")) +{ + params["SenderEmail_param"] = vars.get("$field.ALTERNATIVE_EMAILADDR"); +} +else +{ + params["SenderEmail_param"] = vars.get("$field.SENDEREMAIL"); +} + neon.openContext("ServiceEmail", "ServiceEmailEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/returnticket/stateProcess.js b/entity/SupportTicket_entity/entityfields/returnticket/stateProcess.js index dfde7549fffe1602ce975d6b0cdd6fef262ced37..17de559118b4e70dc5114c02057c01c48e12770d 100644 --- a/entity/SupportTicket_entity/entityfields/returnticket/stateProcess.js +++ b/entity/SupportTicket_entity/entityfields/returnticket/stateProcess.js @@ -4,11 +4,11 @@ import("system.vars"); import("KeywordRegistry_basic"); -if(vars.get ("$field.TASK_STATUS") != $KeywordRegistry.taskStatus$ended()) +if(vars.get ("$field.TASK_STATUS") == $KeywordRegistry.taskStatus$ended()) { - result.string(neon.COMPONENTSTATE_EDITABLE); + result.string(neon.COMPONENTSTATE_DISABLED); } else { - result.string(neon.COMPONENTSTATE_READONLY); + result.string(neon.COMPONENTSTATE_EDITABLE); } \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/supportticket_template/onValueChange.js b/entity/SupportTicket_entity/entityfields/supportticket_template/onValueChange.js index 0bfa5683866c31a427b31d11bb6ccee317a0dec7..df8422d97e2be3a7d52d495b900803ea7f238e1d 100644 --- a/entity/SupportTicket_entity/entityfields/supportticket_template/onValueChange.js +++ b/entity/SupportTicket_entity/entityfields/supportticket_template/onValueChange.js @@ -38,12 +38,16 @@ function _setTicketData( pStr_ticketTemplateId) obj_fieldMap["$field.ticket_title"] = str_currentVal; break; case "DESCRIPTION": + obj_fieldMap["$field.TASK_DESCRIPTION"] = str_currentVal; + break; case "PRIORITY": + obj_fieldMap["$field.TASK_PRIORITY"] = str_currentVal; + break; case "STATUS": - obj_fieldMap["$field.TASK_"+ str_col] = str_currentVal; + obj_fieldMap["$field.TASK_STATUS"] = str_currentVal; break; case "CATEGORY": - obj_fieldMap["$field.TICKET"+ str_col] = str_currentVal; + obj_fieldMap["$field.TICKETCATEGORY"] = str_currentVal; break; default: obj_fieldMap["$field."+ str_col] = str_currentVal; diff --git a/entity/SupportTicket_entity/entityfields/ticketsprovider/documentation.adoc b/entity/SupportTicket_entity/entityfields/supporttickets/documentation.adoc similarity index 100% rename from entity/SupportTicket_entity/entityfields/ticketsprovider/documentation.adoc rename to entity/SupportTicket_entity/entityfields/supporttickets/documentation.adoc diff --git a/entity/SupportTicket_entity/entityfields/task_priority_icon/colorProcess.js b/entity/SupportTicket_entity/entityfields/task_priority_icon/colorProcess.js index 8ae23d7885712c2c8f3a094df18fb69b2cfe574b..e784400a7d15d7e863a776e3904c51df6d506e5a 100644 --- a/entity/SupportTicket_entity/entityfields/task_priority_icon/colorProcess.js +++ b/entity/SupportTicket_entity/entityfields/task_priority_icon/colorProcess.js @@ -3,22 +3,29 @@ import("KeywordRegistry_basic"); import("system.result"); import("system.neon"); - -switch(vars.getString("$field.TASK_PRIORITY")) +if(vars.get("$field.TASK_PRIORITY")) +{ + switch(vars.get("$field.TASK_PRIORITY")) + { + case $KeywordRegistry.taskPriority$none(): + result.string(neon.PRIORITY_NONE_COLOR); + break; + case $KeywordRegistry.taskPriority$low(): + result.string(neon.PRIORITY_LOW_COLOR); + break; + case $KeywordRegistry.taskPriority$medium(): + result.string(neon.PRIORITY_MEDIUM_COLOR); + break; + case $KeywordRegistry.taskPriority$high(): + result.string(neon.PRIORITY_HIGH_COLOR); + break; + default: + result.string(neon.PRIORITY_NONE_COLOR); + break; + } +} +else { - case $KeywordRegistry.taskPriority$none(): - result.string(neon.PRIORITY_NONE_COLOR); - break; - case $KeywordRegistry.taskPriority$low(): - result.string(neon.PRIORITY_LOW_COLOR); - break; - case $KeywordRegistry.taskPriority$medium(): - result.string(neon.PRIORITY_MEDIUM_COLOR); - break; - case $KeywordRegistry.taskPriority$high(): - result.string(neon.PRIORITY_HIGH_COLOR); - break; - default: - result.string(neon.PRIORITY_NONE_COLOR); - break; -} + result.string(neon.PRIORITY_NONE_COLOR); +} + diff --git a/entity/SupportTicket_entity/recordcontainers/db/onDBInsert.js b/entity/SupportTicket_entity/recordcontainers/db/onDBInsert.js index b0e2ba2318e43059a467e4ccc505c9f0d5645a34..bbefca4cd2eb1a7bbe1447d55bfd7a7dd19f7650 100644 --- a/entity/SupportTicket_entity/recordcontainers/db/onDBInsert.js +++ b/entity/SupportTicket_entity/recordcontainers/db/onDBInsert.js @@ -1,3 +1,4 @@ +import("Context_lib"); import("Sql_lib"); import("system.translate"); import("system.util"); @@ -62,12 +63,9 @@ if( actionName == "duplicateTicket") + translate.text("Ticket number of the original ticket") + ': ' + codeold, "categoryKeywordId" : $KeywordRegistry.activityCategory$sys() } - var ActivityLink = - { - "SupportTicket" : ticketID - } - - ActivityUtils.insertNewActivity(DataPreset, ActivityLink); + var ActivityLink = [ContextUtils.getCurrentContextId(), ticketID]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); ///CREATE ACTIVITY for old Ticket DataPreset = @@ -79,12 +77,9 @@ if( actionName == "duplicateTicket") + translate.text("Ticket number of the created ticket") + ': ' + code, "categoryKeywordId" : $KeywordRegistry.activityCategory$sys() } - ActivityLink = - { - "SupportTicket" : ticketIDold - } - - ActivityUtils.insertNewActivity(DataPreset, ActivityLink); + var ActivityLink = [ContextUtils.getCurrentContextId(), ticketIDold]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); // end ACTIVITY } diff --git a/entity/SupportTicket_entity/recordcontainers/db/onDBUpdate.js b/entity/SupportTicket_entity/recordcontainers/db/onDBUpdate.js index 619577da197540f995cccb42345dff94ee24f4e9..b80e95042cc1410c3b480ff3f4873c8355191fbb 100644 --- a/entity/SupportTicket_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/SupportTicket_entity/recordcontainers/db/onDBUpdate.js @@ -68,12 +68,9 @@ if( vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + datetime.toDate(vars.get("$field.TASK_MATURITY_DATE"), "dd.MM.yyyy"), "categoryKeywordId" : $KeywordRegistry.activityCategory$sys() } - var ActivityLink = - { - "SupportTicket" : ticketID - } - - ActivityUtils.insertNewActivity(DataPreset, ActivityLink); + var ActivityLink = [ContextUtils.getCurrentContextId(), ticketID]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); // end ACTIVITY } @@ -91,19 +88,16 @@ if( vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) +"\n"+ translate.text("Returned by") + ": "+ obj_toolsUser[tools.FIRSTNAME] +" "+ obj_toolsUser[tools.LASTNAME], "categoryKeywordId" : $KeywordRegistry.activityCategory$sys() } - ActivityLink = - { - "SupportTicket" : ticketID - } - - ActivityUtils.insertNewActivity(DataPreset, ActivityLink); + var ActivityLink = [ContextUtils.getCurrentContextId(), ticketID]; + + ActivityUtils.insertNewActivity(DataPreset, [ActivityLink]); //change Ticketstatus, editor & DATE_EDIT_STATUS TaskfieldValues["STATUS"] = $KeywordRegistry.taskStatus$unassigned(); TicketfieldValues["EDITOR_CONTACT_ID"] = ""; TicketfieldValues["DATE_EDIT_STATUS"] = vars.get("$sys.date"); TicketfieldValues["INBOX_ID"] = vars.get("$field.INBOX_ID"); - TicketfieldValues["CATEGORY"] = vars.get("$field.INBOX_ID"); + TicketfieldValues["CATEGORY"] = vars.get("$field.TICKETCATEGORY"); } newWhere("TICKET.TICKETID","$field.TICKETID").updateFields(TicketfieldValues); newWhere("TASK.TASKID", "$field.TASK_ID").updateFields(TaskfieldValues); diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 837b56aa6696c5c7482a8b2667e9a913705c6df2..89355045b13d089a1be2c3b5124b426beba37cac 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -10784,6 +10784,39 @@ <entry> <key>Answer Address</key> </entry> + <entry> + <key>Employee for Employee groups</key> + </entry> + <entry> + <key>Employee group already selected.</key> + </entry> + <entry> + <key>Employee already selected.</key> + </entry> + <entry> + <key>Name has to be unique.</key> + </entry> + <entry> + <key>Ticket returned</key> + </entry> + <entry> + <key>Returned by</key> + </entry> + <entry> + <key>Ticket returned to pool</key> + </entry> + <entry> + <key>Original editor</key> + </entry> + <entry> + <key>Ticket was reopen by</key> + </entry> + <entry> + <key>Ticket reopen</key> + </entry> + <entry> + <key>Email address has to be unique.</key> + </entry> <entry> <key>Synchronized with Outlook</key> </entry> @@ -10799,9 +10832,6 @@ <entry> <key>Search synchronisations</key> </entry> - <entry> - <key>Calling the abbyy webservice failed</key> - </entry> <entry> <key>Remove synchronization</key> </entry> @@ -10826,18 +10856,12 @@ <entry> <key>Shows all synchronized contacts</key> </entry> - <entry> - <key>within one Month</key> - </entry> <entry> <key>Last process start: synchronize to Outlook</key> </entry> <entry> <key>Show filter in contacts</key> </entry> - <entry> - <key>Valuation</key> - </entry> <entry> <key>Search synchronisation</key> </entry> @@ -10908,25 +10932,76 @@ <key>Contigent exhausted, please buy some new one to continue.</key> </entry> <entry> - <key>Fullfilled</key> + <key>All synchronized datasets</key> </entry> <entry> - <key>Calling the abbyy webservice failed</key> + <key>Pending datasets</key> </entry> <entry> - <key>Checklists</key> + <key>Email address has to be unique</key> </entry> <entry> - <key>within one Month</key> + <key>My synchronized datasets</key> </entry> <entry> - <key>Valuation</key> + <key>Do you really want to resynchronize the user completely?\nThe synchronisation in ADITO will be deleted.\nThe outlook contacts must be cleared manually.</key> </entry> <entry> - <key>A Phase filter has to be set when creating a checklistentry for the Salesproject context.</key> + <key>Shows my synchronized datasets</key> </entry> <entry> - <key>Volume Weighted(€)</key> + <key>Rulegroup already selected</key> + </entry> + <entry> + <key>Shows all synchronized datasets</key> + </entry> + <entry> + <key>Shows the number of datasets still to be synchronized</key> + </entry> + <entry> + <key>Contact synchronisation</key> + </entry> + <entry> + <key>Datasets in Outlook</key> + </entry> + <entry> + <key>Employee already selected</key> + </entry> + <entry> + <key>Contact synchronisations</key> + </entry> + <entry> + <key>Dataset in Outlook</key> + </entry> + <entry> + <key>Remove from synchronization</key> + </entry> + <entry> + <key>Contact synchronisation dashboard</key> + </entry> + <entry> + <key>Name has to be unique</key> + </entry> + <entry> + <key>Show filter result</key> + </entry> + <entry> + <key>Add to synchronisation</key> + </entry> + <entry> + <key>Sales project responsibility set</key> + </entry> + <entry> + <key>Do you really want to delete \"%0\"? If tickets still use this inbox, this might cause problems.</key> + </entry> + <entry> + <key>Delete Inbox</key> + </entry> + <entry> + <key>Finished Tickets last 4 weeks</key> + </entry> + <entry> + <key>Inbox \"%0\" has been deleted.</key> </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 7d67a5cab7f0ec222d3e4ba870b83a086864a1dc..7334db9832223bf1ce445304804324c43fcd63db 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -6,6 +6,9 @@ <country></country> <variant></variant> <keyValueMap> + <entry> + <key>Ticket was reopen by</key> + </entry> <entry> <key>Create new campaign step</key> <value>Neue Kampagnenstufe erstellen</value> @@ -22,6 +25,9 @@ <key>Single (Service/Internal)</key> <value>Einzel (Service/Intern)</value> </entry> + <entry> + <key>Original editor</key> + </entry> <entry> <key>Single (Service/External)</key> <value>Einzel (Service/Extern)</value> @@ -34,6 +40,10 @@ <key>Ticket was duplicated by</key> <value>Ticket wurde dupliziert. Anwender</value> </entry> + <entry> + <key>Do you really want to delete \"%0\"? If tickets still use this inbox, this might cause problems.</key> + <value>Postkorb \"%0\" wirklich löschen? Wenn noch Tickets mit diesem Postkorb existieren, kann das zu Problemen führen.</value> + </entry> <entry> <key>Ticket duplicated (duplicate)</key> <value>Ticket dupliziert (Duplikat)</value> @@ -90,6 +100,10 @@ <key>Return Ticket</key> <value>Zurückgeben</value> </entry> + <entry> + <key>Employee already selected</key> + <value>Mitarbeiter bereits selektiert</value> + </entry> <entry> <key>Service ticket template</key> <value>Serviceticket-Vorlagen</value> @@ -1028,6 +1042,10 @@ <key>Object selection</key> <value>Objektauswahl</value> </entry> + <entry> + <key>Delete Inbox</key> + <value>Postkorb löschen</value> + </entry> <entry> <key>All of the chosen records are already in the campaign</key> <value>Alle ausgewählten Datensätze sind schon in der Kampagne.</value> @@ -1755,6 +1773,10 @@ <key>Phone</key> <value>Telefon</value> </entry> + <entry> + <key>Name has to be unique</key> + <value>Name muss einzigartig sein</value> + </entry> <entry> <key>360 Degree</key> <value>360 Grad</value> @@ -3337,6 +3359,9 @@ <key>Comoros</key> <value>Komoren</value> </entry> + <entry> + <key>Employee for Employee groups</key> + </entry> <entry> <key>Office Properties</key> <value>Büroimmobilien</value> @@ -4151,7 +4176,7 @@ </entry> <entry> <key>Email address</key> - <value>E-Mail Adresse</value> + <value>E-Mail-Adresse</value> </entry> <entry> <key>Australia</key> @@ -4505,6 +4530,10 @@ <key>Show all Favorites</key> <value>Alle Favoriten anzeigen</value> </entry> + <entry> + <key>Inbox \"%0\" has been deleted.</key> + <value>Postkorb \"%0\ wurde gelöscht.</value> + </entry> <entry> <key>Venezuela (Bolivarian Republic of)</key> <value>Venezuela (Bolivarische Republik)</value> @@ -4757,6 +4786,10 @@ <key>NQC</key> <value>NQC</value> </entry> + <entry> + <key>Email address has to be unique</key> + <value>E-Mail-Addresse muss einzigartig sein</value> + </entry> <entry> <key>MQL</key> <value>MQL</value> @@ -4837,6 +4870,10 @@ <key>String value</key> <value>String-Wert</value> </entry> + <entry> + <key>Rulegroup already selected</key> + <value>Filtergruppe bereits selektiert.</value> + </entry> <entry> <key>The code number is not a valid number.</key> <value>Die Kennnummer ist keine gültige Nummer</value> @@ -4885,6 +4922,10 @@ <key>Relationtype</key> <value>Beziehungsart</value> </entry> + <entry> + <key>Employee group already selected</key> + <value>Mitarbeitergruppe wurde bereits selektiert.</value> + </entry> <entry> <key>Tree</key> <value>Baum</value> @@ -7971,7 +8012,7 @@ </entry> <entry> <key>Email address does not exist</key> - <value>E-Mail Adresse existiert nicht</value> + <value>E-Mail-Adresse existiert nicht</value> </entry> <entry> <key>Receipt Header Text</key> @@ -9102,6 +9143,9 @@ Bitte Datumseingabe prüfen</value> <key>My Workflow Tasks</key> <value>Meine Workflow Aufgaben</value> </entry> + <entry> + <key>Returned by</key> + </entry> <entry> <key>My workflow tasks</key> <value>Meine Workflow Aufgaben</value> @@ -13136,6 +13180,9 @@ Bitte Datumseingabe prüfen</value> <entry> <key>KeywordTest4</key> </entry> + <entry> + <key>Ticket reopen</key> + </entry> <entry> <key>KeywordTest5</key> </entry> @@ -13159,6 +13206,9 @@ Bitte Datumseingabe prüfen</value> <key>%0 companies were newley assigned. \n%1 companies are no longer assigned (these assignments got the status 'review'). \n%2 valid assignments were unchanged.\nThe Process took %3 seconds.</key> <value>%0 Firmen wurden neu zugewiesen. \n%1 Firmen sind nicht länger zugewiesen (diese Zuweisungen haben den Status 'in Prüfung' erhalten). \n%2 gültige Zuweisungen blieben unverändert.\nDer Prozess brauchte %3 seconds.</value> </entry> + <entry> + <key>Ticket returned to pool</key> + </entry> <entry> <key>Contigent exhausted, please buy some new one to continue</key> </entry> @@ -14092,6 +14142,7 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>Save changes</key> + <value>Änderungen speichern</value> </entry> <entry> <key>Individual Reply Template</key> @@ -14134,7 +14185,7 @@ Bitte Datumseingabe prüfen</value> <key>getTicketDetails</key> </entry> <entry> - <key>Ticket return</key> + <key>Ticket returned</key> </entry> <entry> <key>Ticket filter</key> @@ -14286,6 +14337,9 @@ Bitte Datumseingabe prüfen</value> <entry> <key>We save your data until</key> </entry> + <entry> + <key>Ticket return</key> + </entry> <entry> <key>Remove synchronization</key> </entry> @@ -14311,37 +14365,19 @@ Bitte Datumseingabe prüfen</value> <key>Shows my synchronized contacts</key> </entry> <entry> - <key>Weighted(€)</key> - </entry> - <entry> - <key>Ticket returned</key> - </entry> - <entry> - <key>Returned by</key> - </entry> - <entry> - <key>Ticket was reopen by</key> - </entry> - <entry> - <key>Employee group already selected.</key> - </entry> - <entry> - <key>Ticket returned to pool</key> + <key>Email address has to be unique.</key> </entry> <entry> <key>Employee already selected.</key> </entry> <entry> - <key>Original editor</key> + <key>Open new mosaico template</key> </entry> <entry> <key>Name has to be unique.</key> </entry> <entry> - <key>Ticket reopen</key> - </entry> - <entry> - <key>Employee for Employee groups</key> + <key>Do you really want to resynchronize the user completely?\nThe data in ADITO will be deleted.\nThe outlook contacts must be cleared manually.</key> </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index ffbb7ff571eb014169e08f655ebc9f7248d94226..c0e0fffdb529de4b8afcb3b5e95ce633e8a203b6 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -10874,6 +10874,39 @@ <entry> <key>Answer Address</key> </entry> + <entry> + <key>Employee for Employee groups</key> + </entry> + <entry> + <key>Employee group already selected.</key> + </entry> + <entry> + <key>Employee already selected.</key> + </entry> + <entry> + <key>Name has to be unique.</key> + </entry> + <entry> + <key>Ticket returned</key> + </entry> + <entry> + <key>Returned by</key> + </entry> + <entry> + <key>Ticket returned to pool</key> + </entry> + <entry> + <key>Original editor</key> + </entry> + <entry> + <key>Ticket was reopen by</key> + </entry> + <entry> + <key>Ticket reopen</key> + </entry> + <entry> + <key>Email address has to be unique.</key> + </entry> <entry> <key>Open new mosaico template</key> </entry> @@ -10916,9 +10949,6 @@ <entry> <key>Search synchronisations</key> </entry> - <entry> - <key>Calling the abbyy webservice failed</key> - </entry> <entry> <key>Remove synchronization</key> </entry> @@ -10992,19 +11022,76 @@ <key>Synced searches</key> </entry> <entry> - <key>Fullfilled</key> + <key>All synchronized datasets</key> </entry> <entry> - <key>Calling the abbyy webservice failed</key> + <key>Pending datasets</key> </entry> <entry> - <key>Checklists</key> + <key>Email address has to be unique</key> </entry> <entry> - <key>A Phase filter has to be set when creating a checklistentry for the Salesproject context.</key> + <key>My synchronized datasets</key> </entry> <entry> - <key>Volume Weighted(€)</key> + <key>Do you really want to resynchronize the user completely?\nThe synchronisation in ADITO will be deleted.\nThe outlook contacts must be cleared manually.</key> + </entry> + <entry> + <key>Shows my synchronized datasets</key> + </entry> + <entry> + <key>Rulegroup already selected</key> + </entry> + <entry> + <key>Shows all synchronized datasets</key> + </entry> + <entry> + <key>Shows the number of datasets still to be synchronized</key> + </entry> + <entry> + <key>Contact synchronisation</key> + </entry> + <entry> + <key>Datasets in Outlook</key> + </entry> + <entry> + <key>Employee already selected</key> + </entry> + <entry> + <key>Contact synchronisations</key> + </entry> + <entry> + <key>Dataset in Outlook</key> + </entry> + <entry> + <key>Remove from synchronization</key> + </entry> + <entry> + <key>Contact synchronisation dashboard</key> + </entry> + <entry> + <key>Name has to be unique</key> + </entry> + <entry> + <key>Show filter result</key> + </entry> + <entry> + <key>Add to synchronisation</key> + </entry> + <entry> + <key>Sales project responsibility set</key> + </entry> + <entry> + <key>Do you really want to delete \"%0\"? If tickets still use this inbox, this might cause problems.</key> + </entry> + <entry> + <key>Delete Inbox</key> + </entry> + <entry> + <key>Finished Tickets last 4 weeks</key> + </entry> + <entry> + <key>Inbox \"%0\" has been deleted.</key> </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> diff --git a/neonContext/SupportTicket/SupportTicket.aod b/neonContext/SupportTicket/SupportTicket.aod index f3e1f36d9313f8facdabf966730e8fb9b7119233..8146a7dda5d33c21b2e8745152f143fea7535e33 100644 --- a/neonContext/SupportTicket/SupportTicket.aod +++ b/neonContext/SupportTicket/SupportTicket.aod @@ -60,7 +60,6 @@ </neonViewReference> <neonViewReference> <name>fc7b698f-ded0-49f8-b5e3-7f7b0c63ea93</name> - <view>SupportTicketEditQuickEntry_view</view> </neonViewReference> <neonViewReference> <name>f70692c0-7ea0-423b-9d65-f47ea0e093f5</name> @@ -95,6 +94,9 @@ </neonViewReference> <neonViewReference> <name>3bcf18a8-1f3c-4841-ad31-01867b17d187</name> + </neonViewReference> + <neonViewReference> + <name>b3c473d4-20f1-4e4c-b026-3e7abf4c6199</name> <view>SupportTicketMultiEdit_view</view> </neonViewReference> </references> diff --git a/neonDashboard/Service/Service.aod b/neonDashboard/Service/Service.aod index bc8d08ea8f092bd3adf738f26afce47a44cecdff..e04750eb2fefb2ba2020e124a44e97e5273abe76 100644 --- a/neonDashboard/Service/Service.aod +++ b/neonDashboard/Service/Service.aod @@ -25,12 +25,6 @@ <colspan v="1" /> <rowspan v="4" /> </uiConfiguration> - <parameters> - <neonDashletParameter> - <name>BasedOnRoles_param</name> - <value>true</value> - </neonDashletParameter> - </parameters> </neonDashlet> <neonDashlet> <name>Dashlet3</name> @@ -67,12 +61,6 @@ <colspan v="3" /> <rowspan v="4" /> </uiConfiguration> - <parameters> - <neonDashletParameter> - <name>BasedOnRoles_param</name> - <value>true</value> - </neonDashletParameter> - </parameters> </neonDashlet> <neonDashlet> <name>Dashlet6</name> @@ -85,12 +73,6 @@ <colspan v="3" /> <rowspan v="4" /> </uiConfiguration> - <parameters> - <neonDashletParameter> - <name>BasedOnRoles_param</name> - <value>true</value> - </neonDashletParameter> - </parameters> </neonDashlet> </defaultDashlets> </neonDashboard> diff --git a/neonView/DocumentTemplateEdit_view/DocumentTemplateEdit_view.aod b/neonView/DocumentTemplateEdit_view/DocumentTemplateEdit_view.aod index e8fa1aac44a68bdec6c873b71a6ca6b1e221d568..be218839b16e9580285be895409ed28ac4b9ce06 100644 --- a/neonView/DocumentTemplateEdit_view/DocumentTemplateEdit_view.aod +++ b/neonView/DocumentTemplateEdit_view/DocumentTemplateEdit_view.aod @@ -124,5 +124,10 @@ </entityFieldLink> </fields> </genericViewTemplate> + <neonViewReference> + <name>b98604e3-4b54-4cb2-8231-4668cf4cf3dd</name> + <entityField>DocumentTemplatePlaceOfUse</entityField> + <view>DocumentTemplatePlaceOfUseMultiEdit_view</view> + </neonViewReference> </children> </neonView> diff --git a/neonView/InboxEdit_view/InboxEdit_view.aod b/neonView/InboxEdit_view/InboxEdit_view.aod index 3dce41fc57d0757e7ab1ab86fc12bfb77f7a40db..5623b8664f1f313311b2d9afc3f8dbc1933cfa8d 100644 --- a/neonView/InboxEdit_view/InboxEdit_view.aod +++ b/neonView/InboxEdit_view/InboxEdit_view.aod @@ -40,10 +40,6 @@ <name>c6a43bc9-666b-4395-942b-0e5aeecfed89</name> <entityField>REOPENDELAY</entityField> </entityFieldLink> - <entityFieldLink> - <name>8dea443c-d327-484f-8a2b-0f1e2765105e</name> - <entityField>CLOSURE_DAYS</entityField> - </entityFieldLink> </fields> </genericViewTemplate> </children> diff --git a/neonView/InboxFilter_view/InboxFilter_view.aod b/neonView/InboxFilter_view/InboxFilter_view.aod index 401566d988a01a8255b1493cc54218c50102e86b..79c992653619e285899aed81ed66f754c4acbe02 100644 --- a/neonView/InboxFilter_view/InboxFilter_view.aod +++ b/neonView/InboxFilter_view/InboxFilter_view.aod @@ -34,6 +34,7 @@ <tableViewTemplate> <name>Table</name> <entityField>#ENTITY</entityField> + <favoriteActionGroup1>deleteActionGroup</favoriteActionGroup1> <columns> <neonTableColumn> <name>bcdbaede-e2df-4351-9df2-fd2cd30cfd8e</name> @@ -51,10 +52,6 @@ <name>f1378d7e-9187-4a52-8e73-64fa6d3047ca</name> <entityField>REOPENDELAY</entityField> </neonTableColumn> - <neonTableColumn> - <name>2fc3d43b-84a1-43c4-926b-b8c8951d5349</name> - <entityField>CLOSURE_DAYS</entityField> - </neonTableColumn> <neonTableColumn> <name>f7369cab-4379-4c23-96f0-2ec944896c5e</name> <entityField>STATUS</entityField> diff --git a/neonView/InboxPreview_view/InboxPreview_view.aod b/neonView/InboxPreview_view/InboxPreview_view.aod index d52c0e4d31dfbd4424ef1daff54f9dcdfcfb1a67..967049aa83399a3bafef0ebd68d708e86dff84ca 100644 --- a/neonView/InboxPreview_view/InboxPreview_view.aod +++ b/neonView/InboxPreview_view/InboxPreview_view.aod @@ -47,10 +47,6 @@ <name>afabc1a1-df95-441b-9afa-fe49c61a91f6</name> <entityField>ReopenDelayPreview</entityField> </entityFieldLink> - <entityFieldLink> - <name>2d4bad74-461a-4890-9bd8-f47b9fc1d705</name> - <entityField>Closure_daysPreview</entityField> - </entityFieldLink> </fields> </genericViewTemplate> </children> diff --git a/neonView/PersonEditServiceTicket_View/PersonEditServiceTicket_View.aod b/neonView/PersonEditServiceTicket_View/PersonEditServiceTicket_View.aod index 0ae9e8fad3bae097887df5d2bb364da3d0bccdef..6a4016ee43e0333bc490dbb74dc4a47bae9722f1 100644 --- a/neonView/PersonEditServiceTicket_View/PersonEditServiceTicket_View.aod +++ b/neonView/PersonEditServiceTicket_View/PersonEditServiceTicket_View.aod @@ -92,7 +92,7 @@ <neonViewReference> <name>dff4c15b-27f6-4c54-921a-d7bb8498a08f</name> <entityField>Serviceticket</entityField> - <view>SupportTicketEditQuickEntry_view</view> + <view>SupportTicketMultiEdit_view</view> </neonViewReference> </children> </neonView> diff --git a/neonView/SupportTicketEditQuickEntry_view/SupportTicketEditQuickEntry_view.aod b/neonView/SupportTicketEditQuickEntry_view/SupportTicketEditQuickEntry_view.aod deleted file mode 100644 index 2d2ee694f0f8f3d9a9d82592102c2ae518c834a6..0000000000000000000000000000000000000000 --- a/neonView/SupportTicketEditQuickEntry_view/SupportTicketEditQuickEntry_view.aod +++ /dev/null @@ -1,73 +0,0 @@ -<?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.8" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.8"> - <name>SupportTicketEditQuickEntry_view</name> - <title>Service ticket</title> - <majorModelMode>DISTRIBUTED</majorModelMode> - <icon>VAADIN:TICKET</icon> - <layout> - <boxLayout> - <name>layout</name> - <autoHeight v="true" /> - </boxLayout> - </layout> - <children> - <genericViewTemplate> - <name>SupportTicketGeneric</name> - <editMode v="true" /> - <showDrawer v="true" /> - <drawerCaption>Service ticket</drawerCaption> - <fixedDrawer v="true" /> - <hideEmptyFields v="false" /> - <fields> - <entityFieldLink> - <name>50583440-b40f-4d6e-a775-5541c94be5d5</name> - <entityField>ALTERNATIVE_EMAILADDR</entityField> - </entityFieldLink> - <entityFieldLink> - <name>d51b05bd-5f2e-4959-b9f3-5d9706585a51</name> - <entityField>ALTERNATIVE_PHONEADDR</entityField> - </entityFieldLink> - <entityFieldLink> - <name>d10b9c94-d222-417c-91a5-3f3e50dfe80e</name> - <entityField>SupportTicket_template</entityField> - </entityFieldLink> - <entityFieldLink> - <name>33027237-1177-4f8b-abe6-ea3d9d036077</name> - <entityField>INBOX_ID</entityField> - </entityFieldLink> - <entityFieldLink> - <name>ebce5913-6628-4a08-afb0-caea5d7c274f</name> - <entityField>TICKETCATEGORY</entityField> - </entityFieldLink> - <entityFieldLink> - <name>19d6d30f-4d11-490a-94f6-b930b3b0d6e9</name> - <entityField>TASK_SUBJECT</entityField> - </entityFieldLink> - <entityFieldLink> - <name>1a7438bf-7690-470b-a69b-ca119ac64b59</name> - <entityField>TASK_DESCRIPTION</entityField> - </entityFieldLink> - <entityFieldLink> - <name>db509854-3041-4d77-9ec2-651842d1a9f1</name> - <entityField>TASK_MATURITY_DATE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>3784edd5-03b8-47aa-a31f-ee95ef55d033</name> - <entityField>TASK_STATUS</entityField> - </entityFieldLink> - <entityFieldLink> - <name>c52866d5-f6e6-42b9-9cdd-4eeb970fab18</name> - <entityField>TICKET_EDITOR_CONTACT_ID</entityField> - </entityFieldLink> - <entityFieldLink> - <name>15311428-d390-436c-8c44-92102ffa0431</name> - <entityField>TASK_PRIORITY</entityField> - </entityFieldLink> - <entityFieldLink> - <name>9debbeab-8a99-46fe-a736-b7074acc9e3a</name> - <entityField>MEDIUM</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> - </children> -</neonView> diff --git a/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod b/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod index ce7e05c377004a8736ec1c6a45f2257fba71fb81..ab371d63c5e2f39a307788f0eb9904435a1bce72 100644 --- a/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod +++ b/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod @@ -55,6 +55,7 @@ <descriptionField>TASK_REQUESTOR_CONTACT_ID</descriptionField> <entityField>#ENTITY</entityField> <favoriteActionGroup1>FilterActionsGroup</favoriteActionGroup1> + <favoriteActionGroup2>observeActionGroup</favoriteActionGroup2> <linkedColumns> <element>TASK_SUBJECT</element> </linkedColumns> @@ -125,12 +126,14 @@ <additionalInfoField>CODE</additionalInfoField> <orderByDate v="true" /> <entityField>#ENTITY</entityField> - <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> + <favoriteActionGroup1>FilterActionsGroup</favoriteActionGroup1> + <favoriteActionGroup2>observeActionGroup</favoriteActionGroup2> </timelineViewTemplate> <treeTableViewTemplate> <name>Treetable</name> <entityField>#ENTITY</entityField> - <favoriteActionGroup1>observeActionGroup</favoriteActionGroup1> + <favoriteActionGroup1>FilterActionsGroup</favoriteActionGroup1> + <favoriteActionGroup2>observeActionGroup</favoriteActionGroup2> <linkedColumns> <element>TASK_SUBJECT</element> </linkedColumns> diff --git a/neonView/SupportTicketMultiSelectEdit_view/SupportTicketMultiSelectEdit_view.aod b/neonView/SupportTicketMultiSelectEdit_view/SupportTicketMultiSelectEdit_view.aod index adc58ed6e5d95ad62cb45fc90842441aff4a356d..e9a9765dfaf1def090765e65fba9c87c4d088f27 100644 --- a/neonView/SupportTicketMultiSelectEdit_view/SupportTicketMultiSelectEdit_view.aod +++ b/neonView/SupportTicketMultiSelectEdit_view/SupportTicketMultiSelectEdit_view.aod @@ -18,6 +18,10 @@ <name>361b2337-0c41-4b0b-b156-c1f7ffeaaa79</name> <entityField>STATUS</entityField> </entityFieldLink> + <entityFieldLink> + <name>d2e6adfd-6c7d-4fdd-9fba-14574d6a6934</name> + <entityField>CONCLUSION</entityField> + </entityFieldLink> <entityFieldLink> <name>df94341d-8c4d-4de6-9681-cc5983eacf35</name> <entityField>CATEGORY</entityField> diff --git a/process/TicketTemplate_lib/process.js b/process/TicketTemplate_lib/process.js index 0555f45acc7bc2d9405d7879fa83045702e03ca0..6d1a536b747424c28057da93fe0ab89da967a54e 100644 --- a/process/TicketTemplate_lib/process.js +++ b/process/TicketTemplate_lib/process.js @@ -114,7 +114,7 @@ TicketTemplateUtils.checkIndividualAnswer = function (pTemplateId) var sql = newSelect("DOCUMENTTEMPLATE.TEMPLATECONTENT") .from("TICKETTEMPLATE") .join("DOCUMENTTEMPLATE","TICKETTEMPLATE.DOCUMENTTEMPLATE_ID = DOCUMENTTEMPLATE.DOCUMENTTEMPLATEID") - .whereIfset("TICKETTEMPLATE.TICKETTEMPLATEID",pTemplateId) + .whereIfSet("TICKETTEMPLATE.TICKETTEMPLATEID",pTemplateId) .cell() return sql; } \ No newline at end of file diff --git a/process/mailbridge_service/process.js b/process/mailbridge_service/process.js index 28c37df7476c35dfedcc1af130e0cb0f0bd8e56a..8fb7bd912497800f9542370491a59c0b8eef62ec 100644 --- a/process/mailbridge_service/process.js +++ b/process/mailbridge_service/process.js @@ -60,7 +60,7 @@ ticketMailbridgeUtils.getInboxInformation = function(pRecipients, pSender, possi .select(["INBOX.INBOXID","INBOX.REOPEN_DELAY", "INBOX.EMAIL_ADDRESS"]) .from("INBOX") .leftJoin("MAILSIGNATURE", "INBOX.INBOXID = MAILSIGNATURE.INBOX_ID") - .whereIfSet("EMAIL_ADDRESS", pRecipients, SqlBuilder.IN()) + .whereIfSet("INBOX.EMAIL_ADDRESS", pRecipients, SqlBuilder.IN()) .arrayRow(); // found an INbox? @@ -89,7 +89,7 @@ ticketMailbridgeUtils.getInboxInformation = function(pRecipients, pSender, possi .select(["INBOX.INBOXID","INBOX.REOPEN_DELAY", "INBOX.EMAIL_ADDRESS"]) .from("INBOX") .leftJoin("MAILSIGNATURE", "INBOX.INBOXID = MAILSIGNATURE.INBOX_ID") - .whereIfSet("EMAIL_ADDRESS", possibleBCC, SqlBuilder.IN()) + .whereIfSet("INBOX.EMAIL_ADDRESS", possibleBCC, SqlBuilder.IN()) .arrayRow(); if(inboxObj.inboxID.length > 0) @@ -118,7 +118,7 @@ ticketMailbridgeUtils.getInboxInformation = function(pRecipients, pSender, possi .select(["INBOX.INBOXID","INBOX.REOPEN_DELAY", "INBOX.EMAIL_ADDRESS"]) .from("INBOX") .leftJoin("MAILSIGNATURE", "INBOX.INBOXID = MAILSIGNATURE.INBOX_ID") - .whereIfSet("EMAIL_ADDRESS", possibleBCCUnfiltered, SqlBuilder.IN()) + .whereIfSet("INBOX.EMAIL_ADDRESS", possibleBCCUnfiltered, SqlBuilder.IN()) .arrayRow(); if(inboxObj.inboxID.length > 0)