diff --git a/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/displayValueProcess.js b/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/displayValueProcess.js index 0dde82e7728286629b1c210326725aac2ebb92c5..35ee9d5af270f7b70e4827ca1717b9d96882cea6 100644 --- a/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/displayValueProcess.js +++ b/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/displayValueProcess.js @@ -2,7 +2,6 @@ import("system.result"); import("system.vars"); import("Contact_lib"); -var id = vars.get("$this.value"); -//show the simpel title since this will be later an employee-entry and therefore no organisation is needed -var title = ContactUtils.getTitleByContactId(id); +//show the simpel title since this is an employee-entry and therefore no organisation is needed +var title = ContactUtils.getTitleByContactId(vars.get("$field.TASK_REQUESTOR_CONTACT_ID")); result.string(title); \ No newline at end of file diff --git a/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/valueProcess.js b/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/valueProcess.js index 1e62e7551ccb20b0b0d7aca34f64b6e448b5dda7..4711a17716cf559c48c73cd7ea780b2ffe5e2e03 100644 --- a/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/valueProcess.js +++ b/entity/SupportTicket_entity/entityfields/task_requestor_contact_id/valueProcess.js @@ -3,5 +3,5 @@ import("system.neon"); import("system.vars"); import("Employee_lib"); -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null) result.string(EmployeeUtils.getCurrentContactId()); \ No newline at end of file diff --git a/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/task_editor_contact_id.displayvalue/expression.js b/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/task_editor_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..8e7ea35c7f489e257f771a9f67d1672d35817c4b --- /dev/null +++ b/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/task_editor_contact_id.displayvalue/expression.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Person_lib"); + +var subSql = PersUtils.getResolvingDisplaySubSql("TASK.EDITOR_CONTACT_ID"); +result.string(subSql); \ No newline at end of file diff --git a/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/task_requestor_contact_id.displayvalue/expression.js b/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/task_requestor_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..10b4b9967c878d5caeccc5ca25a4d897570bc185 --- /dev/null +++ b/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/task_requestor_contact_id.displayvalue/expression.js @@ -0,0 +1,5 @@ +import("system.result"); +import("Person_lib"); + +var subSql = PersUtils.getResolvingDisplaySubSql("TASK.REQUESTOR_CONTACT_ID"); +result.string(subSql); \ No newline at end of file diff --git a/entity/Task_entity/recordcontainers/db/recordfieldmappings/editor_contact_id.displayvalue/expression.js b/entity/Task_entity/recordcontainers/db/recordfieldmappings/editor_contact_id.displayvalue/expression.js index e5961584dd2e3bd5741ac96032105a8cc43ec58b..8e7ea35c7f489e257f771a9f67d1672d35817c4b 100644 --- a/entity/Task_entity/recordcontainers/db/recordfieldmappings/editor_contact_id.displayvalue/expression.js +++ b/entity/Task_entity/recordcontainers/db/recordfieldmappings/editor_contact_id.displayvalue/expression.js @@ -1,6 +1,5 @@ import("system.result"); import("Person_lib"); -//TODO: try to find a better solution for this -> #TITLE-mechanic when available var subSql = PersUtils.getResolvingDisplaySubSql("TASK.EDITOR_CONTACT_ID"); result.string(subSql); \ No newline at end of file