issues_rss extended with with version filtering

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
marco.wobben
Posts: 4
Joined: 08 Jan 2016, 08:47

issues_rss extended with with version filtering

Post by marco.wobben »

Want support for "version=..." in the issues_rss.php similar to the support in change_log.php? Please follow the next few instructions:

Open issues_rss.php in your editor and search for these lines:

Code: Select all

$f_project_id = gpc_get_int( 'project_id', ALL_PROJECTS );
$f_filter_id = gpc_get_int( 'filter_id', 0 );
$f_sort = gpc_get_string( 'sort', 'submit' );
$f_username = gpc_get_string( 'username', null );
$f_key = gpc_get_string( 'key', null );
And add the following line to that:

Code: Select all

$f_version_name = gpc_get_string( 'version', null );
Next find the following line:

Code: Select all

		$t_rssfile->addRSSItem( $t_about, $t_title, $t_link, $t_description, $t_subject, $t_date,
							$t_author, $t_comments, $t_image );
And make sure it is adjusted as such:

Code: Select all

	if (($f_version_name == null) || ($t_bug->fixed_in_version == $f_version_name)) {
		$t_rssfile->addRSSItem( $t_about, $t_title, $t_link, $t_description, $t_subject, $t_date,
							$t_author, $t_comments, $t_image );
	}
And you're done. You may now use the url to receive a project (and optional version) specific rss feed:

Code: Select all

http://mymantisdomain/issues_rss.php?project_id=999&version=3.2.1
Post Reply