Created attachment 521641 [details] Run with "mvn test" Description of problem: When querying bugzilla using Bug.search, the creation_time parameter is not taken into consideration. It's not in the database query and neither it is reflected in the bugs found. Version-Release number of selected component (if applicable): How reproducible: See attached example Steps to Reproduce: 1. tar -xvzf creation-time-bug-reproducer.tar.gz 2. cd creation-time-bug-reproducer 3. mvn test Actual results: Finds ~8 bugs. Expected results: Should not found any bug since the creation_time parameter is set to the future. (it doesn't work with past time either) Additional info: creation_time parameter is described in http://www.bugzilla.org/docs/3.6/en/html/api/Bugzilla/WebService/Bug.html#search
(In reply to comment #0) > Expected results: > Should not found any bug since the creation_time parameter is set to the > future. (it doesn't work with past time either) The correct field for Bug.search is creation_ts From Bugzilla/WebService/Bug.pm: 442 if (my $when = delete $params->{creation_ts}) { 443 $params->{WHERE}->{'creation_ts >= ?'} = $when; 444 } -- simon
a) creation_ts doesn't seem to work in the way you describe. Change the creation_time to creation_ts in the attached source and you will find that it never finds any bug. Actually the sql used contains something like "(( bugs.creation_ts IN ('2010-11-18T09:13:00-0500') )" which really cannot be used as a bug search parameter (missing the "or later"). b) update the documentation accordingly.
Hello Simon. Is there an update on this issue? Or at least a workaround? Thanks, Ondra
just for the record: I found this to be working by looking at the parameters passed in the URL when doing the query via FF: qd = { 'reporter' : 'atodorov', 'chfieldfrom' : '2012-02-01', 'chfieldto' : '2012-02-29', 'chfield' : '[Bug creation]', } Those fields don't appear in getbugfields() method. Why is that?
(In reply to comment #4) > Those fields don't appear in getbugfields() method. Why is that? They are not fields for a bug, but for the search query.
But the creation_time parameter parameter is a field for the search query. I'm reopening the bug. This hasn't been solved yet.
The perl XMLRPC call works as expected: $call = $rpc->call( 'Bug.search_new', { creation_time => '2012-02-20 00:00:00', include_fields => ['id', 'creation_time'] } ); (reporting all bugs opened since 2012-02-20 in your preferred time zone). (In reply to comment #0) > creation_time parameter is described in > http://www.bugzilla.org/docs/3.6/en/html/api/Bugzilla/WebService/Bug.html#search Our XMLRPC calls differ from upstream. Their Bug.search call is Bug.search_new in Red Hat Bugzilla. This will be changed when we migrate to Bugzilla 4.2 (where we will take upstream changes with minimal modification) (In reply to comment #6) > But the creation_time parameter parameter is a field for the search query. I'm > reopening the bug. This hasn't been solved yet. As shown in the above example, this works if you use the Bug.search_new RPC call. Unfortunately, the Red Hat Bugzilla team don't have the resources to help debug your specific code. Feel free to reopen if you believe that there is a bug within Red Hat Bugzilla itself. -- simon
Thanks for the explanation. This seems to work correctly. I must have missed some part of the documentation. Could you point me to a page where the search => search_new is documented?
(In reply to comment #8) > I must have missed some part of the documentation. Could you point me to a page > where the search => search_new is documented? https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#Bug_Information