View Issue Details

IDProjectCategoryView StatusLast Update
0019700mantisbtfilterspublic2017-01-31 04:02
ReporterfgalvisAssigned Tocproensa 
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.19 
Target Version2.1.0Fixed in Version2.1.0 
Summary0019700: Filters table on the view_all_bug_page.php shows empty lines when $g_enable_profiles is set to OFF
Description

The filters table in the view_all_bug_page.php shows the empty lines of the filters not loaded because of the config_inc.php of the profiles is set to OFF

This leaves unpleasant empty rows on the screen.

Steps To Reproduce
  1. set in config_inc.php the value $g_enable_profiles = OFF
  2. load the view_all_bug_page.php
  3. open the filters table if it is collapsed.
  4. rows 7 and 8 apears empty.
Additional Information

Ist a minor tweak but its visualy unpleasant

Solution proposal:

Change the filters_api.php where it makes the verification if the profiles are ON outside of the <tr> label

filters_php.api

line 2961
// NEW CODE START
<?php if ( ON == config_get ( 'enable_profiles' ) ) { ?>
// NEW CODE END
// OLDCODE START
<tr <?php echo "class=\"" . $t_trclass . "\"";?>>

TagsNo tags attached.

Relationships

related to 0021031 closedcproensa Rewrite the filter box form 
child of 0021935 closedcproensa Filter api refactoring, manage stored filters 

Activities

fgalvis

fgalvis

2015-05-08 16:41

reporter  

evidence.png (20,167 bytes)
evidence.png (20,167 bytes)
fgalvis

fgalvis

2015-05-08 16:43

reporter  

code.png (26,839 bytes)
code.png (26,839 bytes)
fgalvis

fgalvis

2015-05-08 16:45

reporter   ~0050721

I have managed to solve the Issue with the proposed solution.

  • Added screenshot.


evidence2.png (21,135 bytes)
evidence2.png (21,135 bytes)
dregad

dregad

2015-05-11 11:19

developer   ~0050730

This row also displays the tags filter, which you appear to have disabled; applying your fix would hide tag filtering, regardless of $g_tag_view_threshold setting. Your proposed patch can't be applied as it is.

Furthermore, instead of proposing your change as a screenshot from your code editor, it would be much better if you submitted your changes as a pull request on Github, a git patch or a unified diff.

fgalvis

fgalvis

2015-05-15 09:30

reporter   ~0050760

I know, but for now this solved the requeriments for my company (we dont use the tags), i did not made a PR because i think the report must be aproved here first.

If somenone can come up with a better solution will be nice. I think syncguru on the modern UI made progress in this matter, I will check his code.

thanks dregad.

dregad

dregad

2015-05-16 04:56

developer   ~0050763

Let us know if you come up with a better patch. And don't hesitate to submit a PR (reference this issue in it), the detailed discussion on the code can also take place on Github.

JulienR

JulienR

2015-06-23 21:40

reporter   ~0050966

<?php if( ON == config_get( 'enable_profiles' ) OR access_has_global_level( config_get( 'tag_view_threshold' ) ) ) { ?>
<tr <?php echo "class=\"" . $t_trclass . "\"";?>>
<td class="small-caption" valign="top">
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_PLATFORM;?>" id="platform_filter"><?php echo lang_get( 'platform' )?>:</a>
<?php } ?>
</td>
<td class="small-caption" valign="top">
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_OS;?>" id="os_filter"><?php echo lang_get( 'os' )?>:</a>
<?php } ?>
</td>
<td class="small-caption" valign="top">
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_OS_BUILD;?>" id="os_build_filter"><?php echo lang_get( 'os_version' )?>:</a>
<?php } ?>
</td>
<td class="small-caption" valign="top" colspan="5">
<?php if ( access_has_global_level( config_get( 'tag_view_threshold' ) ) ) { ?>
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_TAG_STRING;?>" id="tag_string_filter"><?php echo lang_get( 'tags' )?>:</a>
<?php } ?>
</td>
<?php if( $t_filter_cols > 8 ) {
echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '"> </td>';
}?>
</tr>

        <tr class="row-1">
            <?php if( ON == config_get( 'enable_profiles' ) ) { ?>
            <td class="small-caption" valign="top" id="platform_filter_target">
                <?php
                    print_multivalue_field( FILTER_PROPERTY_PLATFORM, $t_filter[FILTER_PROPERTY_PLATFORM] );
        ?>
            </td>
            <td class="small-caption" valign="top" id="os_filter_target">
                <?php
                    print_multivalue_field( FILTER_PROPERTY_OS, $t_filter[FILTER_PROPERTY_OS] );
        ?>
            </td>
            <td class="small-caption" valign="top" id="os_build_filter_target">
                <?php
                    print_multivalue_field( FILTER_PROPERTY_OS_BUILD, $t_filter[FILTER_PROPERTY_OS_BUILD] );
        ?>
            </td>
            <?php } else {?>
                <td colspan="3"> </td>
            <?php } ?>

            <td class="small-caption" valign="top" id="tag_string_filter_target" colspan="5">
                <?php
                    $t_tag_string = $t_filter[FILTER_PROPERTY_TAG_STRING];
        if( $t_filter[FILTER_PROPERTY_TAG_SELECT] != 0 && tag_exists( $t_filter[FILTER_PROPERTY_TAG_SELECT] ) ) {
            $t_tag_string .= ( is_blank( $t_tag_string ) ? '' : config_get( 'tag_separator' ) );
            $t_tag_string .= tag_get_field( $t_filter[FILTER_PROPERTY_TAG_SELECT], 'name' );
        }
        echo string_html_entities( $t_tag_string );
        echo '<input type="hidden" name="', FILTER_PROPERTY_TAG_STRING, '" value="', string_attribute( $t_tag_string ), '" />';
        ?>
            </td>
        </tr>
    <?php } ?>
