View Issue Details

IDProjectCategoryView StatusLast Update
0015647mantisbtemailpublic2014-02-07 18:24
ReporterHeikoSL Assigned Toatrol  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.14 
Target Version1.2.16Fixed in Version1.2.16 
Summary0015647: email subject is build manually in function email_bug_info_to_one_user()
Description

The email subject is build manually in the function email_bug_info_to_one_user. But there is a function for doing that: email_build_subject().

A patch file is attached.

Additional Information

For customization someone (me) may want to add event signalling to email_build_subject() function. That would let us use a plugin to customize email subjects. Therefore all email subjects have to be build by the same function.
I will add a feature request seperately.

TagsNo tags attached.
Attached Files
build_subject.patch (849 bytes)   
From 65fb91502bbeb0faba36b6791089261459115584 Mon Sep 17 00:00:00 2001
From: root <root@bugtracker.local>
Date: Wed, 13 Mar 2013 11:31:56 +0100
Subject: [PATCH] email_bug_info_to_one_user() is not using email_build_subject() function

---
 core/email_api.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/email_api.php b/core/email_api.php
index 92d23f3..0c3ac15 100644
--- a/core/email_api.php
+++ b/core/email_api.php
@@ -1200,7 +1200,7 @@ function email_bug_info_to_one_user( $p_visible_bug_data, $p_message_id, $p_proj
 	}
 
 	# build subject
-	$t_subject = '[' . $p_visible_bug_data['email_project'] . ' ' . bug_format_id( $p_visible_bug_data['email_bug'] ) . ']: ' . $p_visible_bug_data['email_summary'];
+	$t_subject = email_build_subject($p_visible_bug_data['email_bug']);
 
 	# build message
 
-- 
1.7.2.5

build_subject.patch (849 bytes)   

Relationships

child of 0015648 closeddregad add event signalling to email_build_subject() function 

Activities

atrol

atrol

2013-03-13 08:28

developer   ~0035848

Submitting a patch is always a good idea, as it increases the chances of improvement eventually making it into MantisBT core. All contributions are welcome and greatly appreciated.

Patch submissions can be made in several ways. In the order of preference:

  1. Send us a Pull Request on our Github repository [1]
  2. Attach a GIT patch to the issue
  3. Attach a Unified Diff, clearly specifying the patch's base release

Please make sure that your submissions adhere to our Coding Guidelines [2], if they don't your patch might be rejected.

[1] https://github.com/mantisbt/mantisbt
[2] http://www.mantisbt.org/wiki/doku.php/mantisbt:coding_guidelines

HeikoSL

HeikoSL

2013-03-13 08:53

reporter   ~0035849

I will try to send a pull request on the GitHub repo ...

HeikoSL

HeikoSL

2013-03-13 09:59

reporter   ~0035851

https://github.com/mantisbt/mantisbt/pull/76

atrol

atrol

2013-06-02 15:50

developer   ~0037029

Fixed as part of other pull request https://github.com/mantisbt/mantisbt/pull/77