Skip to content

Commit

Permalink
fixed an import and merge issue where 'assigned_user_id' field was em…
Browse files Browse the repository at this point in the history
…ptied if not provided as Webservice id (->read() returns ids without Webservice prefix)
  • Loading branch information
AlexKay85 committed Dec 9, 2019
1 parent ec45538 commit 06cea75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/Webservices/DataTransform.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ public static function sanitizeForInsert($row,$meta){
$ownerFields = $meta->getOwnerFields();
foreach($ownerFields as $index=>$field){
if(isset($row[$field]) && $row[$field]!=null){
$ownerDetails = vtws_getIdComponents($row[$field]);
$row[$field] = $ownerDetails[1];
if(strpos($row[$field],'x')!==false) {
$ownerDetails = vtws_getIdComponents($row[$field]);
$row[$field] = $ownerDetails[1];
}
}
}
if(strtolower($meta->getEntityName()) == "emails"){
Expand Down

0 comments on commit 06cea75

Please sign in to comment.