Extension:Bugzilla Reports

BugzillaReports generates good looking reports from bugzilla bug list which you can include in your wiki pages.

=Installation=

Add the following to your LocalSettings.php file:

where parameters are as follows:


 * 1) interwiki &rArr; interwiki prefix linking to bugzilla instance
 * For example set up interwiki prefix of bugzilla to point to URL http://host/show_bug.cgi?id=$1
 * 1) bzserver &rArr; alternative to interwiki parameter, point to bugzilla server e.g. http://host"
 * 2) maxrows &rArr; set maximum number of rows to display (defaults to 200)

Install the following files in your extensions directory:


 * BugzillaReports/BugzillaReports.i18n.php
 * BugzillaReports/BugzillaReports.php
 * BugzillaReports/skins/bz_main.css

See source below for these files.

Note: this is an extension that I've been using and wanted to share. Please feel free to ask for any enhancements or fixes (or any other comments) on the talk page.

=Usage=

Generate a report from Bugzilla based on search criteria:

supported columns are as follows:


 * bug_id
 * bug_severity
 * bug_status
 * deadline
 * login_name
 * priority
 * product_name
 * short_desc
 * version

e.g.

With Semantic MediaWiki
This extension works well with the Semantic MediaWiki by


 * 1) tagging your page with a property, e.g. task::52
 * 2) and then passing the results of semantic search into the bugzilla reports function, e.g.

=Source=

BugzillaReports/BugzillaReports.php
";

mysql_free_result($result); mysql_close($link);

if ($this->debug) { $output.=" ".$sql." "; }		return $output; }	/**	 * Extract options from a blob of text *	 * @param string $text Tag contents */	public function extractOptions( $args ) { debug("Calling extractOptions"); foreach( $args as $line ) { if( strpos( $line, '=' ) === false ) continue; list( $name, $value ) = explode( '=', $line, 2 ); $value=trim($value); /**			 * Safe parameter reading only allowing alphanumeric, space, * ",", "@" and "." */			if (preg_match("/^[\w,@\.\s]*$/", $value, $matches)) { $this->$name=$matches[0]; debug("Parameter ".$name."=".$matches[0]); } else { debug("Parameter ".$name."=".$value." is invalid"); }		}	}	/**	 * Get a where clause from a named field matching a comma separated list */	public function getWhereClause($match,$name) { $where.=" and (";		$first=true;		foreach (split(",", $match) as $value) {			if ($first) {									$first=false;								} else {				$where.=" OR ";			}			$where.=$name."='".$value."'";		}		$where.=") "; return $where; } } ?>