0012064: Add multiple filter values in Import
authorsstamer <s.stamer@metaways.de>
Thu, 21 Jul 2016 12:54:42 +0000 (14:54 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 21 Jul 2016 15:00:25 +0000 (17:00 +0200)
https://forge.tine20.org/view.php?id=12064

Change-Id: I193797b8220078f4bd565255967096e79e551596
Reviewed-on: http://gerrit.tine20.com/customers/3384
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Import/Abstract.php

index d62b7a0..6c8d9e4 100644 (file)
@@ -634,9 +634,14 @@ abstract class Tinebase_Import_Abstract implements Tinebase_Import_Interface
         $operator = isset($field['operator']) ? $field['operator'] : 'equals';
 
         $filterValueToAdd = '';
-        if (isset($field['filterValueAdd']) && isset($data[$field['filterValueAdd']])) {
+        if (isset($field['filterValueAdd'])) {
             if ($field['filter'] === 'query') {
-                $filterValueToAdd = ' ' . $data[$field['filterValueAdd']];
+                $filters = explode(',', $field['filterValueAdd']);
+                foreach ($filters as $newFilter) {
+                    if(isset($data[$newFilter])) {
+                        $filterValueToAdd = $filterValueToAdd . ' ' . $data[$newFilter];
+                    }
+                }
             } else {
                 if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) {
                     Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__