Page 1 of 1

Changed the severity values.. how to make some of them bold?

Posted: 13 Oct 2008, 10:50
by mmetan
Hi!

Using mantis 1.1.2 and changed the severity values as '10:defficiency,20:defect'.
It successfully shows the severiies where i ve already updated the DB. but i cannot find the look and feel variable for severity values. Mantis automaticallly shows the severity text bold if the value is greater or equal to 60. But i dont have the value 60 now. i ve only 10 and 20 and none of them is bold. I want the value 20 to be shown as bold on view_all_bugs.php. Where to edit them?

Re: Changed the severity values.. how to make some of them bold?

Posted: 16 Oct 2008, 07:53
by mmetan
anyone? please... :(

Re: Changed the severity values.. how to make some of them bold?

Posted: 17 Oct 2008, 18:15
by jb_mantis
I searched the config_defaults_inc.php file and found no variable to control this.
If you search hard enough, you can probably find the code where the logic is determining whether to bold it or not.
Instead of using 10 and 20, why not use 10 and 60 instead?

Re: Changed the severity values.. how to make some of them bold?

Posted: 23 Oct 2008, 07:51
by mmetan
jb_mantis wrote:I searched the config_defaults_inc.php file and found no variable to control this.
If you search hard enough, you can probably find the code where the logic is determining whether to bold it or not.
Instead of using 10 and 20, why not use 10 and 60 instead?
I cant user 10 and 60 instead because that would effect the metric data dangerously for the projects :(

I ve searched almost all the related files :( i guess i ve to write a script by myself :(

cheers anyway...

adios

Re: Changed the severity values.. how to make some of them bold?

Posted: 24 Oct 2008, 12:43
by jb_mantis
I think I found what you are looking for, though it will require a direct code change to implement.

You are looking for the print_formatted_priority_string function in the mantis/core/print_api.php file.
here is the code:

Code: Select all

        # --------------------
        # formats the priority given the status
        # shows the priority in BOLD if the bug is NOT closed and is of significant priority
        function print_formatted_priority_string( $p_status, $p_priority ) {
                $t_pri_str = get_enum_element( 'priority', $p_priority );

                if ( ( HIGH <= $p_priority ) &&
                         ( CLOSED != $p_status ) ) {
                        PRINT "<span class=\"bold\">$t_pri_str</span>";
                } else {
                        PRINT $t_pri_str;
                }
        }
You can replace HIGH with a priority, or even better, a variable you can update if you want to change it later.
You may want to submit a feature request to have it replaced with a variable in the future.
Hope you see this before you spend too much time on a script.