Mantis Logo
Mantis Manual
Manual
Configuration

Database
Path
Webserver
Version
Email
Language
Display
Time
JpGraph
Date
News
Default Preferences
Summary
Bugnote
File Upload
HTML
Authentication
Status Settings
Filters
Misc
Colors
Cookies
Database Tables
Speed Optimisation
Reminders
Bug History
Sponsorship
Source Control Integration
Custom Fields
My View Settings
Relationships
System Logging


Partner Links


My View Settings
Last Modified: December 12, 2004 09:12AM
(Introduced in 0.19.0)
Description



$g_my_view_boxes This is an array of values defining the order that the boxes to be shown. A box that is not to be shown can have its value set to 0. The default is:
$g_my_view_boxes = array ( 'assigned' => '1', 'unassigned' => '2', 'reported' => '3', 'resolved' => '4', 'recent_mod' => '5', 'monitored' => '6' );
If you want to change the definition, copy the default value and apply the changes.
$g_my_view_bug_count Number of bugs shown in each box. The default is 10.
$g_default_home_page Default page to transfer to after Login or Set Project. The default is 'my_view_page.php'. An alternative would be 'view_all_bugs_page.php' or 'main_page.php'.


User Contributed Notes
My View Settings
Add Notes About Notes
anselm_heaton@yahoo.com
06-Oct-2004 5:48
#225
It is fairly simple to add custom box views in Mantis 0.19.

Say you want to add a view which contains bugs of the category 'UI' which are assigned to the current user. Internally, we'll call this box view 'ass_ui'.

1. First, edit core/my_view_inc.php
---
   Find where the filters are defined, (where all the $c_filter arrays
   are assigned - starts on line 37 in Mantis 0.19) and add a new one
   like such [1] :

$c_filter['ass_ui'] = array(
 'show_category' => Array ( '0' => 'UI' ),
 'show_severity' => Array ( '0' => 'any' ),
 'show_status' => Array ( '0' => 'any' ),
 'highlight_changed' => $t_default_show_changed,
 'reporter_id' => Array ( '0' => 'any' ),
 'handler_id' => Array ( '0' => $t_current_user_id ),
 'show_resolution' => Array ( '0' => 'any' ),
 'show_build' => Array ( '0' => 'any' ),
 'show_version' => Array ( '0' => 'any' ),
 'hide_status' => Array ( '0' => $t_bug_resolved_status_threshold ),
 'user_monitor' => Array ( '0' => 'any' )
);
$url_link_parameters['ass_ui'] = 'handler_id=' . $t_current_user_id . '&hide_status=' . $t_bug_resolved_status_threshold . '&show_category[]=UI';

2. Edit lang/strings_english.txt
---
   Find the line :
# my_view_page.php

   and add the following:
$s_my_view_title_ass_ui = 'My UI Bugs';

3. Edit config_inc.php
---
   Change the $g_my_view_boxes array to add 'ass_ui' :
$g_my_view_boxes = array(
 'ass_ui' => '1',
  ...);



You're done !
Anselm

[1] You can also add custom fields to the filter. Use the following
syntax:
'custom_fields' => Array('<your customfield id>' => Array( '0' => '<your value'>;))
emartinho@epsdirect.pt
11-Feb-2005 12:40
#351
Will these changes need to be reapplied after upgrades of Mantis?

Thanks.

-Elio
ohmless@web.de
07-Oct-2005 4:46
#640
I use Mantis Version 1.0.0rc2 and changed a lot of things...

I do not auto-assign new bugs to a person. To assign new bugs to people who are responsible for fixing it, that´s the job of our Manager.
So I wanted that only all users with the access_level MANAGER or higher see on their login_page (my_view_page.php) the bugs which are not assigned to anybody.

1
Make sure that in the file /config_inc.php in the var $g_my_view_boxes 'unassigned' is activated.
Example:
$g_my_view_boxes = array ('assigned' => '1',
                          'unassigned' => '2',
                          'reported' => '0',
                          'resolved' => '0',
                          'recent_mod' => '0',
                          'monitored' => '0',
                          'feedback' => '0',
                          'verify' => '0');

In the same file (/config_inc.php) add a new unique global var:
# controls which access-levels see the unassigned bugs
$g_my_view_unassigned_threshold = MANAGER;


2
In the file /my_view_page.php near line 80 between
'else if ( $t_box_title == 'assigned' && ..... { ... }'
and
'else if ( $t_box_title == 'monitored' && ..... { ... }'
add a new 'else if'-condition.

My Example:
...
## show only for the Users with 'g_my_view_unassigned_threshold
else if ( $t_box_title == 'unassigned' && ( current_user_is_anonymous() OR !access_has_project_level( config_get( 'my_view_unassigned_threshold' ), $t_project_id, $t_current_user_id ) ) )
{
$t_number_of_boxes = $t_number_of_boxes - 1;
}


