View Issue Details

IDProjectCategoryView StatusLast Update
0024643mantisbtuipublic2018-09-04 01:23
ReporterMr.Bricodage Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version2.17.0Fixed in Version2.17.0 
Summary0024643: bug_actiongroup and custom bug_actiongroup don't provide the same user experience when displaying error message
Description

Errors displayed by bug_actiongroup are displayed in a table, error displayed by custom bug_actiongroup are displayed with <p>elements.

Steps To Reproduce

To generate an error with bug_actiongroup : just Update few bugs status to a status that is forbidden in your workflow
To generate an error with a custom bug_actiongroup : depends on your custom bug_actiongroup

Files are attached to show the GUI for each case.

Additional Information

bug_actiongroup.php, from row 346 to 363

if( count( $t_failed_ids ) > 0 ) {
    layout_page_header();
    layout_page_begin();
    echo '&lt;div><br />';
    echo '&lt;div class=&quot;table-responsive&quot;>';
    echo '&lt;table class=&quot;table table-bordered table-condensed table-striped&quot;>';
    $separator = lang_get( 'word_separator' );
    foreach( $t_failed_ids as $t_id => $t_reason ) {
        $label = sprintf( lang_get( 'label' ), string_get_bug_view_link( $t_id ) ) . $separator;
        printf( &quot;&lt;tr>&lt;td width=\&quot;50%%\&quot;>%s%s&lt;/td>&lt;td>%s&lt;/td>&lt;/tr>\n&quot;, $label, bug_get_field( $t_id, 'summary' ), $t_reason );
    }
    echo '&lt;/div>';
    echo '&lt;/table><br />';
    print_link_button( $t_redirect_url, lang_get( 'proceed' ) );
    echo '&lt;/div>';
    layout_page_end();

bug_actiongroup_ext.php, from row 100 to 114

if( count( $t_failed_ids ) > 0 ) {
    layout_page_header();
    layout_page_begin();
    echo '&lt;div>';
    $t_word_separator = lang_get( 'word_separator' );
    foreach( $t_failed_ids as $t_id => $t_reason ) {
        $t_label = sprintf( lang_get( 'label' ), string_get_bug_view_link( $t_id ) ) . $t_word_separator;
        printf( &quot;<p>%s%s</p>\n&quot;, $t_label, $t_reason );
    }
    print_link_button( 'view_all_bug_page.php', lang_get( 'proceed' ) );
    echo '&lt;/div>';
    layout_page_end();
TagsNo tags attached.
Attached Files
mantis_bug_actiongroup.PNG (19,354 bytes)   
mantis_bug_actiongroup.PNG (19,354 bytes)   
custom_bug_actiongroup.PNG (14,233 bytes)   
custom_bug_actiongroup.PNG (14,233 bytes)   

Activities

dregad

dregad

2018-08-02 07:23

developer   ~0060346

Confirmed. Will submit a PR shortly.

dregad

dregad

2018-08-02 07:31

developer   ~0060347

PR https://github.com/mantisbt/mantisbt/pull/1377

Related Changesets

MantisBT: master d0d6b012

2018-08-02 03:29

dregad

Committer: atrol


Details Diff
Uniformize display of failed group updates

Standard and custom bug group actions did not provide the same user
experience when displaying error messages. bug_actiongroup.php displays
errors in a table, while bug_actiongroup_ext.php prints them with <p>
elements.

This commit refactors the display code on both pages, by moving it to a
new API function bug_group_action_print_results().

Also fixes an issue with the page footer, which was displayed behind the
sidebar due to invalid HTML.

Fixes 0024643, 0024644
Affected Issues
0024643, 0024644
mod - bug_actiongroup.php Diff File
mod - bug_actiongroup_ext.php Diff File
mod - core/bug_group_action_api.php Diff File