Navigation Menu

Skip to content

Commit

Permalink
Allow parent issues to be closed with open children
Browse files Browse the repository at this point in the history
Add a config option to allow closing parent issues while children are open.

Fixes #21225
  • Loading branch information
Betsy Gamrat authored and vboctor committed Oct 22, 2017
1 parent 9e8fa0a commit af213f1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bug_update.php
Expand Up @@ -165,10 +165,11 @@
}
}

# If resolving or closing, ensure that all dependent issues have been resolved.
# If resolving or closing, ensure that all dependent issues have been resolved
# unless config option enables closing parents with open children.
if( ( $t_resolve_issue || $t_close_issue ) &&
!relationship_can_resolve_bug( $f_bug_id )
) {
!relationship_can_resolve_bug( $f_bug_id ) &&
OFF == config_get( 'allow_parent_of_unresolved_to_close' ) ) {
trigger_error( ERROR_BUG_RESOLVE_DEPENDANTS_BLOCKING, ERROR );
}

Expand Down
7 changes: 7 additions & 0 deletions config_defaults_inc.php
Expand Up @@ -1315,6 +1315,12 @@
*/
$g_default_bug_relationship_clone = BUG_REL_NONE;

/**
* Allow parent bug to close regardless of child status.
* @global integer $g_allow_parent_of_unresolved_to_close
*/
$g_allow_parent_of_unresolved_to_close = OFF;

/**
* Default for new bug relationships
* @global integer $g_default_bug_relationship
Expand Down Expand Up @@ -4217,6 +4223,7 @@
'allow_file_upload',
'allow_freetext_in_profile_fields',
'allow_no_category',
'allow_parent_of_unresolved_to_close',
'allow_permanent_cookie',
'allow_reporter_close',
'allow_reporter_reopen',
Expand Down
9 changes: 9 additions & 0 deletions docbook/Admin_Guide/en-US/config/status.xml
Expand Up @@ -228,6 +228,15 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>$g_allow_parent_of_unresolved_to_close</term>
<listitem>
<para>If set, no check is performed on the status of a bug's children,
which allows the parent to be closed whether or not the children
have been resolved. The default is OFF.
</para>
</listitem>
</varlistentry>
</variablelist>

<para>See also:
Expand Down

0 comments on commit af213f1

Please sign in to comment.