Page 1 of 1
How can I leave only the category name (remove "all projects
Posted: 05 Oct 2012, 14:20
by andrebbm
Good morning!
Would anyone know How can I leave only the category name (remove "all projects") on the "Report Issue"?
Gotta leave just showing the category names.
Here is a print attached.
[img]
http://img255.imagevenue.com/img.php?im ... _374lo.jpg [/ img]
Thanks for the help and hugs!
Re: How can I leave only the category name (remove "all proj
Posted: 05 Oct 2012, 20:52
by atrol
The "All Projects" shows that you are using global categories.
There is no configuration option to change this. You would have to change the source code of MantisB (function category_full_name).
If you don't need all categories for all projects you could use project specific categories instead of the globals.
Re: How can I leave only the category name (remove "all proj
Posted: 05 Oct 2012, 21:47
by andrebbm
atrol wrote:The "All Projects" shows that you are using global categories.
There is no configuration option to change this. You would have to change the source code of MantisB (function category_full_name).
If you don't need all categories for all projects you could use project specific categories instead of the globals.
Actually, I need the name does not appear "all projects" before the categories, because whoever opens the call technician uses the auto-complete text, so you can quickly filter the category name. So I would just leave the name of the category, at least in this part of the mantis. Grateful for help and hugs!
Re: How can I leave only the category name (remove "all proj
Posted: 18 Jan 2013, 21:26
by than8705
modify the for each loop in core\print_api.php
Code: Select all
foreach( $cat_arr as $t_category_row ) {
$t_category_id = $t_category_row['id'];
echo "<option value=\"$t_category_id\"";
check_selected( $p_category_id, $t_category_id );
/*************************MODIFIED 1/18/2013******************************/
//removes Project Name from category drop down on bug_report_page.php
$t_category_only_name = string_attribute( category_full_name( $t_category_id, $t_category_row['project_id'] != $t_project_id ) );
$pos = strpos($t_category_only_name, "] ");
$t_category_only_name = substr($t_category_only_name, $pos+2);
echo '>' . $t_category_only_name . '</option>';
/*********************END MODIFICATIONS ******************************/
//original echo command
//echo '>' . string_attribute( category_full_name( $t_category_id, $t_category_row['project_id'] != $t_project_id ) ) . '</option>';
}
Re: How can I leave only the category name (remove "all proj
Posted: 18 Jun 2013, 19:22
by orfeonhn
You can use parameter:
/**
* shows project '[project] category' when 'All Projects' is selected
* otherwise only 'category name'
* @global int $g_summary_category_include_project
*/
$g_summary_category_include_project = OFF;
Just add it in config_inc.php
Re: How can I leave only the category name (remove "all proj
Posted: 19 Jun 2013, 07:31
by atrol
orfeonhn wrote:
$g_summary_category_include_project = OFF;
Just add it in config_inc.php
a) You don't have to put any option in config_inc.php if you don't want to change the default value.
The default of $g_summary_category_include_project is set in config_defaults_inc.php and is set to OFF
b) The question was
andrebbm wrote:
Would anyone know How can I leave only the category name (remove "all projects") on the "Report Issue"?
The option $g_summary_category_include_project does not affect the "Report Issue" page
Re: How can I leave only the category name (remove "all proj
Posted: 17 Jun 2014, 13:25
by atef
the solution by than8705 works fine
Re: How can I leave only the category name (remove "all proj
Posted: 18 Aug 2014, 07:30
by testuser1
than8705 wrote:modify the for each loop in core\print_api.php
This solution is working perfect. thanks "than8705"
