View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004031 | mantisbt | bugtracker | public | 2004-07-08 05:52 | 2004-08-29 02:27 |
Reporter | grangeway | Assigned To | thraxisp | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.19.0rc1 | ||||
Summary | 0004031: Hiding/removing fixed_in_versions | ||||
Description | For projects that do not use fixed_in_verison, or would like to use a date/build number of some other string or custom field, it should be possible to remove the fixed in version field from the db schema. For a project that does not support a version, the ability to not import the fixed_in_version field would save 4 bytes + size of index per bug. | ||||
Tags | No tags attached. | ||||
Attached Files | suppress_version.diff (5,065 bytes)
Index: bug_report_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_report_advanced_page.php,v retrieving revision 1.36 diff -r1.36 bug_report_advanced_page.php 200a201,206 > <?php > $t_show_version = ( ON == config_get( 'show_product_version' ) ) > || ( ( AUTO == config_get( 'show_product_version' ) ) > && ( count( version_get_all_rows( $t_project_id ) ) > 0 ) ); > if ( $t_show_version ) { > ?> 212c218,220 < --- > <?php > } > ?> Index: bug_report_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_report_page.php,v retrieving revision 1.38 diff -r1.38 bug_report_page.php 134c134,139 < --- > <?php > $t_show_version = ( ON == config_get( 'show_product_version' ) ) > || ( ( AUTO == config_get( 'show_product_version' ) ) > && ( count( version_get_all_rows( $t_project_id ) ) > 0 ) ); > if ( $t_show_version ) { > ?> 145a151,153 > <?php > } > ?> Index: bug_update_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_update_advanced_page.php,v retrieving revision 1.69 diff -r1.69 bug_update_advanced_page.php 284a285 > <!-- Fixed in Version --> 286c287,294 < <?php echo lang_get( 'fixed_in_version' ) ?> --- > <?php > $t_show_version = ( ON == config_get( 'show_product_version' ) ) > || ( ( AUTO == config_get( 'show_product_version' ) ) > && ( count( version_get_all_rows( $t_bug->project_id ) ) > 0 ) ); > if ( $t_show_version ) { > echo lang_get( 'fixed_in_version' ); > } > ?> 288a297,299 > <?php > if ( $t_show_version ) { > ?> 291a303,305 > <?php > } > ?> 294c308 < <!-- Product Version --> --- > <!-- Product Version or Product Build, if version is suppressed --> 296c310,316 < <?php echo lang_get( 'product_version' ) ?> --- > <?php > if ( $t_show_version ) { > echo lang_get( 'product_version' ); > }else{ > echo lang_get( 'build' ); > } > ?> 298a319,321 > <?php > if ( $t_show_version ) { > ?> 301a325,332 > <?php > }else{ > ?> > <input type="text" name="build" size="16" maxlength="32" value="<?php echo $t_bug->build ?>" /> > <?php > } > ?> > 305a337,339 > <?php > if ( $t_show_version ) { > ?> 320a355,357 > <?php > } > ?> Index: bug_update_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_update_page.php,v retrieving revision 1.70 diff -r1.70 bug_update_page.php 239c239,244 < --- > <?php > $t_show_version = ( ON == config_get( 'show_product_version' ) ) > || ( ( AUTO == config_get( 'show_product_version' ) ) > && ( count( version_get_all_rows( $t_project_id ) ) > 0 ) ); > if ( $t_show_version ) { > ?> 250a256,258 > <?php > } > ?> Index: bug_view_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_view_advanced_page.php,v retrieving revision 1.54 diff -r1.54 bug_view_advanced_page.php 282c282 < <!-- spacer --> --- > <!-- fixed in version --> 284c284,291 < <?php echo lang_get( 'fixed_in_version' ); ?> --- > <?php > $t_show_version = ( ON == config_get( 'show_product_version' ) ) > || ( ( AUTO == config_get( 'show_product_version' ) ) > && ( count( version_get_all_rows( $t_bug->project_id ) ) > 0 ) ); > if ( $t_show_version ) { > echo lang_get( 'fixed_in_version' ); > } > ?> 287c294,298 < <?php echo $t_bug->fixed_in_version ?> --- > <?php > if ( $t_show_version ) { > echo $t_bug->fixed_in_version; > } > ?> 290c301 < <!-- Product Version --> --- > <!-- Product Version or Product Build, if version is suppressed --> 292c303,309 < <?php echo lang_get( 'product_version' ) ?> --- > <?php > if ( $t_show_version ) { > echo lang_get( 'product_version' ); > }else{ > echo lang_get( 'product_build' ); > } > ?> 295c312,318 < <?php echo $t_bug->version ?> --- > <?php > if ( $t_show_version ) { > echo $t_bug->version; > }else{ > echo $t_bug->build; > } > ?> 300c323,325 < --- > <?php > if( $t_show_version ) { > ?> 315c340,342 < --- > <?php > } > ?> Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v retrieving revision 1.173 diff -r1.173 config_defaults_inc.php 343a344,349 > # --- show product versions in create, view and update screens > # ON forces display even if none are defined > # OFF suppresses display > # AUTO suppresses the display if there are no versions defined for the project > $g_show_product_version = AUTO; > Index: core/constant_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/constant_inc.php,v retrieving revision 1.18 diff -r1.18 constant_inc.php 18a19 > define( 'AUTO', 3 ); | ||||
I don't think the some extra bytes per issue is a problem. However, I agree that some projects may not want to see it. I can see two solutions for this:
|
|
I'll fix this. I'll add a configuration variable $g_hide_empty_version to control it. The fixed in version, found in version, and production build will be hidden in the bug view, bug create, and bug update pages. |
|
I think we can only hide Product Version / Fixed In Version since they are combo-boxes. However, with regards to the build, the user may want to keep it since users can enter any values. For example, date of use on website, or the version (if the user doesn't want to maintain a version list). Also do we really need a config for this? If we do, should it be $g_show_product_version which can be ON / OFF / AUTO, with default set to AUTO? We should clearly document that this affects both product version and fixed in version. What do you think? I can't spend too much time thinking at the moment :) |
|
Sounds good. AUTO would imply hide them if they are no versions defined. I agree on the build field. |
|
The patch (.diff) is attached, as well as a tarball with the changed files. These include bug_report_advanced_page.php bug_report_page.php bug_update_advanced_page.php bug_update_page.php bug_view_advanced_page.php config_defaults_inc.php core/constant_inc.php. Note that some of the changed files also have my patches for NIS and workflow in them. |
|
Clean files have been uploaded again (suppress_version.tar.gz). The diff was correct. |
|
patch applied to CVS |
|