| Summary: | Bug.search creation_time parameter not honored | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Bugzilla | Reporter: | Ondrej Skutka <oskutka> | ||||
| Component: | WebService | Assignee: | Simon Green <sgreen> | ||||
| Status: | CLOSED WORKSFORME | QA Contact: | |||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.6 | CC: | atodorov, ebaak, sgreen | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-02-26 21:38:10 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Ondrej Skutka
2011-09-06 11:47:53 UTC
(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 |