Skip to content

Commit

Permalink
Fix #3353: History not updated in bug deletion email.
Browse files Browse the repository at this point in the history
M core/bug_api.php
- Updated history before sending bug deletion email.

M core/constant_inc.php
- Added Bug Deleted history event.

M core/history_api.php
- Added support for Bug Deleted history event.

M lang/strings_english.txt
- Added Bug Deleted string.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2264 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Sep 11, 2003
1 parent 1af0716 commit 03fe4b5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
5 changes: 4 additions & 1 deletion core/bug_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_api.php,v 1.43 2003-04-23 23:00:24 jfitzell Exp $
# $Id: bug_api.php,v 1.44 2003-09-11 14:14:57 vboctor Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -362,6 +362,9 @@ function bug_delete( $p_bug_id ) {
$t_bug_table = config_get( 'mantis_bug_table' );
$t_bug_text_table = config_get( 'mantis_bug_text_table' );

# log deletion of bug
history_log_event_special( $p_bug_id, BUG_DELETED, bug_format_id( $p_bug_id ) );

email_bug_deleted( $p_bug_id );

# Delete custom fields
Expand Down
3 changes: 2 additions & 1 deletion core/constant_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: constant_inc.php,v 1.6 2003-03-12 07:56:12 jfitzell Exp $
# $Id: constant_inc.php,v 1.7 2003-09-11 14:14:57 vboctor Exp $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -132,6 +132,7 @@
define( 'BUGNOTE_STATE_CHANGED', 11 );
define( 'BUG_MONITOR', 12 );
define( 'BUG_UNMONITOR', 13 );
define( 'BUG_DELETED', 14 );

# bug relationship constants
define( 'BUG_DUPLICATE', 0 );
Expand Down
5 changes: 4 additions & 1 deletion core/history_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: history_api.php,v 1.15 2003-07-26 13:50:20 vboctor Exp $
# $Id: history_api.php,v 1.16 2003-09-11 14:14:57 vboctor Exp $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -229,6 +229,9 @@ function history_get_events_array( $p_bug_id ) {
$v_old_value = user_get_field( $v_old_value, 'username' );
$t_note = lang_get( 'bug_end_monitor' ) . ": " . $v_old_value;
break;
case BUG_DELETED:
$t_note = lang_get( 'bug_deleted' ) . ": " . $v_old_value;
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -7,6 +7,7 @@ Mantis ChangeLog
* Fix #3330: "Required" fields on Account Profile page.
* Fix #3333: Support PHPMailer v1.7x.
* Fix #3334: Invalid links in bug reminder emails.
* Fix #3353: History not updated in bug deletion email.

2003.08.24 - 0.18.0rc1

Expand Down
7 changes: 4 additions & 3 deletions lang/strings_english.txt
Expand Up @@ -9,11 +9,11 @@
###########################################################################
# English strings for Mantis
# -------------------------------------------------
# $Revision: 1.143 $
# $Revision: 1.144 $
# $Author: vboctor $
# $Date: 2003-08-31 11:32:20 $
# $Date: 2003-09-11 14:14:57 $
#
# $Id: strings_english.txt,v 1.143 2003-08-31 11:32:20 vboctor Exp $
# $Id: strings_english.txt,v 1.144 2003-09-11 14:14:57 vboctor Exp $
###########################################################################
?>
<?php
Expand Down Expand Up @@ -83,6 +83,7 @@ $s_additional_information_updated = 'Additional Information Updated';
$s_steps_to_reproduce_updated = 'Steps to Reproduce Updated';
$s_file_added = 'File Added';
$s_file_deleted = 'File Deleted';
$s_bug_deleted = 'Bug Deleted';

$s_make_private = 'Make Private';
$s_make_public = 'Make Public';
Expand Down

0 comments on commit 03fe4b5

Please sign in to comment.