diff --git a/Source/Source.API.php b/Source/Source.API.php index e09e250..2ea487a 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -233,9 +233,8 @@ bug_cache_array_rows( $t_resolved_bugs ); # Start resolving issues + $t_resolution = plugin_config_get( 'bugfix_resolution' ); foreach( $t_resolved_bugs as $t_bug_id => $t_changeset ) { - $t_status = config_get( 'bug_resolved_status_threshold', null, null, bug_get_field( $t_bug_id, 'project_id' ) ); - $t_user_id = null; if ( $t_changeset->committer_id > 0 ) { $t_user_id = $t_changeset->committer_id; @@ -243,7 +242,7 @@ $t_user_id = $t_changeset->user_id; } - bug_resolve( $t_bug_id, $t_status, '', '', null, $t_user_id ); + bug_resolve( $t_bug_id, $t_resolution, '', '', null, $t_user_id ); } } diff --git a/Source/Source.php b/Source/Source.php index 9d63383..c1a3346 100644 --- a/Source/Source.php +++ b/Source/Source.php @@ -49,6 +49,7 @@ 'buglink_regex_2' => '/#?(\d+)/', 'bugfix_resolving' => OFF, + 'bugfix_resolution' => FIXED, 'bugfix_regex_1' => '/(?:fixe?s?|resolves?)+\s+(?:bugs?|issues?|reports?)+\s+(?:#?(?:\d+)[,\.\s]*)+/i', 'bugfix_regex_2' => '/#?(\d+)/', diff --git a/Source/lang/strings_english.txt b/Source/lang/strings_english.txt index 2366f83..9f1dff7 100644 --- a/Source/lang/strings_english.txt +++ b/Source/lang/strings_english.txt @@ -81,6 +81,7 @@ $s_plugin_Source_buglink_regex_1 = 'Bug Link PCRE Pass 1'; $s_plugin_Source_buglink_regex_2 = 'Bug Link PCRE Pass 2'; $s_plugin_Source_bugfix_resolving = 'Allow Resolving Issues'; +$s_plugin_Source_bugfix_resolution = 'Bug Resolution'; $s_plugin_Source_bugfix_regex_1 = 'Bug Resolve PCRE Pass 1'; $s_plugin_Source_bugfix_regex_2 = 'Bug Resolve PCRE Pass 2'; $s_plugin_Source_reset = 'Reset to default'; diff --git a/Source/pages/manage_config.php b/Source/pages/manage_config.php index e7fbceb..2c660a8 100644 --- a/Source/pages/manage_config.php +++ b/Source/pages/manage_config.php @@ -30,6 +30,7 @@ $f_buglink_reset_2 = gpc_get_string( 'buglink_reset_2', OFF ); $f_bugfix_resolving = gpc_get_bool( 'bugfix_resolving', OFF ); +$f_bugfix_resolution = gpc_get_int( 'bugfix_resolution' ); $f_bugfix_regex_1 = gpc_get_string( 'bugfix_regex_1' ); $f_bugfix_reset_1 = gpc_get_string( 'bugfix_reset_1', OFF ); $f_bugfix_regex_2 = gpc_get_string( 'bugfix_regex_2' ); @@ -88,6 +89,7 @@ } maybe_set_option( 'bugfix_resolving', $f_bugfix_resolving ); +maybe_set_option( 'bugfix_resolution', $f_bugfix_resolution ); if ( ! $f_bugfix_reset_1 ) { maybe_set_option( 'bugfix_regex_1', $f_bugfix_regex_1 ); diff --git a/Source/pages/manage_config_page.php b/Source/pages/manage_config_page.php index a0095f8..8ea3992 100644 --- a/Source/pages/manage_config_page.php +++ b/Source/pages/manage_config_page.php @@ -95,6 +95,11 @@