dregad

dregad

2015-06-24 02:59

developer   ~0050970

JulienR,

Providing patches is highly appreciated, but please do so in a way that allows us to integrate them easily. You can do this in several ways. In the order of preference:

  1. Send us a Pull Request on our Github repository [1]
  2. Attach a GIT patch to the issue
  3. Attach a Unified Diff, clearly specifying the patch's base release

Kindly avoid to upload entire modified PHP files or random code snippets.

Please make sure that your submissions adhere to our Coding Guidelines [2], if they don't your patch might be rejected.

[1] https://github.com/mantisbt/mantisbt
[2] http://www.mantisbt.org/wiki/doku.php/mantisbt:coding_guidelines

fgalvis

fgalvis

2015-06-24 10:03

reporter   ~0050974

Please dregad close this, not going to make PR, its and old visual issue and I don't know if the 1.3 version will make changes on the layout or the css. Also the modern version of mantis from Syncguru will be used in the 2.0 version ( if i am not wrong ) so this should be adressed there.

I changed the code to include several flags in the cofiguration file ( aka config_inc.php ) to allow the users to select what parts of the filter must be shown and whatnot.

If anyone is interested in these changes you can message me in the forums.

cproensa

cproensa

2016-10-20 08:00

developer   ~0054302

track as included in PR 862

Issue History

Date Modified Username Field Change
2015-05-08 16:41 fgalvis New Issue
2015-05-08 16:41 fgalvis File Added: evidence.png
2015-05-08 16:43 fgalvis File Added: code.png
2015-05-08 16:45 fgalvis File Added: evidence2.png
2015-05-08 16:45 fgalvis Note Added: 0050721
2015-05-11 11:19 dregad Assigned To => dregad
2015-05-11 11:19 dregad Status new => assigned
2015-05-11 11:19 dregad Note Added: 0050730
2015-05-11 11:19 dregad Status assigned => feedback
2015-05-15 09:30 fgalvis Note Added: 0050760
2015-05-15 09:30 fgalvis Status feedback => assigned
2015-05-16 04:56 dregad Assigned To dregad =>
2015-05-16 04:56 dregad Status assigned => feedback
2015-05-16 04:56 dregad Note Added: 0050763
2015-06-23 21:40 JulienR Note Added: 0050966
2015-06-24 02:59 dregad Note Added: 0050970
2015-06-24 10:03 fgalvis Note Added: 0050974
2015-06-24 10:03 fgalvis Status feedback => new
2016-05-31 10:18 cproensa Relationship added related to 0017852
2016-05-31 10:25 cproensa Relationship added related to 0021031
2016-05-31 10:25 cproensa Relationship deleted related to 0017852
2016-10-20 08:00 cproensa Assigned To => cproensa
2016-10-20 08:00 cproensa Status new => assigned
2016-10-20 08:00 cproensa Note Added: 0054302
2017-01-14 17:33 cproensa Status assigned => resolved
2017-01-14 17:33 cproensa Resolution open => fixed
2017-01-14 17:33 cproensa Fixed in Version => 2.1.0
2017-01-14 17:34 cproensa Target Version => 2.1.0
2017-01-14 18:03 cproensa Relationship added child of 0021935
2017-01-31 04:02 vboctor Status resolved => closed