View Issue Details

IDProjectCategoryView StatusLast Update
0024882mantisbtrelationshipspublic2019-01-02 17:25
Reportermantisiator Assigned Toatrol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.17.1 
Target Version2.19.0Fixed in Version2.19.0 
Summary0024882: relationship_can_resolve_bug function problem
Description

In the present implementation, it is assumed that the parent and the child issue are in the same project.
In case this is not the case, the implementation has to be updated in order to retrieve the threshold value of the destination(see proposed implementation below). What do you think ?

for( $i = 0;$i < $t_relationship_count;$i++ ) {
        # verify if each bug in relation BUG_DEPENDANT is already marked as resolved
        if( $t_relationship[$i]->type == BUG_DEPENDANT ) {
            $t_dest_bug_id = $t_relationship[$i]->dest_bug_id;
            $t_status = bug_get_field( $t_dest_bug_id, 'status' );

            #  begin- Get the Project Id of the current child issue (set as destination)
                        $t_dest_bug_project_id = $t_relationship[$i]->dest_project_id;
            #  end- Get the Project Id of the current child issue (set as destination)

            #  begin - Check the bug_resolved_status_threshold of the child issue project (set as destination)
            #if( $t_status < config_get( 'bug_resolved_status_threshold' ) ) {
            if( $t_status < config_get( 'bug_resolved_status_threshold',null, null, $t_dest_bug_project_id) ) {  
            #  end - Check the bug_resolved_status_threshold of the child issue project (set as destination)
                # the bug is NOT marked as resolved/closed

                return false;
            }

        }
    }
TagsNo tags attached.

Activities

atrol

atrol

2018-10-28 08:37

developer   ~0060865

Thanks @mantisiator for providing the information.
Please try if my refactored change fixes the issue.

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

Related Changesets

MantisBT: master 0cf461cd

2018-10-28 07:59:45

atrol

Details Diff
Code cleanup

Issue 0024882
Affected Issues
0024882
mod - core/relationship_api.php Diff File

MantisBT: master cb68ddd7

2018-10-28 08:34:16

atrol

Details Diff
Check for bug_resolved_status_threshold of right project

Fixes 0024882
Affected Issues
0024882
mod - core/relationship_api.php Diff File

Issue History

Date Modified Username Field Change
2018-10-23 08:55 mantisiator New Issue
2018-10-23 13:55 atrol Description Updated View Revisions
2018-10-28 08:36 atrol Assigned To => atrol
2018-10-28 08:36 atrol Status new => assigned
2018-10-28 08:37 atrol Target Version => 2.19.0
2018-10-28 08:37 atrol Note Added: 0060865
2018-10-31 15:32 atrol Changeset attached => MantisBT master 0cf461cd
2018-10-31 15:32 atrol Changeset attached => MantisBT master cb68ddd7
2018-10-31 15:32 atrol Status assigned => resolved
2018-10-31 15:32 atrol Resolution open => fixed
2018-10-31 15:32 atrol Fixed in Version => 2.19.0
2019-01-02 17:25 vboctor Status resolved => closed