Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Date format for creation_ts in buglist.cgi? query

504 views
Skip to first unread message

engr

unread,
Feb 16, 2012, 5:23:13 PM2/16/12
to support-...@lists.mozilla.org

What would be the date format for the following query to Bugzilla server?
http://hostname:port/buglist.cgi?creation_ts=date&columnlist=all&ctype=csv&Bugzilla_login=xxxxxx&Bugzilla_password=yyyyyy
--
View this message in context: http://old.nabble.com/Date-format-for-creation_ts-in-buglist.cgi--query-tp33339429p33339429.html
Sent from the Bugzilla - Users mailing list archive at Nabble.com.

Gervase Markham

unread,
Feb 17, 2012, 5:22:05 AM2/17/12
to
On 16/02/12 22:23, engr wrote:
>
> What would be the date format for the following query to Bugzilla server?
> http://hostname:port/buglist.cgi?creation_ts=date&columnlist=all&ctype=csv&Bugzilla_login=xxxxxx&Bugzilla_password=yyyyyy

What makes you think such a query is supposed to be in that form? :-)

You need:

https://bugzilla.mozilla.org/buglist.cgi?chfieldto=2011-02-04;chfield=[Bug%20creation];chfieldfrom=2011-02-03

You could have worked this out, as I did, by constructing the query you
wanted using query.cgi.

Having said that, the UI is a little broken, because the query summary
at the top of the results says:

"Creation date: (is greater than or equal to) 2011-02-03
Creation date: (is less than or equal to) 2011-02-04"

but if you put the same date in both boxes, you get Zarro Boogs.

https://bugzilla.mozilla.org/show_bug.cgi?id=728163 filed.

Gerv

engr

unread,
Feb 17, 2012, 1:48:12 PM2/17/12
to support-...@lists.mozilla.org


Gervase Markham wrote:
>
> On 16/02/12 22:23, engr wrote:
>>
>> What would be the date format for the following query to Bugzilla server?
>> http://hostname:port/buglist.cgi?creation_ts=date&columnlist=all&ctype=csv&Bugzilla_login=xxxxxx&Bugzilla_password=yyyyyy
>
> What makes you think such a query is supposed to be in that form? :-)
>
>
Such query is generated by BzAPI for query
http://hostname:3000/bug?username=abcdef&password=XXXX&creation_time=2012-02-16%2011%3A16

The following is from BzAPI log file:
Feb 17 10:34:35 [INFO]
http://hostname:3000/bug?username=abcdef&password=XXXX&creation_time=2012-02-16%2011%3A16
GET =>
http://hostname:port/buglist.cgi?creation_ts=2012-02-16+11%3A16&columnlist=all&ctype=csv&Bugzilla_login=abcdef&Bugzilla_password=XXXX

Gerv, could you please let us know why BzAPI did not generate query like the
one in your post above?
--
View this message in context: http://old.nabble.com/Date-format-for-creation_ts-in-buglist.cgi--query-tp33339429p33344742.html

Gervase Markham

unread,
Feb 22, 2012, 6:48:43 AM2/22/12
to
On 17/02/12 18:48, engr wrote:
> Such query is generated by BzAPI for query
> http://hostname:3000/bug?username=abcdef&password=XXXX&creation_time=2012-02-16%2011%3A16

That's a very good reason to think it, then! :-))

> The following is from BzAPI log file:
> Feb 17 10:34:35 [INFO]
> http://hostname:3000/bug?username=abcdef&password=XXXX&creation_time=2012-02-16%2011%3A16
> GET =>
> http://hostname:port/buglist.cgi?creation_ts=2012-02-16+11%3A16&columnlist=all&ctype=csv&Bugzilla_login=abcdef&Bugzilla_password=XXXX
>
> Gerv, could you please let us know why BzAPI did not generate query like the
> one in your post above?

Let me look into it.

Gerv

Gervase Markham

unread,
Feb 24, 2012, 12:42:17 PM2/24/12
to jeff...@yahoo.com
On 17/02/12 18:48, engr wrote:
>>> What would be the date format for the following query to Bugzilla server?
>>> http://hostname:port/buglist.cgi?creation_ts=date&columnlist=all&ctype=csv&Bugzilla_login=xxxxxx&Bugzilla_password=yyyyyy
>>
>> What makes you think such a query is supposed to be in that form? :-)
>>
> Such query is generated by BzAPI for query
> http://hostname:3000/bug?username=abcdef&password=XXXX&creation_time=2012-02-16%2011%3A16

I've now looked into this. The answer is that yes, BzAPI does generate
queries like the one you give, when you give it a query like the one
directly above... but in fact, the BzAPI documentation gives a different
method of searching for bugs created between two dates:

https://wiki.mozilla.org/Bugzilla:REST_API:Search#Changes

If you use that method, the Bugzilla URLs it generates will be correct.

Granted, it does currently say that you can search on any single-valued
Bug field, except the ones marked as special - and creation_ts is not
completely explicitly marked as special. So I will make the docs more clear.

In general, you should assume that if you can do it with query.cgi, you
can do it with BzAPI, and if you can't, you can't. query.cgi has no
single-field for searching "creation time", so there is no way to do
that in BzAPI either. You can either use Boolean Charts, or the Change
search support.

Gerv
0 new messages