Skip to content
Snippets Groups Projects
Commit 8d2809b0 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

RevertFalseBugfixLiquibaseMailbridge

parent 3366e351
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,6 @@ import("Keyword_lib");
import("KeywordRegistry_basic");
import("Contact_lib");
import("Communication_lib");
import("Context_lib");
function StandardObject (pObjectType, pObjectID, pScopeType, pScopeID) {
if (!this._isValidType("object", pObjectType))
......@@ -247,7 +246,7 @@ StandardObject.prototype._getCompanyStandardAddress = function (pOrganisationID)
*
* @param {String} pObjectRowId The rowid of the communication to check.
* @param {String} pMediumCategory Medium category to check.
* @param {String} pObjectType=CurrentContextId (Optional) The type of the rowid
* @param {String} pObjectType=Contact (Optional) The type of the rowid
* @return {Boolean} If the contact already has a standard addres with the given
* medium category.
*/
......@@ -259,7 +258,7 @@ StandardObject.prototype._hasStandardCommunicationByMedium = function (pObjectRo
.leftJoin("AB_KEYWORD_ATTRIBUTERELATION", "AB_KEYWORD_ENTRY_ID = AB_KEYWORD_ENTRYID")
.where("ISSTANDARD = 1")
.and("COMMUNICATION.OBJECT_ROWID", pObjectRowId)
.and("COMMUNICATION.OBJECT_TYPE", (pObjectType ? pObjectType : ContextUtils.getCurrentContextId()))
.and("COMMUNICATION.OBJECT_TYPE", (pObjectType ? pObjectType : CommUtil.defaultObjectType()))
.and("AB_KEYWORD_ENTRY.KEYID", CommUtil.getMediumIdsByCategory(pMediumCategory), SqlBuilder.IN())
.arrayColumn()
.indexOf(pMediumCategory) !== -1;
......
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