Bug 832320 - Cannot get delta_ts or days_elapsed in query results
Cannot get delta_ts or days_elapsed in query results
Status: CLOSED NOTABUG
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
4.2
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: Simon Green
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-15 03:00 EDT by Jason Tibbitts
Modified: 2014-10-12 18:48 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-15 03:09:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Tibbitts 2012-06-15 03:00:16 EDT
I maintain the code that generates the pages at http://fedoraproject.org/PackageReviewStatus/, and I'm trying to keep the amount of query traffic to a minimum.

The code basically runs a couple of queries, and column list is set so that the necessary info is returned without having to do individual get() calls on each bug.

Using the old query interface, I can include 'changedate' in column_list and I get the last ticket update time.  Under the new interface, I assume I should ask for delta_ts instead, except that if I include that in column_list the returned rows do not include that column.  I could get by with days_elapsed, but that column has the same problem.  

As far as I can tell, there is no way to get some information about when each ticket was last changed as the result of a query() call.  I'd love to be wrong about this but I'm having no luck figuring it out.  It is of course simply not practical to individually call get() on each bug in the report, since there are well over a thousand bugs to look up and the script runs many times a day.

I can include an xmlrpc protocol dump if it would help.
Comment 1 Simon Green 2012-06-15 03:09:30 EDT
(In reply to comment #0)
> Using the old query interface, I can include 'changedate' in column_list and
> I get the last ticket update time.  Under the new interface, I assume I
> should ask for delta_ts instead, except that if I include that in
> column_list the returned rows do not include that column.  I could get by
> with days_elapsed, but that column has the same problem.  

As per the documentation at https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#get , the field you want is last_change_time.

  -- simon
Comment 2 Jason Tibbitts 2012-06-15 10:24:01 EDT
That's great.  I was going off the field list returned by:

import bugzilla; bz = bugzilla.Bugzilla(url='https://bugzilla.redhat.com/xmlrpc.cgi'); bz._proxy.Bug.fields({'include_fields':['name', 'display_name']})

But I'm guessing that for some reason doesn't match reality.  Certainly I can make use of (at least most of) the fields there in an advanced query; I just can't get them returned in the query results, and I'll freely admit I don't understand why.

Note You need to log in before you can comment on or make changes to this bug.