Skip to content
Newer
Older
100644 192 lines (145 sloc) 5.26 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 …
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 …
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 …
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 …
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
b16a5f4 @edmorley Bug 1168463 - Add an option to hide bug resolution statistics
edmorley authored
49 Options
50 ================================
51
52 Valid bugzilla tag options are:
53
54 * type: ``"bug"`` or ``"count"`` (defaults to bug)
55 * For type bug:
56 * display: ``"table"`` or ``"list"`` (defaults to table)
57 * For type count:
58 * display: ``"bar"`` or ``"pie"``
59 * size: ``"small"``, ``medium"`` or ``"large"`` (defaults to large)
60 * stats: ``"show"`` or ``"hide"`` (defaults to "show")
61
62
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
63 Examples
64 ================================
65
66 All P1 bugs in the Bugzilla product:
7cde8fa @LegNeato Add README
LegNeato authored
67
68 <bugzilla>
69 {
70 "product": "Bugzilla",
71 "priority":"P1"
72 }
73 </bugzilla>
74
840c35d @brandonsavage Fixes Bug 855560 - Adding the Mozilla MPL license header to all Mozil…
brandonsavage authored
75 All new bugs flagged as uiwanted in the whiteboard:
76
77 <bugzilla>
78 {
79 "whiteboard": "uiwanted",
80 "status": "NEW"
81 }
82 </bugzilla>
83
b16a5f4 @edmorley Bug 1168463 - Add an option to hide bug resolution statistics
edmorley authored
84 All bugs in the bugzilla.org component that were resolved in 2011,
85 with the stats summary hidden:
840c35d @brandonsavage Fixes Bug 855560 - Adding the Mozilla MPL license header to all Mozil…
brandonsavage authored
86
b16a5f4 @edmorley Bug 1168463 - Add an option to hide bug resolution statistics
edmorley authored
87 <bugzilla stats="hide">
840c35d @brandonsavage Fixes Bug 855560 - Adding the Mozilla MPL license header to all Mozil…
brandonsavage authored
88 {
89 "component": "bugzilla.org",
90 "changed_after": "2011-01-01",
91 "changed_before": "2011-12-31",
92 "changed_field": "status",
93 "changed_field_to": "resolved"
94 }
95 </bugzilla>
96
97 Some commonly used query parameters are:
98
99 * id
100 * component
101 * product
102 * status
103 * resolution
104 * keywords
105 * whiteboard
106 * target_milestone
107 * version
108 * changed_after
109 * changed_before
110
7cde8fa @LegNeato Add README
LegNeato authored
111 For more details on how to query in various ways, see the documentation for
112 the [Bugzilla REST API](https://wiki.mozilla.org/Bugzilla:REST_API)
113
114
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
115 Configurable fields/columns
116 ================================
117
118 Specify fields in the "include_fields" setting of BZ REST API options as you
119 normally would. Mediawiki-bugzilla will then a) only fetch those fields
120 and b) display those columns.
121
122 <bugzilla>
123 {
124 "whiteboard": "[mediawiki-bugzilla]",
02edbf5 Fix array json syntax.
Ralf Habacker authored
125 "include_fields": ["id", "summary", "whiteboard", "status", "resolution"]
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
126 }
127 </bugzilla>
128
129 ![Screenshot of the above](http://i.imgur.com/p3u7r.png "Screenshot of the above")
130
131
132 Charting
133 ================================
134
135 There is also _some_ support for charting:
7cde8fa @LegNeato Add README
LegNeato authored
136
137 <bugzilla type="count" display="bar">
138 {
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
139 "whiteboard": "[snappy:p1]",
140 "x_axis_field": "status"
7cde8fa @LegNeato Add README
LegNeato authored
141 }
142 </bugzilla>
143
d893371 @LegNeato Add screenshot
LegNeato authored
144 Screenshot of the above:
145
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
146 ![Screenshot of the above](http://i.imgur.com/tDUZ1.png "Screenshot of the above")
147
148 <bugzilla type="count" display="pie">
149 {
150 "whiteboard": "[mediawiki-bugzilla]",
151 "x_axis_field": "status"
152 }
153 </bugzilla>
154 <bugzilla type="count" display="pie" size="medium">
155 {
156 "whiteboard": "[mediawiki-bugzilla]",
157 "x_axis_field": "status"
158 }
159 </bugzilla>
160 <bugzilla type="count" display="pie" size="small">
161 {
162 "whiteboard": "[mediawiki-bugzilla]",
163 "x_axis_field": "status"
164 }
165 </bugzilla>
166
167 Screenshot of the above:
168
169 ![Screenshot of the above](http://i.imgur.com/mobHA.png "Screenshot of the above")
170
d893371 @LegNeato Add screenshot
LegNeato authored
171
7cde8fa @LegNeato Add README
LegNeato authored
172 Limitations
173 ================================
174
175 * This extension (by design) is read-only
176 * This extension currently queries as a public (not logged in) user
177 * Charts are fairly hardcoded and don't work in many cases
178
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
179 Known Issues
7cde8fa @LegNeato Add README
LegNeato authored
180 ================================
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
181 * The __size__ attribute only works on pie charts
182 * Rendering a page with an uncached query can take a bit
183 * 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:
184 If your wiki page has the URL
185 https://wiki.mozilla.org/PagePath/PageTitle
186 The URL to edit your page is
187 https://wiki.mozilla.org/index.php?title=PagePath/PageTitle&action=edit
7cde8fa @LegNeato Add README
LegNeato authored
188
ad5b265 @LegNeato Rebase LegNeato repo on top of mozilla repo. Update Readme, fix line …
LegNeato authored
189 TODO
190 ================================
191 * Add more/smarter field display templates
Something went wrong with that request. Please try again.