Skip to content

Commit

Permalink
0004043: [email] Preference to exclude old bugnotes from notification…
Browse files Browse the repository at this point in the history
… (Bastian Pfennigschmidt)

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2825 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Jeroen Latour committed Aug 8, 2004
1 parent ebd18ca commit 3973d02
Show file tree
Hide file tree
Showing 44 changed files with 397 additions and 205 deletions.
37 changes: 27 additions & 10 deletions account_prefs_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: account_prefs_inc.php,v 1.27 2004-07-11 08:22:59 vboctor Exp $
# $Id: account_prefs_inc.php,v 1.28 2004-08-08 11:39:00 jlatour Exp $
# --------------------------------------------------------

$t_core_path = config_get( 'core_path' );
Expand Down Expand Up @@ -109,10 +109,19 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
<input type="text" name="redirect_delay" size="1" maxlength="1" value="<?php echo $u_redirect_delay ?>" />
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'bugnote_order' ) ?>
</td>
<td>
<input type="radio" name="bugnote_order" value="ASC" <?php check_checked( $u_bugnote_order, 'ASC' ); ?> /><?php echo lang_get( 'bugnote_order_asc' ) ?>
<input type="radio" name="bugnote_order" value="DESC" <?php check_checked( $u_bugnote_order, 'DESC' ); ?> /><?php echo lang_get( 'bugnote_order_desc' ) ?>
</td>
</tr>
<?php
if ( ON == config_get( 'enable_email_notification' ) ) {
?>
<tr class="row-1">
<tr class="row-2">
<td class="category">
<?php echo lang_get( 'email_on_new' ) ?>
</td>
Expand All @@ -126,7 +135,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-2">
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'email_on_assigned' ) ?>
</td>
Expand All @@ -140,7 +149,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-1">
<tr class="row-2">
<td class="category">
<?php echo lang_get( 'email_on_feedback' ) ?>
</td>
Expand All @@ -154,7 +163,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-2">
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'email_on_resolved' ) ?>
</td>
Expand All @@ -168,7 +177,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-1">
<tr class="row-2">
<td class="category">
<?php echo lang_get( 'email_on_closed' ) ?>
</td>
Expand All @@ -182,7 +191,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-2">
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'email_on_reopened' ) ?>
</td>
Expand All @@ -196,7 +205,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-1">
<tr class="row-2">
<td class="category">
<?php echo lang_get( 'email_on_bugnote_added' ) ?>
</td>
Expand All @@ -210,7 +219,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-2">
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'email_on_status_change' ) ?>
</td>
Expand All @@ -224,7 +233,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-1">
<tr class="row-2">
<td class="category">
<?php echo lang_get( 'email_on_priority_change' ) ?>
</td>
Expand All @@ -238,6 +247,14 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</select>
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php echo lang_get( 'email_bugnote_limit' ) ?>
</td>
<td>
<input type="text" name="email_bugnote_limit" maxlength="2" size="2" value="<?php echo $u_email_bugnote_limit ?>">
</td>
</tr>
<?php } else { ?>
<input type="hidden" name="email_on_new" value="<?php echo $u_email_on_new ?>" />
<input type="hidden" name="email_on_assigned" value="<?php echo $u_email_on_assigned ?>" />
Expand Down
5 changes: 4 additions & 1 deletion account_prefs_update.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: account_prefs_update.php,v 1.33 2004-04-01 18:42:10 narcissus Exp $
# $Id: account_prefs_update.php,v 1.34 2004-08-08 11:39:00 jlatour Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -66,6 +66,9 @@
$t_prefs->email_on_bugnote_minimum_severity = gpc_get_int( 'email_on_bugnote_minimum_severity' );
$t_prefs->email_on_status_minimum_severity = gpc_get_int( 'email_on_status_minimum_severity' );
$t_prefs->email_on_priority_minimum_severity = gpc_get_int( 'email_on_priority_minimum_severity' );

$t_prefs->bugnote_order = gpc_get_string( 'bugnote_order' );
$t_prefs->email_bugnote_limit = gpc_get_int( 'email_bugnote_limit' );

# prevent users from changing other user's accounts
if ( $f_user_id != auth_get_current_user_id() ) {
Expand Down
19 changes: 14 additions & 5 deletions admin/upgrades/0_18_inc.php
Expand Up @@ -8,7 +8,7 @@
# Changes applied to 0.18 database

# --------------------------------------------------------
# $Id: 0_18_inc.php,v 1.19 2004-08-07 01:37:43 thraxisp Exp $
# $Id: 0_18_inc.php,v 1.20 2004-08-08 11:39:00 jlatour Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -549,9 +549,9 @@ function upgrade_0_18_user_duplicate() {
"ALTER TABLE mantis_custom_field_table DROP require_close" );

$upgrades[] = new FunctionUpgrade(
'delete-admin-over',
'delete any project level access overrides for admin users',
'upgrade_0_18_del_admin_override' );
'delete-admin-over',
'delete any project level access overrides for admin users',
'upgrade_0_18_del_admin_override' );

