Skip to content
Snippets Groups Projects
Commit 9dcbb756 authored by Daniel Tran's avatar Daniel Tran
Browse files

merged 2020.0 into 1043987-wrong-participant-couting

parents ded86f37 e4e1e42c
No related branches found
No related tags found
No related merge requests found
...@@ -2,5 +2,16 @@ import("Employee_lib"); ...@@ -2,5 +2,16 @@ import("Employee_lib");
import("Document_lib"); import("Document_lib");
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
// TODO: Commented because of performance problems: in Filter view this Process is called for every row. Waiting for bugfix
//result.string(!DocumentUtil.hasDocuments("EMPLOYEE", null, EmployeeUtils.sliceUserId(vars.get("$field.UID")))); var res = false;
\ No newline at end of file
//the current user should not delete himself
if (EmployeeUtils.getCurrentUserName() != vars.get("$field.TITLE")
&& !EmployeeUtils.hasRelations(vars.get("$field.CONTACT_ID"))
&& !DocumentUtil.hasDocuments("EMPLOYEE", null, EmployeeUtils.sliceUserId(vars.get("$field.UID")))
)
{
res = true;
}
result.string(res);
\ No newline at end of file
...@@ -3,6 +3,6 @@ import("system.vars"); ...@@ -3,6 +3,6 @@ import("system.vars");
import("system.tools"); import("system.tools");
import("Employee_lib"); import("Employee_lib");
//TODO: the current user should not delete himself, put this condition in grantDelete when available //the current user should not delete himself
if (EmployeeUtils.getCurrentUserName() != vars.get("$field.TITLE") && !EmployeeUtils.hasRelations(vars.get("$field.CONTACT_ID"))) if (EmployeeUtils.getCurrentUserName() != vars.get("$field.TITLE") && !EmployeeUtils.hasRelations(vars.get("$field.CONTACT_ID")))
tools.deleteUser(vars.get("$field.TITLE")); tools.deleteUser(vars.get("$field.TITLE"));
\ No newline at end of file
...@@ -288,7 +288,7 @@ IncomingCallExecutor._getContactsFromNumber = function(pNumber, pContactIds) ...@@ -288,7 +288,7 @@ IncomingCallExecutor._getContactsFromNumber = function(pNumber, pContactIds)
.join("ORGANISATION", "ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID") .join("ORGANISATION", "ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID")
.leftJoin("PERSON", "CONTACT.PERSON_ID = PERSON.PERSONID") .leftJoin("PERSON", "CONTACT.PERSON_ID = PERSON.PERSONID")
.where("CONTACT.STATUS", $KeywordRegistry.contactStatus$active()) .where("CONTACT.STATUS", $KeywordRegistry.contactStatus$active())
.and("CONTACT.CONTACTID", pContactIds, SqlBuilder.IN()) .and("CONTACT.CONTACTID", contactIds, SqlBuilder.IN())
.table(); .table();
//map to the result how the entities-methods would return it to have less effort later when the mentioned ticket is done //map to the result how the entities-methods would return it to have less effort later when the mentioned ticket is done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment