Addressbook_Export - fix doc / xlsx member[role]s resolving
authorPaul Mehrer <p.mehrer@metaways.de>
Fri, 11 Aug 2017 13:20:43 +0000 (15:20 +0200)
committerPaul Mehrer <p.mehrer@metaways.de>
Fri, 11 Aug 2017 14:00:09 +0000 (16:00 +0200)
Change-Id: Id5acda61f239a1daa83d1f9cd67e170f34a749b8
Reviewed-on: http://gerrit.tine20.com/customers/5456
Reviewed-by: Paul Mehrer <p.mehrer@metaways.de>
Tested-by: Paul Mehrer <p.mehrer@metaways.de>
tine20/Addressbook/Export/List/Trait.php
tine20/Tinebase/Export/Doc.php

index ff74a81..42e181d 100644 (file)
@@ -60,9 +60,11 @@ trait Addressbook_Export_List_Trait
             }
 
             $str = '';
+            $members = '';
             /** @var Addressbook_Model_Contact $contact */
             foreach($memberRecords as $contact) {
                 $str .= ($str===''?'':', ') . $contact->n_fn;
+                $members .= ($members===''?'':', ') . $contact->n_fn;
                 if (isset($members[$contact->getId()])) {
                     $str .= ' (';
                     $first = true;
@@ -78,6 +80,7 @@ trait Addressbook_Export_List_Trait
             }
 
             $record->memberroles = $str;
+            $record->members = $members;
         }
     }
 
index 50d47ec..4e4c96a 100644 (file)
@@ -373,6 +373,7 @@ class Tinebase_Export_Doc extends Tinebase_Export_Abstract implements Tinebase_R
                     $mergedRecords = array_merge($recordArray, $mergedRecords);
                 }
                 $validators = array_fill_keys(array_keys($mergedRecords), array(Zend_Filter_Input::ALLOW_EMPTY => true));
+                unset($validators['customfields']);
                 foreach($recordSet as $recordArray) {
                     $record = new Tinebase_Record_Generic(array(), true);
                     $record->setValidators($validators);