Support use of multiple parameters with same name in mediawiki-bugzilla

RESOLVED FIXED

Status

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: lmandel, Assigned: brandon)

Tracking

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) );
Whiteboard: [mediawiki-bugzilla]
Workaround that works with bug lists but doesn't seem to work with charts.

"quicksearch": "status:new,assigned,reopened,unconfirmed",
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

7 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
(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?

Comment 5

7 years ago
Ping.
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

7 years ago
It needs to be tested and then merged to master is all.
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
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

7 years ago
This has been merged into master and should be available on the next update of mediawiki-bugzilla.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.