It works fine. Only with one exception. Our testers see now the 'Assigned to Me'-box not only on the left side of the screen. It goes from the left to the right side.
With the appearance of more boxes than the 'Assigned to Me'-box, this problem doesn´t appear.

My experience in php is very very low, so I don´t know wheter that´s all correct, but it works. ;)
I suppose that in the next update, the file /config_inc.php can be taken over.
The changes in the file /my_view_page.php will will have to be done again and it´s not sure that it works again.

Hope I could help someone. Thank you for Mantis !!!
MfG **micha**
frescard@gmail.com
24-Feb-2006 16:14
#905
To change the sort order of the boxes, go to the $c_filter assignment section (like anselm listed in his first post), and add a line like this

'sort' => 'severity'

So, the section for the 'assigned' list would look like this afterwards:

$c_filter['assigned'] = array(
'show_category' => Array ( '0' => META_FILTER_ANY ),
'show_severity' => Array ( '0' => META_FILTER_ANY ),
'show_status' => Array ( '0' => META_FILTER_ANY ),
'highlight_changed' => $t_default_show_changed,
'reporter_id' => Array ( '0' => META_FILTER_ANY ),
'handler_id' => Array ( '0' => $t_current_user_id ),
'show_resolution' => Array ( '0' => META_FILTER_ANY ),
'show_build' => Array ( '0' => META_FILTER_ANY ),
'show_version' => Array ( '0' => META_FILTER_ANY ),
'hide_status' => Array ( '0' => $t_bug_resolved_status_threshold ),
'user_monitor' => Array ( '0' => META_FILTER_ANY ),
'sort' => 'severity'
);

Other sort criteria are 'id', 'category', 'date_submitted', 'last_updated', 'priority', etc. (probably all the fields from mantis_bug_table in admin\schema.php)
kira.fernandes@gmail.com
04-May-2006 15:59
#1051
I'm having trouble creating a filter on the my_view_page.php that filters on a custom field.

I have a field called Unit Tester that contains the name of the developer that tested the code.

1. I've modified config_inc.php to add a new view box:

Code:
   $g_my_view_boxes = array (
      'assigned' => '1',
      'unassigned' => '2',
      'reported' => '3',
      'resolved' => '4',
      'recent_mod' => '5',
      'monitored' => '6',
      'feedback' => '0',
      'verify' => '0',
      'ready_test' => '7',
   ;);

2. I added the title text to custom_strings_inc.php

Code:
$s_my_view_title_ready_test = "Waiting For Me To Unit Test";


The part I'm having trouble with is changing core/my_view_inc.php. Initially I tried

Code:
   $c_filter['ready_test'] = array(
      'custom_Unit Tester' => Array('0' => $t_current_user_id),
      'show_category' => Array ( '0' => META_FILTER_ANY ),
      'show_severity' => Array ( '0' => META_FILTER_ANY ),
      'show_status' => Array ( '0' => META_FILTER_ANY ),
      'highlight_changed' => $t_default_show_changed,
      'reporter_id' => Array ( '0' => META_FILTER_ANY ),
      'handler_id' => Array ( '0' => META_FILTER_ANY ),
      'show_resolution' => Array ( '0' => META_FILTER_ANY ),
      'show_build' => Array ( '0' => META_FILTER_ANY ),
      'show_version' => Array ( '0' => META_FILTER_ANY ),
      'hide_status' => Array ( '0' => $t_hide_status_default ),
      'user_monitor' => Array ( '0' => META_FILTER_ANY ),
   ;);
   $url_link_parameters['ready_test'] = 'custom_Unit Tester=' . $t_current_user_id;

I also tried substituting "Unit Tester" for "custom_Unit Tester" but it didn't work.

After searching I saw note 225 in and attempted:

Code:
   $c_filter['ready_test'] = array(
      'custom_fields' => Array('custom_Unit Tester' => Array( '0' => $t_current_user_id)),
      'show_category' => Array ( '0' => META_FILTER_ANY ),
      'show_severity' => Array ( '0' => META_FILTER_ANY ),
      'show_status' => Array ( '0' => META_FILTER_ANY ),
      'highlight_changed' => $t_default_show_changed,
      'reporter_id' => Array ( '0' => META_FILTER_ANY ),
      'handler_id' => Array ( '0' => META_FILTER_ANY ),
      'show_resolution' => Array ( '0' => META_FILTER_ANY ),
      'show_build' => Array ( '0' => META_FILTER_ANY ),
      'show_version' => Array ( '0' => META_FILTER_ANY ),
      'hide_status' => Array ( '0' => $t_hide_status_default ),
      'user_monitor' => Array ( '0' => META_FILTER_ANY ),
   ;);
   $url_link_parameters['ready_test'] = 'custom_unit tester=' . $t_current_user_id;

