View Issue Details

IDProjectCategoryView StatusLast Update
0024031mantisbtcustomizationpublic2018-02-22 14:53
ReporterVLroyrenn Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version2.11.1 
Summary0024031: Group actions hooks only recieve individual issue IDs, not the complete list
Description

I've been trying to implement a group action to group multiple issues into one (essentially create a new issue by assembling the data from the selected ones, and marking the rest as duplicates of the new one) to make it easier to sort through the issues from our automatic bug report system, but the current group action API doesn't really allow that. This is because bug_group_action_validate and bug_group_action_process are called on each bug sequentially, which makes it difficult to coalesce the information from all the selected issue into one. The closest I could make with the current API is an action group to mass-mark issues as duplicates of a single one, though this would require organizing the information from those issues manually, since my function hooks would never have access to all the information they need to coalesce at the same time.

Alternate hooks that recieve arrays of bug ids should probably be made available as well, or with a signature similar to EVENT_BUG_ACTIONGROUP_FORM handlers.

Additional Information

This is how the action groups, custom or not, current get invoked (from mantisbt/bug_actiongroup_ext.php) :

$t_failed_ids = array();

foreach( $t_projects_bugs as $t_project_id => $t_bugs ) {
    $g_project_override = $t_project_id;
    foreach( $t_bugs as $t_bug_id ) {
        $t_fail_reason = bug_group_action_validate( $f_action, $t_bug_id );
        if( $t_fail_reason !== null ) {
            $t_failed_ids[$t_bug_id] = $t_fail_reason;
        }
        if( !isset( $t_failed_ids[$t_bug_id] ) ) {
            $t_fail_reason = bug_group_action_process( $f_action, $t_bug_id );
            if( $t_fail_reason !== null ) {
                $t_failed_ids[$t_bug_id] = $t_fail_reason;
            }
        }
    }
}
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-02-22 14:52 VLroyrenn New Issue