function upgrade_0_18_del_admin_override() {
global $t_user_table, $t_project_user_list_table;
Expand All @@ -573,6 +573,15 @@ function upgrade_0_18_del_admin_override() {
return true;
}

$upgrades[] = new SQLUpgrade(
'0.18-bugnote-limit',
"Add email_bugnote_limit to user preference table",
"ALTER TABLE $t_user_pref_table ADD email_bugnote_limit INT( 2 ) NOT NULL AFTER email_on_new_minimum_severity" );

$upgrades[] = new SQLUpgrade(
'0.18-bugnote-order',
"Add bugnote_order to user preference table",
"ALTER TABLE $t_user_pref_table ADD bugnote_order VARCHAR( 4 ) NOT NULL DEFAULT '" . config_get( 'default_bugnote_order' ) . "' AFTER redirect_delay" );

return $upgrades;
?>
?>
4 changes: 2 additions & 2 deletions bugnote_view_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the files README and LICENSE for details

# --------------------------------------------------------
# $Id: bugnote_view_inc.php,v 1.17 2004-06-29 08:38:43 int2str Exp $
# $Id: bugnote_view_inc.php,v 1.18 2004-08-08 11:39:00 jlatour Exp $
# --------------------------------------------------------
?>
<?php
Expand All @@ -30,7 +30,7 @@

$t_bugnote_table = config_get( 'mantis_bugnote_table' );
$t_bugnote_text_table = config_get( 'mantis_bugnote_text_table' );
$t_bugnote_order = config_get( 'bugnote_order' );
$t_bugnote_order = current_user_get_pref( 'bugnote_order' );

# get the bugnote data
$query = "SELECT *,date_submitted
Expand Down
6 changes: 4 additions & 2 deletions config_defaults_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: config_defaults_inc.php,v 1.193 2004-08-08 09:02:34 jlatour Exp $
# $Id: config_defaults_inc.php,v 1.194 2004-08-08 11:39:00 jlatour Exp $
# --------------------------------------------------------


Expand Down Expand Up @@ -464,6 +464,7 @@
$g_default_advanced_update = OFF;
$g_default_refresh_delay = 30; # in minutes
$g_default_redirect_delay = 2; # in seconds
$g_default_bugnote_order = 'ASC';
$g_default_email_on_new = ON;
$g_default_email_on_assigned = ON;
$g_default_email_on_feedback = ON;
Expand All @@ -482,6 +483,7 @@
$g_default_email_on_bugnote_minimum_severity = 'any';
$g_default_email_on_status_minimum_severity = 'any'; # @@@ Unused
$g_default_email_on_priority_minimum_severity = 'any'; # @@@ Unused
$g_default_email_bugnote_limit = 0;
# default_language - is set to site language

###############################
Expand Down Expand Up @@ -509,7 +511,7 @@

# --- bugnote ordering ------------
# change to ASC or DESC
$g_bugnote_order = 'ASC';
$g_bugnote_order = 'DESC';

################################
# Mantis Bug History Settings
Expand Down

0 comments on commit 3973d02

Please sign in to comment.