View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0008287 | mantisbt | public | 2007-08-21 05:36 | 2017-11-20 05:47 | |
| Reporter | polzin | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | acknowledged | Resolution | open | ||
| Product Version | 1.1.0a4 | ||||
| Summary | 0008287: Missing notification on file attachment | ||||
| Description | If I attach a file to an issue, there is no notification. The attached patch inserts such a notification and reuses the configuration for email_on_bugnote (as it is assumed that this has the same level). | ||||
| Tags | patch | ||||
| Attached Files | patch_file_notification.txt (3,062 bytes)
? config_inc.php_old
? config_project_inc.php
? local
? patch.file
Index: bug_file_add.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_file_add.php,v
retrieving revision 1.49
diff -u -r1.49 bug_file_add.php
--- bug_file_add.php 8 May 2007 21:42:24 -0000 1.49
+++ bug_file_add.php 21 Aug 2007 09:33:37 -0000
@@ -44,6 +44,8 @@
$f_file_error = ( isset( $f_file['error'] ) ) ? $f_file['error'] : 0;
file_add( $f_bug_id, $f_file['tmp_name'], $f_file['name'], $f_file['type'], 'bug', $f_file_error );
+ email_file_add( $f_bug_id );
+
# Determine which view page to redirect back to.
$t_redirect_url = string_get_bug_view_url( $f_bug_id );
Index: core/email_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/email_api.php,v
retrieving revision 1.138
diff -u -r1.138 email_api.php
--- core/email_api.php 28 Jul 2007 21:36:50 -0000 1.138
+++ core/email_api.php 21 Aug 2007 09:33:38 -0000
@@ -589,6 +589,11 @@
email_generic( $p_bug_id, 'bugnote', 'email_notification_title_for_action_bugnote_submitted' );
}
# --------------------
+ # send notices when a new file
+ function email_file_add( $p_bug_id ) {
+ email_generic( $p_bug_id, 'bugnote', 'email_notification_title_for_action_file_submitted' );
+ }
+ # --------------------
# send notices when a bug is RESOLVED
function email_resolved( $p_bug_id ) {
email_generic( $p_bug_id, 'resolved', 'email_notification_title_for_status_bug_resolved' );
Index: lang/strings_english.txt
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v
retrieving revision 1.312
diff -u -r1.312 strings_english.txt
--- lang/strings_english.txt 15 Aug 2007 16:25:29 -0000 1.312
+++ lang/strings_english.txt 21 Aug 2007 09:33:38 -0000
@@ -341,6 +341,7 @@
$s_email_notification_title_for_action_sponsorship_deleted = 'A sponsorship of the following issue was withdrawn.';
$s_email_notification_title_for_action_bugnote_submitted = 'A NOTE has been added to this issue.';
+$s_email_notification_title_for_action_file_submitted = 'A FILE has been added to this issue.';
$s_email_notification_title_for_action_duplicate_of_relationship_added = "The following issue has been set as DUPLICATE OF issue %s.";
$s_email_notification_title_for_action_has_duplicate_relationship_added = "The issue %s has been set as DUPLICATE OF the following issue.";
$s_email_notification_title_for_action_related_to_relationship_added = "The following issue has been set as RELATED TO issue %s.";
@@ -413,7 +414,7 @@
$s_email_on_resolved = 'Email on Resolved';
$s_email_on_closed = 'Email on Closed';
$s_email_on_reopened = 'Email on Reopened';
-$s_email_on_bugnote_added = 'Email on note Added';
+$s_email_on_bugnote_added = 'Email on note/file Added';
$s_email_on_status_change = 'Email on Status Change';
$s_email_on_priority_change = 'Email on Priority Change';
$s_email_bugnote_limit = 'Email Notes Limit';
| ||||
| related to | 0007835 | new | Add "Has patch" flag to improve usefulness of the "Upload File" feature | |
| has duplicate | 0008935 | closed | giallu | No option to send notification on file attachment. |
| has duplicate | 0019846 | closed | atrol | Enable email notification after a file have been attached |
| has duplicate | 0023656 | closed | atrol | Email notification adding just an attachment on ticket note |
| related to | 0003380 | acknowledged | E-mail notification on editing bugnotes and adding files |
|
I agree with the need for the feature. However, I don't like combining it with the note notifications. I think it should be an independent event with independent configuration. |
|
|
I think this is related to the work needed for 0007835; in particular, in 0005009 we mostly agreed on the need of having the attachment event generating a note so that we can:
of course, then the note will be forwarded with the same policy as ordinary ones, but I don't think this as an issue |
|