6.0.0-alpha12
6/12/25

[#8338] missing 'uid' in turba_browse
Summary missing 'uid' in turba_browse
Queue Turba
Queue Version 2.3.1
Type Bug
State Not A Bug
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester rpolli (at) babel (dot) it
Created 06/10/2009 (5846 days ago)
Due
Updated 08/13/2009 (5782 days ago)
Assigned 06/12/2009 (5844 days ago)
Resolved 06/12/2009 (5844 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/13/2009 01:30:59 PM turbagurl (at) hotmail (dot) com Comment #9 Reply to this comment
we r missing inbox mail for the other broswer
06/16/2009 10:48:51 AM rpolli (at) babel (dot) it Comment #8 Reply to this comment
It's confusing because there are currently two ways to identify and
retrieve objects, for historical reasons.
are you going to leave one out in future releases?
UIDs are used for any
synchronization purposes i.e. for external data exchange,
so why not to expose methods to show a map of <uid, ..properties..> ?

It enables webservices to be a replacement of sql access.



if I create a cached browser for horde contacts/calendar, I got 
browsing data <Id, modified, ..> but when i insert an item, the ws 
returns the uid..

As cache checks etag/timestamp to (in)validate the item, actual horde 
ws behavior makes impossible to create a "fast" cache, forcing to 
continuously use getActionTimestamp on each item (with the overhead 
due to the amount of ws call - about 1sec each).
IDs are used for internal exchange.
and webdav



Thx,

R.
06/16/2009 10:22:06 AM Jan Schneider Comment #7 Reply to this comment
It's confusing because there are currently two ways to identify and 
retrieve objects, for historical reasons. UIDs are used for any 
synchronization purposes i.e. for external data exchange, IDs are used 
for internal exchange.
06/14/2009 09:37:55 AM rpolli (at) babel (dot) it Comment #6 Reply to this comment
Objects
are identified by their IDs, not their UIDs in those contexts.
so, is there a way to retrieve objects data by ID? (ex. export, 
getActionTimestamp, ..)

All webservice methods are UID-oriented but this one..to me it's quite 
confusing :)



Thx for your time,

R.




06/12/2009 09:16:39 PM Chuck Hagenbuch Patch ⇒ No
State ⇒ Not A Bug
 
06/12/2009 09:11:42 PM Jan Schneider Comment #5 Reply to this comment
The purpose of the browse methods is to provide directory-like listing 
for directory services like WebDAV, obrowser, etc. Objects are 
identified by their IDs, not their UIDs in those contexts. It's *not* 
there to list complete objects, use the list* and export methods for 
that.
06/12/2009 09:05:21 PM Chuck Hagenbuch Comment #4
Assigned to Jan Schneider
Reply to this comment
Jan, am I missing something here?



Also, what relevance do the calendar methods have to the Turba 
(address book) API? Though all the _browse ones should be as 
consistent as possible...
06/12/2009 06:03:21 PM rpolli (at) babel (dot) it Comment #3 Reply to this comment
When you say missing, what would mean that the UID should be present
here?
yes. As the calendar.import method returns the UID of the item, it's 
an important information to retrieve.
I don't know what it would mean for webdav, for example, and I
don't see it in any of our other _browse method implementations.
uid should be return on demand, not by default, like the "modified", 
"created" fields..

let me know if you need some examples..








06/12/2009 03:41:54 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
When you say missing, what would mean that the UID should be present 
here? I don't know what it would mean for webdav, for example, and I 
don't see it in any of our other _browse method implementations.
06/10/2009 02:50:23 PM Jan Schneider Milestone ⇒
 
06/10/2009 12:30:37 PM rpolli (at) babel (dot) it Comment #1
Patch ⇒ Yes
State ⇒ Unconfirmed
Milestone ⇒ 2.3.1
Queue ⇒ Turba
Summary ⇒ missing 'uid' in turba_browse
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
missing 'uid' in turba_browse properties.

note: if contact->getValue issues a call instead of a simple attribute 
retrieval from an object, it could be optimized with a function like:

if  ! defined(item[guid]):

    item[guid] = item.getValue('_uid')



return item[guid]



Patch follows. The same in kronolith and maybe in all other modules...



@@ -580,6 +584,9 @@

              if (in_array('created', $properties)) {

                  $results[$key]['created'] = 
_turba_getActionTimestamp($contact->getValue('__uid'), 'add');

              }

+           if (in_array('uid', $properties)) { // rpolli .,+2

+               $results[$key]['uid'] = $contact->getValue('__uid');

+           }

          }



          return $results;


Saved Queries