View Issue Details

IDProjectCategoryView StatusLast Update
0021688mantisbtfilterspublic2016-09-12 12:57
ReporterMr.Bricodage Assigned Toatrol  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionwon't fix 
Product Version1.3.1 
Summary0021688: View All Bugs - Use "Highlight changed" in filter table to filter bugs
Description

Hello,

the "Highlight Changed" condition in filter pane is used to show last_updated date of each bug with bold characters in bugs table.

My users want to use the "Highlight Changed" information to filter bugs, as any other entry in filter table.

Our main usecase : we use Export (CSV and Excel) provided above table results and applied only to filtered bugs. If we want to export bugs that have been modified in the last 24 hours, we can't do it without custom dev.

The provided modification allow to switch between highlight and filter mode using "Highlight Changed" field. These modifications has been done on Mantis 1.2.17, but I can provide a PR on 1.3 branch if this feature request is accepted.

Steps To Reproduce

Just use "Highlight Changed" field in filter (default : 6 hours). last update date Matching bugs are displayed bolded, other non bolded.

Additional Information

config_defaults_inc.php

/**
 * @global string $g_show_changed_display_mode
 * filter / highlight
 */
$g_show_changed_display_mode = 'highlight';

=> keep the actual comportement. Keep $g_default_show_changed = 6;

config_inc.php

$g_default_show_changed = 0;
$g_show_changed_display_mode = 'filter';

=> Using "Highlight Changed" in filter mode, but with default value = 0 => display all.

filter_api.php, row 1263 (after # date filter section)

# last updated filter
if( config_get('show_changed_display_mode') == 'filter' ){
    $nb_hours = db_prepare_int( $t_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] );
    if($nb_hours > 0){
        $t_where_params[] = time() - $nb_hours * 60 * 60;
        $t_where_params[] = time();

        $t_last_update_query = "($t_bug_table.last_updated BETWEEN " . db_param() . " AND " . db_param() . " )" ;
        log_event( LOG_FILTERING, 'last_updated query = ' . $t_last_update_query );
        array_push( $t_where_clauses, $t_last_update_query );
    }
    else {
        log_event( LOG_FILTERING, 'no last_updated query' );
    }
}

with these modifications, you can filter on last update in view_all_bug_page if option is set in configuration file.

TagsNo tags attached.

Relationships

related to 0006823 closedcommunity Date filter should work with "last update", too 

Activities

atrol

atrol

2016-09-12 11:32

developer   ~0054002

I think 0006823 is the better approach for it.
What do you think?

Mr.Bricodage

Mr.Bricodage

2016-09-12 12:24

reporter   ~0054003

I agree. You can close this ticket.

atrol

atrol

2016-09-12 12:57

developer   ~0054005

Mr.Bricodage, thanks for the feedback.