How to hide a status from the status percentage bar

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
allan
Posts: 11
Joined: 11 May 2007, 12:30
Location: Campinas, SP - Brazil

How to hide a status from the status percentage bar

Post by allan »

My goal is to hide the status "closed" from the percentage legend, because most of the issues are closed (more then 80%) and I want to get a clear picture of the open issues.

I've achieved this by modifying the function html_status_percentage_legend() in the file \core\html_api.php.
Unfortunately I didn't find a way to to this by using custom functions, so I had to modify the original file.

Is that simple: on that function just replace the the code below:

Code: Select all

$query = "SELECT status, COUNT(*) AS number
		FROM $t_mantis_bug_table
		WHERE $t_specific_where
		GROUP BY status";
by

Code: Select all

$query = "SELECT status, COUNT(*) AS number
		FROM $t_mantis_bug_table
		WHERE $t_specific_where and status <> 90
		GROUP BY status";
If you want to hide other status, put "and status not in (st1, st2, st3...)" where stn is the status code you wanto to hide.
It's not the best way, but it works...

Bye
=======================
Allan Herbert Medeiros
allan.medeiros@transdatasmart.com.br
Transdata Smart Automation Services
http://www.transdatasmart.com.br
Campinas, SP - Brazil
Post Reply