I tried substituting "Unit Tester" for "custom_Unit Tester" for this too but still no luck.

Do you know what I'm doing wrong?

Thanks,
Kira (kira.fernandes@gmail.com)
kira.fernandes@gmail.com
04-May-2006 16:01
#1053
I'm having trouble creating a filter on the my_view_page.php that filters on a custom field.

I have a field called Unit Tester that contains the name of the developer that tested the code.

1. I've modified config_inc.php to add a new view box:

Code:
   $g_my_view_boxes = array (
      'assigned' => '1',
      'unassigned' => '2',
      'reported' => '3',
      'resolved' => '4',
      'recent_mod' => '5',
      'monitored' => '6',
      'feedback' => '0',
      'verify' => '0',
      'ready_test' => '7',
   ;);

2. I added the title text to custom_strings_inc.php

Code:
$s_my_view_title_ready_test = "Waiting For Me To Unit Test";


The part I'm having trouble with is changing core/my_view_inc.php. Initially I tried

Code:
   $c_filter['ready_test'] = array(
      'custom_Unit Tester' => Array('0' => $t_current_user_id),
      'show_category' => Array ( '0' => META_FILTER_ANY ),
      'show_severity' => Array ( '0' => META_FILTER_ANY ),
      'show_status' => Array ( '0' => META_FILTER_ANY ),
      'highlight_changed' => $t_default_show_changed,
      'reporter_id' => Array ( '0' => META_FILTER_ANY ),
      'handler_id' => Array ( '0' => META_FILTER_ANY ),
      'show_resolution' => Array ( '0' => META_FILTER_ANY ),
      'show_build' => Array ( '0' => META_FILTER_ANY ),
      'show_version' => Array ( '0' => META_FILTER_ANY ),
      'hide_status' => Array ( '0' => $t_hide_status_default ),
      'user_monitor' => Array ( '0' => META_FILTER_ANY ),
   ;);
   $url_link_parameters['ready_test'] = 'custom_Unit Tester=' . $t_current_user_id;

I also tried substituting "Unit Tester" for "custom_Unit Tester" but it didn't work.
kira.fernandes@gmail.com
04-May-2006 16:02
#1054
I'm having trouble creating a filter on the my_view_page.php that filters on a custom field.

I have a field called Unit Tester that contains the name of the developer that tested the code.

1. I've modified config_inc.php to add a new view box:

Code:
   $g_my_view_boxes = array (
      'assigned' => '1',
      'unassigned' => '2',
      'reported' => '3',
      'resolved' => '4',
      'recent_mod' => '5',
      'monitored' => '6',
      'feedback' => '0',
      'verify' => '0',
      'ready_test' => '7',
   ;);

2. I added the title text to custom_strings_inc.php

Code:
$s_my_view_title_ready_test = "Waiting For Me To Unit Test";


The part I'm having trouble with is changing core/my_view_inc.php.
kira.fernandes@NOSPAMgmail.com
04-May-2006 16:04
#1055
I'm having trouble creating a filter on the my_view_page.php that filters on a custom field.

I have a field called Unit Tester that contains the name of the developer that tested the code.

1. I've modified config_inc.php to add a new view box:

Code:
   $g_my_view_boxes = array (
      'assigned' => '1',
      'unassigned' => '2',
      'reported' => '3',
      'resolved' => '4',
      'recent_mod' => '5',
      'monitored' => '6',
      'feedback' => '0',
      'verify' => '0',
      'ready_test' => '7',
   ;);

2. I added the title text to custom_strings_inc.php

Code:
$s_my_view_title_ready_test = "Waiting For Me To Unit Test";


The part I'm having trouble with is changing core/my_view_inc.php. Initially I tried

Code:
   $c_filter['ready_test'] = array(
      'custom_Unit Tester' => Array('0' => $t_current_user_id),
      'show_category' => Array ( '0' => META_FILTER_ANY ),
      'show_severity' => Array ( '0' => META_FILTER_ANY ),
      'show_status' => Array ( '0' => META_FILTER_ANY ),
      'highlight_changed' => $t_default_show_changed,
      'reporter_id' => Array ( '0' => META_FILTER_ANY ),
      'handler_id' => Array ( '0' => META_FILTER_ANY ),
      'show_resolution' => Array ( '0' => META_FILTER_ANY ),
      'show_build' => Array ( '0' => META_FILTER_ANY ),
      'show_version' => Array ( '0' => META_FILTER_ANY ),
      'hide_status' => Array ( '0' => $t_hide_status_default ),
      'user_monitor' => Array ( '0' => META_FILTER_ANY ),
   ;);
   $url_link_parameters['ready_test'] = 'custom_Unit Tester=' . $t_current_user_id;

I also tried substituting "Unit Tester" for "custom_Unit Tester" but it didn't work.

