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

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mmetan
Posts: 17
Joined: 15 Sep 2008, 10:45

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

Post 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?
mmetan
Posts: 17
Joined: 15 Sep 2008, 10:45

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

Post by mmetan »

anyone? please... :(
jb_mantis
Posts: 63
Joined: 14 Oct 2008, 12:41
Location: Columbus, Ohio, USA

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

Post 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?
-Joe
Mantis Version: 1.1.2
Disclaimer: Answers are based on the Mantis version above and may be inaccurate for newer/older versions which may have different configuration options and/or functionality.
mmetan
Posts: 17
Joined: 15 Sep 2008, 10:45

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

Post 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
jb_mantis
Posts: 63
Joined: 14 Oct 2008, 12:41
Location: Columbus, Ohio, USA

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

Post 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.
-Joe
Mantis Version: 1.1.2
Disclaimer: Answers are based on the Mantis version above and may be inaccurate for newer/older versions which may have different configuration options and/or functionality.
Post Reply