View Issue Details

IDProjectCategoryView StatusLast Update
0011502mantisbtbugtrackerpublic2014-12-22 08:24
Reporteralquanto Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0rc2 
Target Version1.2.4Fixed in Version1.2.4 
Summary0011502: No Close button for Reporter if allow_reporter_close is enabled
Description

When you check the option "Allow Reporter to close Issue" there is no option to close the issue for the reporter.

See 0010896 for the same Problem in another version.

Additional Information

Attached a patch that enables this feature.

Tagspatch
Attached Files
mantis-close-button.diff (784 bytes)   
diff -r mantis/core/html_api.php mantis-dev/core/html_api.php
1576a1577,1585
>  * Print a button to close the given bug
>  * @param int $p_bug_id
>  * @return null
>  */
> function html_button_bug_close( $p_bug_id ) {
>   html_button( 'bug_actiongroup_page.php', lang_get( 'close_bug_button' ), array( 'bug_arr[]' => $p_bug_id, 'action' => 'CLOSE' ) );
> }
> 
> /**
1655a1665,1672
>   if (access_can_close_bug( $p_bug_id )) {
> 		echo '<td class="center">';
> 
> 		# CLOSE button
> 		html_button_bug_close( $p_bug_id );
> 		echo '</td>';
>   }
> 
diff -r mantis/lang/strings_english.txt mantis-dev/lang/strings_english.txt
530a531
> $s_close_bug_button = 'Close';
diff -r mantis/lang/strings_german.txt mantis-dev/lang/strings_german.txt
504a505
> $s_close_bug_button = 'Schließen';
mantis-close-button.diff (784 bytes)   
0001-Fix-#11502-Close-button-not-displayed-when-allow_reporter_close-is-set.patch (945 bytes)   
From 3215a9ac966e3cba1a6b32ce2eaea659ca0e495a Mon Sep 17 00:00:00 2001
From: Damien Regad <damien.regad@merckserono.net>
Date: Mon, 4 Oct 2010 17:38:55 +0200
Subject: [PATCH] Fix #11502 Close button not displayed when allow_reporter_close is set

Display the "Change State" button for Reporters on Resolved issues when
allow_reporter_close is set (even if issue is read-only)
---
 core/html_api.php |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/core/html_api.php b/core/html_api.php
index 61be4d4..4a2d2fb 100644
--- a/core/html_api.php
+++ b/core/html_api.php
@@ -1635,7 +1635,9 @@ function html_buttons_view_bug_page( $p_bug_id ) {
 		echo '<td class="center">';
 		html_button_bug_assign_to( $p_bug_id );
 		echo '</td>';
+	}
 
+	if( !$t_readonly || ( ON == config_get( 'allow_reporter_close' )) ) {
 		# Change State button
 		echo '<td class="center">';
 		html_button_bug_change_status( $p_bug_id );
-- 
1.7.1

Relationships

related to 0007325 feedback project dependent "Allow Reporter to close Issue" has no effect, or? 
has duplicate 0013476 closedatrol Allow Reporter to close Issue 
has duplicate 0013623 closedatrol Allow Reporter to close Issue 
related to 0011661 closeddregad "closed issue become readonly" doesn't work 
related to 0014156 closeddregad Add Close button for Reporter if allow_reporter_close is enabled 

Activities

dregad

dregad

2010-09-28 13:56

developer   ~0026893

Last edited: 2010-10-01 11:13

I have the same problem in 1.2.1. Note: this seems related to 0007325

dregad

dregad

2010-10-01 13:05

developer   ~0026929

I have tried the patch provided by alquanto, but it does not quite do what I expected. A "Close" button is indeed displayed on the view bug page, but it allows the reporter to go directly to close status from any state, regardless of workflow settings (something only an Administrator should be able to do IMO).

What I want, is that the when the Reporter changes the bug's status to Close, they do so respecting the workflow, and also go through the standard bug_change_status_page.php so they can provide a comment before closure.

So I propose the following patch, which IMO seems closer to the spirit of allow_reporter_close. It enables the standard "Change Status To" button, with the corresponding selection list.

--- 1.2.1/core/html_api.php 2010-08-25 18:28:21.000000000 +0200
+++ custom/core/html_api.php 2010-10-01 18:51:25.000000000 +0200
@@ -1635,7 +1635,9 @@
echo '<td class="center">';
html_button_bug_assign_to( $p_bug_id );
echo '</td>';

  • }

  • if( !$t_readonly || ( ON == config_get( 'allow_reporter_close' )) ) {

    Change State button

            echo '<td class="center">';
            html_button_bug_change_status( $p_bug_id );

To the Mantis developers: I would appreciate if one of you guys could check proposed fix, and possibly include it in the next 1.2.x release if you don't have any objections.

Many thanks

dregad

dregad

2010-11-18 06:31

developer   ~0027410

Git patch for above codev uploaded.

dhx

dhx

2010-11-19 10:42

reporter   ~0027430

Thanks Damien, I've applied your patch.

Related Changesets

MantisBT: master f12c0ad2

2010-10-04 11:38

Damien Regad

Committer: dhx


Details Diff
Fix 0011502 Close button not displayed when allow_reporter_close is set

Display the "Change State" button for Reporters on Resolved issues when
allow_reporter_close is set (even if issue is read-only)

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0011502
mod - core/html_api.php Diff File

MantisBT: master-1.2.x 8126ee69

2010-10-04 11:38

Damien Regad

Committer: dhx


Details Diff
Fix 0011502 Close button not displayed when allow_reporter_close is set

Display the "Change State" button for Reporters on Resolved issues when
allow_reporter_close is set (even if issue is read-only)

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0011502
mod - core/html_api.php Diff File