After searching I saw note 225 in and attempted:

Code:
   $c_filter['ready_test'] = array(
      'custom_fields' => Array('custom_Unit Tester' => Array( '0' => $t_current_user_id)),
      'show_category' => Array ( '0' => META_FILTER_ANY ),
      'show_severity' => Array ( '0' => META_FILTER_ANY ),
      'show_status' => Array ( '0' => META_FILTER_ANY ),
      'highlight_changed' => $t_default_show_changed,
      'reporter_id' => Array ( '0' => META_FILTER_ANY ),
      'handler_id' => Array ( '0' => META_FILTER_ANY ),
      'show_resolution' => Array ( '0' => META_FILTER_ANY ),
      'show_build' => Array ( '0' => META_FILTER_ANY ),
      'show_version' => Array ( '0' => META_FILTER_ANY ),
      'hide_status' => Array ( '0' => $t_hide_status_default ),
      'user_monitor' => Array ( '0' => META_FILTER_ANY ),
   ;);
   $url_link_parameters['ready_test'] = 'custom_unit tester=' . $t_current_user_id;

I tried substituting "Unit Tester" for "custom_Unit Tester" for this too but still no luck.

Do you know what I'm doing wrong?

Thanks,
Kira
kira.fernandes@NOSPAMgmail.com
04-May-2006 16:05
#1056
I'm having trouble creating a filter on the my_view_page.php that filters on a custom field.

I have a field called Unit Tester that contains the name of the developer that tested the code.

1. I've modified config_inc.php to add a new view box:

Code:
   $g_my_view_boxes = array (
      'assigned' => '1',
      'unassigned' => '2',
      'reported' => '3',
      'resolved' => '4',
      'recent_mod' => '5',
      'monitored' => '6',
      'feedback' => '0',
      'verify' => '0',
      'ready_test' => '7',
   ;);

2. I added the title text to custom_strings_inc.php

Code:
$s_my_view_title_ready_test = "Waiting For Me To Unit Test";


The part I'm having trouble with is changing core/my_view_inc.php. Initially I tried

Code:
   $c_filter['ready_test'] = array(
      'custom_Unit Tester' => Array('0' => $t_current_user_id),
      'show_category' => Array ( '0' => META_FILTER_ANY ),
      'show_severity' => Array ( '0' => META_FILTER_ANY ),
      'show_status' => Array ( '0' => META_FILTER_ANY ),
      'highlight_changed' => $t_default_show_changed,
      'reporter_id' => Array ( '0' => META_FILTER_ANY ),
      'handler_id' => Array ( '0' => META_FILTER_ANY ),
      'show_resolution' => Array ( '0' => META_FILTER_ANY ),
      'show_build' => Array ( '0' => META_FILTER_ANY ),
      'show_version' => Array ( '0' => META_FILTER_ANY ),
      'hide_status' => Array ( '0' => $t_hide_status_default ),
      'user_monitor' => Array ( '0' => META_FILTER_ANY ),
   ;);
   $url_link_parameters['ready_test'] = 'custom_Unit Tester=' . $t_current_user_id;

I also tried substituting "Unit Tester" for "custom_Unit Tester" but it didn't work.

After searching I saw note 225 in and attempted:

Code:
   $c_filter['ready_test'] = array(
      'custom_fields' => Array('custom_Unit Tester' => Array( '0' => $t_current_user_id)),
      'show_category' => Array ( '0' => META_FILTER_ANY ),
      'show_severity' => Array ( '0' => META_FILTER_ANY ),
      'show_status' => Array ( '0' => META_FILTER_ANY ),
      'highlight_changed' => $t_default_show_changed,
      'reporter_id' => Array ( '0' => META_FILTER_ANY ),
      'handler_id' => Array ( '0' => META_FILTER_ANY ),
      'show_resolution' => Array ( '0' => META_FILTER_ANY ),
      'show_build' => Array ( '0' => META_FILTER_ANY ),
      'show_version' => Array ( '0' => META_FILTER_ANY ),
      'hide_status' => Array ( '0' => $t_hide_status_default ),
      'user_monitor' => Array ( '0' => META_FILTER_ANY ),
   ;);
   $url_link_parameters['ready_test'] = 'custom_unit tester=' . $t_current_user_id;

I tried substituting "Unit Tester" for "custom_Unit Tester" for this too but still no luck.

Do you know what I'm doing wrong?

Thanks,
Kira
carsten.metzler@NOSPAMl-bank.de
14-Jun-2006 8:12
#1136
I want to create a filter, that gives me all problems with status ASSIGNED, CONFIRMED or FEEDBACK. Is it possible to put more than one status into the filter parameter "show_status"?
Add Notes About Notes
Last updated: Sat, 17 May 2008 - 4:18:34

Mantis @ SourceForge