View Issue Details

IDProjectCategoryView StatusLast Update
0019700mantisbtfilterspublic2017-01-31 04:02
Reporterfgalvis Assigned 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.
Attached Files
evidence.png (20,167 bytes)   
evidence.png (20,167 bytes)   
code.png (26,839 bytes)   
code.png (26,839 bytes)   

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: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>

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

            &lt;td class=&quot;small-caption&quot; valign=&quot;top&quot; id=&quot;tag_string_filter_target&quot; colspan=&quot;5&quot;>
                &lt;?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 '&lt;input type=&quot;hidden&quot; name=&quot;', FILTER_PROPERTY_TAG_STRING, '&quot; value=&quot;', string_attribute( $t_tag_string ), '&quot; />';
        ?>
            &lt;/td>
        &lt;/tr>
    &lt;?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