Skip to content
Snippets Groups Projects
Commit 7bf81a4f authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

cti: use first created entry when several active contacts were found

parent ee92fe11
No related branches found
No related tags found
No related merge requests found
...@@ -408,6 +408,8 @@ IncomingCallExecutor._getContactsFromNumber = function(pNumber, pContactIds) ...@@ -408,6 +408,8 @@ IncomingCallExecutor._getContactsFromNumber = function(pNumber, pContactIds)
.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", contactIds, SqlBuilder.IN()) .and("CONTACT.CONTACTID", contactIds, SqlBuilder.IN())
//order by import if more than one record would be returned to give a statement: the first created, active contact is used
.orderBy("CONTACT.DATE_NEW asc")
.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