Remove Relationships field from view/update bug pages
Moderators: Developer, Contributor
Remove Relationships field from view/update bug pages
I want to remove the Relationships field from the View and Update bug pages. I tried to find the enumeration that responsible for turning on/off the Relationships field in config_defaults_inc.php but I couldn't find it. Does anyone know how to hide the Relationships field?
Re: Remove Relationships field from view/update bug pages
I would like to ask the same question. How to hide relationships section from view/update bug page?
Re: Remove Relationships field from view/update bug pages
There is no way to disable this by normal customization, so you would have to change the code.
If you use MantisBt version 1.2.1 this can be done by changing the file bug_view_inc.php
Just comment out line 696 by adding at # at the beginning of the line
# relationship_view_box ( $tpl_bug->id );
If you use MantisBt version 1.2.1 this can be done by changing the file bug_view_inc.php
Just comment out line 696 by adding at # at the beginning of the line
# relationship_view_box ( $tpl_bug->id );
Re: Remove Relationships field from view/update bug pages
Thank you!
Our Mantis will be clear and simple soon, just the last question about hiding something (I promise!): we have only one project (it won't change) and I would like to hide obselete buttons "clone", "move" and also "stick". Is there any trick?
Our Mantis will be clear and simple soon, just the last question about hiding something (I promise!): we have only one project (it won't change) and I would like to hide obselete buttons "clone", "move" and also "stick". Is there any trick?
Re: Remove Relationships field from view/update bug pages
I agree that "move" is obsolet if you have just one project.
"clone" is a nice convenience feature if you have an issue which is nearly the same as an existing one,I would not remove it.
"stick" is also not dependant on having one or more project
Nethertheless if you want it, comment out the following lines in file core/html_api.php
Ok, now you have a MantisBT with modifications of sourcecode.
Be aware, that all your changes will be lost, if you will update to a newer version.
You have to change the code again manually, especially if the files you changed are also changed in standard MantisBT.
"clone" is a nice convenience feature if you have an issue which is nearly the same as an existing one,I would not remove it.
"stick" is also not dependant on having one or more project
Nethertheless if you want it, comment out the following lines in file core/html_api.php
Code: Select all
# STICK/UNSTICK button
if ( access_has_bug_level( $t_sticky, $p_bug_id ) ) {
echo '<td class="center">';
if ( !bug_get_field( $p_bug_id, 'sticky' ) ) {
html_button_bug_stick( $p_bug_id );
} else {
html_button_bug_unstick( $p_bug_id );
}
echo '</td>';
}
if( !$t_readonly ) {
# CREATE CHILD button
echo '<td class="center">';
html_button_bug_create_child( $p_bug_id );
echo '</td>';
}
# MOVE button
echo '<td class="center">';
html_button_bug_move( $p_bug_id );
echo '</td>';
Be aware, that all your changes will be lost, if you will update to a newer version.
You have to change the code again manually, especially if the files you changed are also changed in standard MantisBT.
Re: Remove Relationships field from view/update bug pages
Following Flag will hide the Sticky Button.
$g_set_bug_sticky_threshold = NOBODY;
But how can I hide the Clone Button?
$g_set_bug_sticky_threshold = NOBODY;
But how can I hide the Clone Button?
Re: Remove Relationships field from view/update bug pages
Phileas, thank you for providing this information, I overlooked this
@vida
to get what you want, ignore my previous post, you have to add the following lines to your config_inc.php
To remove the clone button, there you have to change sourcecode of core/html_api.php
from
to
@vida
to get what you want, ignore my previous post, you have to add the following lines to your config_inc.php
Code: Select all
$g_move_bug_threshold = NOBODY;
$g_set_bug_sticky_threshold = NOBODY;
from
Code: Select all
if( !$t_readonly ) {
# CREATE CHILD button
echo '<td class="center">';
html_button_bug_create_child( $p_bug_id );
echo '</td>';
}
Code: Select all
# if( !$t_readonly ) {
# # CREATE CHILD button
# echo '<td class="center">';
# html_button_bug_create_child( $p_bug_id );
# echo '</td>';
# }
Re: Remove Relationships field from view/update bug pages
Just thought i would post an update to removing the clone button,
It's no longer located in core/html_api.php, instead it's in the bug_view_inc.php file.
So now you have to make these changes in the bug_view_inc.php file:
from
to
It's no longer located in core/html_api.php, instead it's in the bug_view_inc.php file.
So now you have to make these changes in the bug_view_inc.php file:
from
Code: Select all
# CLONE button
if( $p_flags['can_clone'] ) {
echo '<div class="pull-left padding-right-2">';
html_button( string_get_bug_report_url(), lang_get( 'create_child_bug_button' ), array( 'm_id' => $p_bug_id ) );
echo '</div>';
}
Code: Select all
# CLONE button
#if( $p_flags['can_clone'] ) {
# echo '<div class="pull-left padding-right-2">';
# html_button( string_get_bug_report_url(), lang_get( 'create_child_bug_button' ), array( 'm_id' => $p_bug_id ) );
# echo '</div>';
#}