View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010905 | mantisbt | plug-ins | public | 2009-09-04 09:01 | 2009-10-07 14:19 |
Reporter | cmfitch1 | Assigned To | dhx | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 1.2.0rc2 | Fixed in Version | 1.2.0rc2 | ||
Summary | 0010905: BUGNOTE_ADD event not sent when bugnote is added from edit report page | ||||
Description | The BUGNOTE_ADD event is only sent when a bugnote is added from the view page. Moving it from bugnote_add.php to the bugnote_add() function in core/bugnote_api.php will ensure that it is sent from the edit page as well. | ||||
Tags | No tags attached. | ||||
Attached Files | issue_10905.patch (1,271 bytes)
From 43ab44364c4d0caae17bde696730119e4f655a1a Mon Sep 17 00:00:00 2001 From: Chris Fitch <cfitch@redcom.com> Date: Fri, 4 Sep 2009 08:56:31 -0400 Subject: [PATCH] Move BUGNOTE_ADD event to bugnote_add() function diff --git a/bugnote_add.php b/bugnote_add.php index d579232..ba8be0e 100644 --- a/bugnote_add.php +++ b/bugnote_add.php @@ -59,9 +59,6 @@ trigger_error( ERROR_EMPTY_FIELD, ERROR ); } - # Event integration - event_signal( 'EVENT_BUGNOTE_ADD', array( $f_bug_id, $t_bugnote_id ) ); - form_security_purge( 'bugnote_add' ); print_successful_redirect_to_bug( $f_bug_id ); diff --git a/core/bugnote_api.php b/core/bugnote_api.php index 3f0f0c9..ebc70b4 100644 --- a/core/bugnote_api.php +++ b/core/bugnote_api.php @@ -183,6 +183,9 @@ function bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_ # log new bug history_log_event_special( $p_bug_id, BUGNOTE_ADDED, bugnote_format_id( $t_bugnote_id ) ); + # Event integration + event_signal( 'EVENT_BUGNOTE_ADD', array( $p_bug_id, $t_bugnote_id ) ); + # only send email if the text is not blank, otherwise, it is just recording of time without a comment. if( TRUE == $p_send_email && !is_blank( $p_bugnote_text ) ) { email_bugnote_add( $p_bug_id ); -- 1.6.0.4 | ||||
Please delete issue_10905.patch and use issue_10905_a.patch instead. |
|
I think this is OK... remembering of course we add bugnotes in many different situations such as when sending reminders. Timecard and SourceIntegration plugins also use bugnote_add. However in your patch you have forgotten to change the variable names to p instead of f :) Thanks! |
|
The second patch was supposed to have the f_ problem fixed, I'm not sure how I messed up... |
|
Okay, I've posted the correct patch as issue_10905.patch. Please delete issue_10905_a.patch. Thanks! |
|
Thanks, applied! :) |
|
MantisBT: master-1.2.x fa252970 2009-09-04 08:56 Chris Fitch Committer: dhx Details Diff |
Issue 10905: Move BUGNOTE_ADD event to bugnote_add() function The BUGNOTE_ADD event is only sent when a bugnote is added from the view page. Moving it from bugnote_add.php to the bugnote_add() function in core/bugnote_api.php will ensure that it is sent from the edit page as well. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0010905 |
|
mod - bugnote_add.php | Diff File | ||
mod - core/bugnote_api.php | Diff File | ||
MantisBT: master 2d8bbff7 2009-09-04 08:56 Chris Fitch Committer: dhx Details Diff |
Issue 10905: Move BUGNOTE_ADD event to bugnote_add() function The BUGNOTE_ADD event is only sent when a bugnote is added from the view page. Moving it from bugnote_add.php to the bugnote_add() function in core/bugnote_api.php will ensure that it is sent from the edit page as well. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0010905 |
|
mod - bugnote_add.php | Diff File | ||
mod - core/bugnote_api.php | Diff File |