6.0.0-beta1
9/22/25

[#5609] Different results in vcard export of all vs selected contacts
Summary Different results in vcard export of all vs selected contacts
Queue Turba
Queue Version 2.1.4
Type Bug
State No Feedback
Priority 1. Low
Owners
Requester jonrober (at) stanford (dot) edu
Created 08/06/2007 (6622 days ago)
Due
Updated 09/05/2007 (6592 days ago)
Assigned 08/09/2007 (6619 days ago)
Resolved 09/05/2007 (6592 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/05/2007 02:08:28 PM Jan Schneider State ⇒ No Feedback
 
08/26/2007 12:56:33 AM Chuck Hagenbuch Comment #4 Reply to this comment
Just a ping to see if you've been able to test this?



Thanks,

-chuck
08/09/2007 07:04:14 PM jonrober (at) stanford (dot) edu Comment #3 Reply to this comment
Not immediately, but I can manage to give that a try in about two 
weeks -- bad timing with vacation and a fast pass at trying to install 
on our dev-server not managing to go through without more attention 
than I have today. :)  Thank you for the information though, I'll test 
that out asap.
08/09/2007 05:45:49 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
I believe this might have been fixed in Turba 2.2. Any chance that you 
could test that? Thanks!
08/06/2007 09:56:45 PM jonrober (at) stanford (dot) edu Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Different results in vcard export of all vs selected contacts
Queue ⇒ Turba
State ⇒ Unconfirmed
Reply to this comment
When exporting an address book to vcard, the N field changes based on 
whether or not the user has requested to export all entries.  When the 
user only asks to export certain entries, the N field contains the 
complete split name (N:Doe;John;;;) but when exporting all entries, 
the N field contains only the last name (N:Doe;;;;).



Examining the code, what's happening is that searching for all users 
calls the search function in lib/Drive.php, which has as a default to 
sort by lastname.  The data coming in (from a Turba MySQL backend) has 
no lastname field, so when &search calls the sort function, a lastname 
is created but no firstname.  On the other hand, searching for only 
certain users goes through different functions, so lastname isn't 
added onto the records.  When the vcard function gets the data, it 
uses the lastname/firstname values for N if set, or splits the name 
out entirely from the full name if not.  Thus, searching for certain 
users has the vcard function split their names, while searching for 
all users returns a number of records with lastname set but not 
firstname set, which causes a wrong view of the full name.



Could you perhaps have sorting fully split the name if it does have to 
create a name, rather than only splitting out what it requires for the 
sort itself?


Saved Queries