Closed
Bug 729259
Opened 13 years ago
Closed 12 years ago
Support use of multiple parameters with same name in mediawiki-bugzilla
Categories
(Websites :: wiki.mozilla.org, defect)
Websites
wiki.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: lmandel, Assigned: brandon)
References
Details
(Whiteboard: [mediawiki-bugzilla])
The Bugzilla REST API expects that certain parameters by encoded as separate query parameters in the URL. For ex, in order to return all open bugs the following status query params must be specified
status=unconfirmed&status=new&status=assigned&status=reopened
The mediawiki-bugzilla implementation currently supports specifying multiple values for a parameter in the wiki markup but only submits the last value specified as part of the Bugzilla REST query. I expect this is a result of this line in BugzillaQuery.class.php
$params = array( 'query_obj' => serialize($this) );
Reporter | ||
Updated•13 years ago
|
Whiteboard: [mediawiki-bugzilla]
Reporter | ||
Comment 1•13 years ago
|
||
Workaround that works with bug lists but doesn't seem to work with charts.
"quicksearch": "status:new,assigned,reopened,unconfirmed",
Comment 2•13 years ago
|
||
It would be super handy if this could get fixed :/ I ran into it almost immediately when i started using this to build graphs for Pancake.
Assignee | ||
Comment 3•12 years ago
|
||
I've submitted a pull request for this issue: https://github.com/mozilla/mediawiki-bugzilla/pull/10
We are using JSON which allows the creation of arrays. So, once this is integrated we should be able to use the following syntax:
<bugzilla>
{
"product": "Webtools",
"priority":["P1", "P2"]
}
</bugzilla>
Solving this bug also highlighted another issue whereby we were incorrectly requesting the default column names from Bugzilla's API. This has now been fixed as part of this patch.
Assignee: nobody → bsavage
Reporter | ||
Comment 4•12 years ago
|
||
(In reply to Brandon Savage [:brandon] from comment #3)
> Solving this bug also highlighted another issue whereby we were incorrectly
> requesting the default column names from Bugzilla's API. This has now been
> fixed as part of this patch.
Are you referring to bug 743987?
Reporter | ||
Comment 6•12 years ago
|
||
Looks like this might be waiting on me as I do remember receiving a pull request from Brandon.
Brandon - Are you waiting on me to accept the pull request? If so, let's discuss this so that it can get done.
Assignee | ||
Comment 7•12 years ago
|
||
It needs to be tested and then merged to master is all.
Reporter | ||
Comment 8•12 years ago
|
||
I merged Brandon's branch locally and tested the changes. I was able to successfully use single and multiple values for priority and status. The existing, non array use continues to function as well. I also tested this functionality with charts, which worked as well.
It's of note that multiple values are only supported for single value fields such as product, component, severity, priority, and status. Text fields such as comment, keywords, summary, url, and whiteboard are not supported.
https://wiki.mozilla.org/Bugzilla:REST_API:Search#Text_Fields
Comment 9•12 years ago
|
||
Hi, may I know how to query multiple status, in Wiki?
For example, status = NEW, or status = REOPENED?
Thanks!
I think you have to use this workaround
"quicksearch": "status:new,assigned,reopened,unconfirmed",
Assignee | ||
Comment 11•12 years ago
|
||
This has been merged into master and should be available on the next update of mediawiki-bugzilla.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•