View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0011088 | mantisbt | public | 2009-10-27 08:28 | 2010-02-22 14:34 | |
| Reporter | dhx | Assigned To | rombert | ||
| Priority | high | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.2.0 | ||||
| Target Version | 1.2.0 | Fixed in Version | 1.2.0 | ||
| Summary | 0011088: Update emails show @0@ instead of the access level of each bugnote author | ||||
| Description | This is reproducible with the MantisBT.org bug tracker. For emails in the format: Bugnotes listed in the email will show @0@ as the access level for each of the bugnote authors. Example: Additional Information: For other types of notifications such as new notes or new people being added to the monitor list, the access level string is rendered correctly. | ||||
| Tags | enum, patch | ||||
| Attached Files | 0001-Issue-11088-Update-emails-show-0-instead-of-the-acce.patch (1,555 bytes)
From a00a594a82d7cd4bf9df351727c2954cc5089a5b Mon Sep 17 00:00:00 2001
From: Robert Munteanu <robert.munteanu@gmail.com>
Date: Mon, 9 Nov 2009 23:58:11 +0200
Subject: [PATCH] Issue #11088: Update emails show @0@ instead of the access level of each bugnote author
Update email_format_bug_message to pass in the project id to access_get_project_level
for the bugnote reporter instead of relying on helper_get_current_project() to
guess the correct one.
---
core/email_api.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/core/email_api.php b/core/email_api.php
index e824206..c8944b8 100644
--- a/core/email_api.php
+++ b/core/email_api.php
@@ -1305,7 +1305,7 @@ function email_format_bug_message( $p_visible_bug_data ) {
}
if( user_exists( $t_bugnote->reporter_id ) ) {
- $t_access_level = access_get_project_level( null, $t_bugnote->reporter_id );
+ $t_access_level = access_get_project_level( $p_visible_bug_data['email_project_id'] , $t_bugnote->reporter_id );
$t_access_level_string = ' (' . get_enum_element( 'access_levels', $t_access_level ) . ') - ';
} else {
$t_access_level_string = '';
@@ -1385,6 +1385,7 @@ function email_build_visible_bug_data( $p_user_id, $p_bug_id, $p_message_id ) {
}
$t_bug_data['email_reporter'] = user_get_name( $row['reporter_id'] );
+ $t_bug_data['email_project_id'] = $row['project_id'];
$t_bug_data['email_project'] = project_get_field( $row['project_id'], 'name' );
$t_category_name = category_full_name( $row['category_id'], false );
--
1.6.4.2
| ||||
|
If anyone is bored enough to try this (untested - I don't use email notifications ) patch, please do so. |
|
|
Thanks Robert, your patch works fine so I committed it :) |
|
|
Now that's just scary. Glad to hear it works though :-) |
|
|
MantisBT: master-1.2.x a27f6316 2009-11-09 16:58 Committer: dhx Details Diff |
Issue 0011088: Update emails show @0@ instead of the access level of each bugnote author Update email_format_bug_message to pass in the project id to access_get_project_level for the bugnote reporter instead of relying on helper_get_current_project() to guess the correct one. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0011088 |
|
| mod - core/email_api.php | Diff File | ||
|
MantisBT: master e35d857f 2009-11-09 16:58 Committer: dhx Details Diff |
Issue 0011088: Update emails show @0@ instead of the access level of each bugnote author Update email_format_bug_message to pass in the project id to access_get_project_level for the bugnote reporter instead of relying on helper_get_current_project() to guess the correct one. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0011088 |
|
| mod - core/email_api.php | Diff File | ||