Skip to content

Commit

Permalink
Added 'Assign to Reporter' button to 'View Bug' window. We may need t…
Browse files Browse the repository at this point in the history
…o add a configuration option to control displaying this button.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2331 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Jeroen Latour committed Feb 8, 2004
1 parent d45dbbd commit c35a69d
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 9 deletions.
31 changes: 31 additions & 0 deletions bug_assign_reporter.php
@@ -0,0 +1,31 @@
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2003 Mantis Team - mantisbt-dev@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_assign_reporter.php,v 1.1 2004-02-08 15:56:34 jlatour Exp $
# --------------------------------------------------------
?>
<?php
# Assign bug to user then redirect to viewing page
?>
<?php
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'bug_api.php' );
?>
<?php
$f_bug_id = gpc_get_int( 'bug_id' );

access_ensure_bug_level( config_get( 'update_bug_threshold' ), $f_bug_id );
access_ensure_bug_level( config_get( 'handle_bug_threshold' ), $f_bug_id );

bug_assign( $f_bug_id, bug_get_field( $f_bug_id, 'reporter_id') );

print_successful_redirect_to_bug( $f_bug_id );
?>
22 changes: 21 additions & 1 deletion core/html_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: html_api.php,v 1.82 2004-02-08 13:16:57 vboctor Exp $
# $Id: html_api.php,v 1.83 2004-02-08 15:56:35 jlatour Exp $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -627,6 +627,21 @@ function html_button_bug_assign( $p_bug_id ) {
}
}

# --------------------
# Print a button to assign the given bug back to the reporter
function html_button_bug_assign_reporter( $p_bug_id ) {
if ( access_has_bug_level( config_get( 'handle_bug_threshold' ), $p_bug_id ) ) {
$t_handler_id = bug_get_field( $p_bug_id, 'handler_id' );
$t_reporter_id = bug_get_field( $p_bug_id, 'reporter_id' );

if ( $t_reporter_id != $t_handler_id ) {
html_button( 'bug_assign_reporter.php',
lang_get( 'bug_assign_reporter_button' ),
array( 'bug_id' => $p_bug_id ) );
}
}
}

# --------------------
# Print a button to resolve the given bug
function html_button_bug_resolve( $p_bug_id ) {
Expand Down Expand Up @@ -708,6 +723,11 @@ function html_buttons_view_bug_page( $p_bug_id ) {

echo '</td><td>';

# ASSIGN TO REPORTER button
html_button_bug_assign_reporter( $p_bug_id );

echo '</td><td>';

# RESOLVE button
html_button_bug_resolve( $p_bug_id );
} else {
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -2,6 +2,7 @@ Mantis ChangeLog

2004.xx.xx - 0.18.2

* Enh #0000: 'Assign to Reporter' button added to 'View Bug' screen.
* Fix #3118: My Account: after update of password, wrong information is given.
* Fix #3440: "Allowed File Types" is case sensitive (also applies to disallowed file types).
* Fix #3522: /news_update.php looks different from /main_page.php.
Expand Down
9 changes: 5 additions & 4 deletions lang/strings_english.txt
Expand Up @@ -9,11 +9,11 @@
###########################################################################
# English strings for Mantis
# -------------------------------------------------
# $Revision: 1.147 $
# $Author: vboctor $
# $Date: 2004-02-05 12:15:17 $
# $Revision: 1.148 $
# $Author: jlatour $
# $Date: 2004-02-08 15:56:35 $
#
# $Id: strings_english.txt,v 1.147 2004-02-05 12:15:17 vboctor Exp $
# $Id: strings_english.txt,v 1.148 2004-02-08 15:56:35 jlatour Exp $
###########################################################################
?>
<?php
Expand Down Expand Up @@ -816,6 +816,7 @@ $s_product_build = 'Product Build';
$s_system_profile = 'System Description';
$s_update_bug_button = 'Update Bug';
$s_bug_assign_button = 'Assign to Me';
$s_bug_assign_reporter_button = 'Assign to Reporter';
$s_reopen_bug_button = 'Reopen Bug';
$s_attached_files = 'Attached Files';
$s_publish = 'Publish';
Expand Down
9 changes: 5 additions & 4 deletions lang/strings_german.txt
Expand Up @@ -11,11 +11,11 @@
# German: Matthias Bauer, mantis-de@moeffju.de
# German: Andre Eisenbach, andre@eisenbach.com
# -------------------------------------------------
# $Revision: 1.82 $
# $Revision: 1.83 $
# $Author: jlatour $
# $Date: 2004-02-05 15:10:44 $
# $Date: 2004-02-08 15:56:35 $
#
# $Id: strings_german.txt,v 1.82 2004-02-05 15:10:44 jlatour Exp $
# $Id: strings_german.txt,v 1.83 2004-02-08 15:56:35 jlatour Exp $
###########################################################################
?>
<?php
Expand Down Expand Up @@ -817,7 +817,8 @@ $s_viewing_bug_advanced_details_title = 'Erweiterte Fehler-Anzeige';
$s_product_build = 'Produkt-Version';
$s_system_profile = 'System-Beschreibung';
$s_update_bug_button = 'Fehler aktualisieren';
$s_bug_assign_button = 'Mir zuordnen';
$s_bug_assign_button = 'mir zuordnen';
$s_bug_assign_reporter_button = 'Reporter zuordnen';
$s_reopen_bug_button = 'Fehler wiederer�ffnen';
$s_attached_files = 'Angeh�ngte Dateien';
$s_publish = 'Publizieren';
Expand Down

0 comments on commit c35a69d

Please sign in to comment.