Help:Bugzilla Extension: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎How to Use: Updated link to BzAPI docs)
mNo edit summary
Line 1: Line 1:
The mediawiki-bugzilla extension code is here:
https://github.com/mozilla/mediawiki-bugzilla
Please add code samples and any additional tips on usage here:
Please add code samples and any additional tips on usage here:



Revision as of 02:47, 8 July 2014

The mediawiki-bugzilla extension code is here: https://github.com/mozilla/mediawiki-bugzilla

Please add code samples and any additional tips on usage here:

How to Use

You use this extension in this way:

<bugzilla>
    (JSON REST API query key/value pairs)
</bugzilla>

An example:

<bugzilla>
    {
        "product": "Bugzilla",
        "priority":"P1"
    }
</bugzilla>

For more details on how to query in various ways, see the documentation for the Bugzilla BzAPI REST API.

Note that the tag name defaults to "bugzilla" but is configurable.

There is also exploratory support for charting. Here are some examples:


<bugzilla type="count" display="bar">
    {
        "product":      "Bugzilla",
        "priority":     "P1",
        "x_axis_field": "severity"
    }
</bugzilla>

This example uses date ranges and returns bugs from multiple products:

<bugzilla type="count" display="bar">
    {
        "product":      ["Core","Calendar","Toolkit","Firefox"],
        "changed_after": "2000-01-01",
        "changed_before": "2013-02-01",
         "whiteboard":     "[good first bug]",
        "status":["NEW","REOPENED"],
        "x_axis_field": "product"
    }
</bugzilla>

This example uses date ranges to retrieve the bugs from multiple products with a specific resolution and where the status is the field changed during the date range selected:

<bugzilla type="count" display="bar">
    {
        "product":  ["Core","Calendar","Toolkit","Firefox",  "Thunderbird"],
        "whiteboard":     "[good first bug]", 
        "changed_after": "2013-07-01",
        "changed_before": "2013-08-01",
        "changed_field": "status",
        "changed_field_to": ["RESOLVED"],
         "resolution": ["FIXED", "INVALID", "WONTFIX", "DUPLICATE", "WORKSFORME", "INCOMPLETE"],  
        "x_axis_field": "product"
    }
</bugzilla>