Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 177 lines (134 sloc) 4.942 kb
7cde8fa @LegNeato Add README
LegNeato authored
1 MediaWiki extension for Bugzilla
2 ================================
3
4 This is a MediaWiki extension that provides read-only access to the
5 [Bugzilla REST API](https://wiki.mozilla.org/Bugzilla:REST_API)
6
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
7 __Please note that there are still big outstanding bugs!__
7cde8fa @LegNeato Add README
LegNeato authored
8
9 Requirements
10 ================================
11
173af03 @pablofiu added links in the Requeriments section
pablofiu authored
12 * Requires <a href="http://pear.php.net/package/HTTP_Request2">HTTP_Request2 from PEAR</a>
13 * For charting, requires <a href="http://libgd.bitbucket.org/">gd</a>
7cde8fa @LegNeato Add README
LegNeato authored
14
81317a8 @LegNeato Add installation instructions
LegNeato authored
15 Installation
16 ================================
17
18 *These directions assume your MediaWiki installation is at /var/lib/mediawiki.
04cf8b5 @KWierso s/substitue/substitute/
KWierso authored
19 Please substitute your installation path if it is different*
81317a8 @LegNeato Add installation instructions
LegNeato authored
20
21 1. Install the requirements above
7b8873a @LegNeato README formatting
LegNeato authored
22 2. Check the project out into `/var/lib/mediawiki/extensions/Bugzilla`
23 3. Edit `/etc/mediawiki/LocalSettings.php` and add
274ea29 @LegNeato Add support docs for data table info
LegNeato authored
24 `require_once("/var/lib/mediawiki/extensions/Bugzilla/Bugzilla.php");`
7b8873a @LegNeato README formatting
LegNeato authored
25 4. Edit `/etc/mediawiki/LocalSettings.php` and change/override any
81317a8 @LegNeato Add installation instructions
LegNeato authored
26 configuration variables. Current configuration variables and their defaults
7b8873a @LegNeato README formatting
LegNeato authored
27 can be found at the end of `Bugzilla.php`
274ea29 @LegNeato Add support docs for data table info
LegNeato authored
28 5. Run the MediaWiki update script to create the cache database table
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
29 `php /var/lib/mediawiki/maintenance/update.php`. __Note that you may need to
274ea29 @LegNeato Add support docs for data table info
LegNeato authored
30 add `$wgDBadminuser` and `$wgDBadminpassword` to
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
31 `/etc/mediawiki/LocalSettings.php` depending on your MediaWiki version__
81317a8 @LegNeato Add installation instructions
LegNeato authored
32
7cde8fa @LegNeato Add README
LegNeato authored
33 Usage
34 ================================
35
36 You use this extension in this way:
37
38 <bugzilla>
39 (JSON REST API query key/value pairs)
40 </bugzilla>
41
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
42 By default, it will output a colored table:
43
44 ![Example output](http://i.imgur.com/IM6xd.png"Example output")
45
46 Note that the wiki tag name defaults to "bugzilla" but is
47 configurable by the administrator.
48
49 Examples
50 ================================
51
52 All P1 bugs in the Bugzilla product:
7cde8fa @LegNeato Add README
LegNeato authored
53
54 <bugzilla>
55 {
56 "product": "Bugzilla",
57 "priority":"P1"
58 }
59 </bugzilla>
60
840c35d @brandonsavage Fixes Bug 855560 - Adding the Mozilla MPL license header to all Mozilla-...
brandonsavage authored
61 All new bugs flagged as uiwanted in the whiteboard:
62
63 <bugzilla>
64 {
65 "whiteboard": "uiwanted",
66 "status": "NEW"
67 }
68 </bugzilla>
69
70 All bugs in the bugzilla.org component that were resolved in 2011:
71
72 <bugzilla>
73 {
74 "component": "bugzilla.org",
75 "changed_after": "2011-01-01",
76 "changed_before": "2011-12-31",
77 "changed_field": "status",
78 "changed_field_to": "resolved"
79 }
80 </bugzilla>
81
82 Some commonly used query parameters are:
83
84 * id
85 * component
86 * product
87 * status
88 * resolution
89 * keywords
90 * whiteboard
91 * target_milestone
92 * version
93 * changed_after
94 * changed_before
95
7cde8fa @LegNeato Add README
LegNeato authored
96 For more details on how to query in various ways, see the documentation for
97 the [Bugzilla REST API](https://wiki.mozilla.org/Bugzilla:REST_API)
98
99
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
100 Configurable fields/columns
101 ================================
102
103 Specify fields in the "include_fields" setting of BZ REST API options as you
104 normally would. Mediawiki-bugzilla will then a) only fetch those fields
105 and b) display those columns.
106
107 <bugzilla>
108 {
109 "whiteboard": "[mediawiki-bugzilla]",
110 "include_fields": "id, summary, whiteboard, status, resolution"
111 }
112 </bugzilla>
113
114 ![Screenshot of the above](http://i.imgur.com/p3u7r.png "Screenshot of the above")
115
116
117 Charting
118 ================================
119
120 There is also _some_ support for charting:
7cde8fa @LegNeato Add README
LegNeato authored
121
122 <bugzilla type="count" display="bar">
123 {
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
124 "whiteboard": "[snappy:p1]",
125 "x_axis_field": "status"
7cde8fa @LegNeato Add README
LegNeato authored
126 }
127 </bugzilla>
128
d893371 @LegNeato Add screenshot
LegNeato authored
129 Screenshot of the above:
130
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
131 ![Screenshot of the above](http://i.imgur.com/tDUZ1.png "Screenshot of the above")
132
133 <bugzilla type="count" display="pie">
134 {
135 "whiteboard": "[mediawiki-bugzilla]",
136 "x_axis_field": "status"
137 }
138 </bugzilla>
139 <bugzilla type="count" display="pie" size="medium">
140 {
141 "whiteboard": "[mediawiki-bugzilla]",
142 "x_axis_field": "status"
143 }
144 </bugzilla>
145 <bugzilla type="count" display="pie" size="small">
146 {
147 "whiteboard": "[mediawiki-bugzilla]",
148 "x_axis_field": "status"
149 }
150 </bugzilla>
151
152 Screenshot of the above:
153
154 ![Screenshot of the above](http://i.imgur.com/mobHA.png "Screenshot of the above")
155
d893371 @LegNeato Add screenshot
LegNeato authored
156
7cde8fa @LegNeato Add README
LegNeato authored
157 Limitations
158 ================================
159
160 * This extension (by design) is read-only
161 * This extension currently queries as a public (not logged in) user
162 * Charts are fairly hardcoded and don't work in many cases
163
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
164 Known Issues
7cde8fa @LegNeato Add README
LegNeato authored
165 ================================
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
166 * The __size__ attribute only works on pie charts
167 * Rendering a page with an uncached query can take a bit
168 * Large queries may exceed the allocated memory causing a blank page to be displayed. In this case you can recover by editing the page as follows:
169 If your wiki page has the URL
170 https://wiki.mozilla.org/PagePath/PageTitle
171 The URL to edit your page is
172 https://wiki.mozilla.org/index.php?title=PagePath/PageTitle&action=edit
7cde8fa @LegNeato Add README
LegNeato authored
173
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line end...
LegNeato authored
174 TODO
175 ================================
176 * Add more/smarter field display templates
Something went wrong with that request. Please try again.