Skip to content

Commit

Permalink
allow reporters to reopen their own bugs if they are unhappy with the…
Browse files Browse the repository at this point in the history
… resolution

This option defaults to on and is in response to isse #2108 (http://mantisbt.sourceforge.net/mantis/view_bug_advanced_page.php?f_id=0002108)


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1593 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Oct 27, 2002
1 parent 77bfe49 commit b392926
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
8 changes: 5 additions & 3 deletions bug_reopen.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_reopen.php,v 1.22 2002-10-23 04:54:44 jfitzell Exp $
# $Id: bug_reopen.php,v 1.23 2002-10-27 00:04:38 jfitzell Exp $
# --------------------------------------------------------
?>
<?php
Expand All @@ -19,8 +19,10 @@
$f_bugnote_text = gpc_get_string( 'f_bugnote_text', '' );

project_access_check( $f_bug_id );
check_access( config_get( 'reopen_bug_threshold' ) );
bug_ensure_exists( $f_bug_id );
if ( OFF == config_get( 'allow_reporter_reopen' )
|| auth_get_current_user_id() != bug_get_field( $f_bug_id, 'reporter_id' ) ) {
check_access( config_get( 'reopen_bug_threshold' ) );
}

bug_reopen( $f_bug_id, $f_bugnote_text );

Expand Down
8 changes: 5 additions & 3 deletions bug_reopen_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_reopen_page.php,v 1.18 2002-10-23 04:54:44 jfitzell Exp $
# $Id: bug_reopen_page.php,v 1.19 2002-10-27 00:04:38 jfitzell Exp $
# --------------------------------------------------------
?>
<?php require_once( 'core.php' ) ?>
Expand All @@ -15,8 +15,10 @@
$f_bug_id = gpc_get_int( 'f_bug_id' );

project_access_check( $f_bug_id );
check_access( config_get( 'reopen_bug_threshold ' ) );
bug_ensure_exists( $f_bug_id );
if ( OFF == config_get( 'allow_reporter_reopen' )
|| auth_get_current_user_id() != bug_get_field( $f_bug_id, 'reporter_id' ) ) {
check_access( config_get( 'reopen_bug_threshold' ) );
}
?>
<?php print_page_top1() ?>
<?php print_page_top2() ?>
Expand Down
2 changes: 1 addition & 1 deletion bug_view_advanced_page.php
Expand Up @@ -411,7 +411,7 @@
<?php # REOPEN form BEGIN ?>
<?php if ( empty( $f_check ) && ( $v_status >= RESOLVED ) &&
( access_level_check_greater_or_equal( $g_reopen_bug_threshold ) ||
( $v_reporter_id == $t_user_id )) ) { ?>
( $v_reporter_id == $t_user_id && ON == config_get( 'allow_reporter_reopen' ) ) ) ) { ?>
<td class="center">
<form method="post" action="bug_reopen_page.php">
<input type="hidden" name="f_bug_id" value="<?php echo $f_bug_id ?>" />
Expand Down
2 changes: 1 addition & 1 deletion bug_view_page.php
Expand Up @@ -317,7 +317,7 @@
<?php # REOPEN form BEGIN ?>
<?php if ( ( $v_status >= RESOLVED ) &&
( access_level_check_greater_or_equal( $g_reopen_bug_threshold ) ||
( $v_reporter_id == $t_user_id )) ) { ?>
( $v_reporter_id == $t_user_id && ON == config_get( 'allow_reporter_reopen' ) ) ) ) { ?>
<td class="center">
<form method="post" action="bug_reopen_page.php">
<input type="hidden" name="f_bug_id" value="<?php echo $f_bug_id ?>" />
Expand Down
4 changes: 4 additions & 0 deletions config_defaults_inc.php
Expand Up @@ -491,6 +491,10 @@
# Allow reporters to close the bugs they reported, after they're marked resolved.
$g_allow_reporter_close = OFF;

# --- reporter can reopen ---------
# Allow reporters to reopen the bugs they reported, after they're marked resolved.
$g_allow_reporter_reopen = ON;

# --- bug delete -----------
# Allow the specified access level and higher to delete bugs
$g_allow_bug_delete_access_level = DEVELOPER;
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -136,6 +136,7 @@ Mantis ChangeLog
* Added $g_email_set_category to make Mantis set the category of the e-mail sent (via mail()/phpMailer). This is useful in organising e-mails better using clients like Microsoft Outlook.
* config options default_advanced_report, default_advanced_view, and default_advanced_update are now ON/OFF instead of BOTH/SIMPLE/ADVANCED (they never worked the other way anyway)
* Added a custom_headers config variable that included a list of headers to preprend to each outgoing HTTP response. This can be used for P3P policy headers among other things (see issue #2649)
* Added a allow_reporter_reopen config variable that allows reporters to reopen closed bugs that they reported if they are unhappy with the resolution (defaults to ON) (see issue #2108)

2002.08.23 - 0.17.5
* Corrected bug_delete.php and bug_delete_page.php, which ignored the $g_allow_bug_delete_access_level setting.
Expand Down

0 comments on commit b392926

Please sign in to comment.