MantisBT

View Issue Details Jump to Notes ] Wiki ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009309mantisbtemailpublic2008-06-27 19:002008-10-18 18:32
ReporterOlegD 
Assigned Togiallu 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
Platformi386OSLinuxOS Version2.6.23
Product Version1.1.2 
Target Version1.1.3Fixed in Version1.1.3 
Summary0009309: Problems with e-mail notifications about bugnotes [PATCH]
DescriptionMantis 2.6.23 never sends e-mail notifications about new bugnotes. This happens because of improper checking of uninitialized variable $p_send_email in bugnote_add(). Attached patch fixes this.
Steps To Reproduce1. Create new bug report;
2. Assign it to some user/create bug monitor regarding this bug for some user;
3. Add note for a bug;
4. No e-mail will be sent to user.
Tagspatch
Attached Filespatch file icon bugnote_api.php.patch [^] (794 bytes) 2008-06-27 19:00 [Show Content]
patch file icon correct_bugnote_api.php.patch [^] (971 bytes) 2008-07-02 05:10 [Show Content]

- Relationships
has duplicate 0009305closedgiallu Update from 1.1.1 to 1.1.2 caused email notifications to stop 
has duplicate 0009327closedgiallu After enable email notify, all user can't recieve the notify email of "note add". 
has duplicate 0009457closedgiallu cant get Mantis to send note added notification emails 

-  Notes
User avatar (0018217)
grangeway (reporter)
2008-06-28 08:52

Oleg,

The function definition sets p_send_email:

    function bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = 0, $p_attr = '', $p_user_id = null, $p_send_email=TRUE ) {

I know in my various versions I get email notifications on adding bugnotes, so I suspect something else might be at fault or there's a bug elsewhere, but as you can see p_send_email is defined.

Paul
User avatar (0018219)
OlegD (reporter)
2008-06-28 09:57

There is no p_send_email parameter in function definition in Mantis 1.1.2:

function bugnote_add ( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = 0, $p_attr = '', $p_user_id = null ) {
[...]
}

I don't know where you get your definition. My definition is from core/bugnote_api.php from mantis-1.1.2.tar.gz (latest stable version available from your site).
User avatar (0018220)
blueray (reporter)
2008-06-28 12:19

Hi,

I'am confuse too.
I found that the $p_send_email=TRUE was in the trunk but no other.

The $p_send_email=TRUE
and the code block

         # only send email if the text is not blank, otherwise, it is just recording of time without a comment.
! if ( !is_blank( $p_bugnote_text ) ) {
              email_bugnote_add( $p_bug_id );

was remove.

This is a new change in 1.2.x branches ?
User avatar (0018253)
vboctor (administrator)
2008-07-01 01:27

Fixed via svn:5385
http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5385&view=rev [^]

$p_send_email wasn't initialized in 1.1.x branch.
User avatar (0018270)
giallu (developer)
2008-07-02 03:16

/me wonder how this slipped in...
User avatar (0018277)
OlegD (reporter)
2008-07-02 05:06

After further research, I found that in some places where bugnote_add() called (even in 1.1.x branch) the presence of last parameter p_send_email is assumed (for example, such call exists in bug_reminder.php). So, the correct patch should just add this parameter to function definition (with default value TRUE). I will attach this patch later.
User avatar (0018278)
OlegD (reporter)
2008-07-02 05:11

Attached file correct_bugnote_api.php.patch should fix this issue in more reasonable way. This patch is against original version from .tar.gz, not against current SVN snapshot.
User avatar (0018361)
jaiger (reporter)
2008-07-10 16:54

The change made in correct_bugnote_api.php.patch seems to resolve the problems for me. I'm using 1.1.2 tarball.

Thanks!

-Joe
User avatar (0018381)
giallu (developer)
2008-07-12 18:30

ok, I ported the relevant code from trunk.

It would be nice if someone could test the BRANCH_1_1_X code to double check the fix.
User avatar (0018382)
giallu (developer)
2008-07-12 18:38

Diff here:
http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5407&view=rev [^]
User avatar (0018511)
giallu (developer)
2008-07-14 09:41

This is the same diff, but against 1.1.2:

http://mantisbt.svn.sourceforge.net/viewvc/mantisbt/branches/BRANCH_1_1_0/mantisbt/core/bugnote_api.php?r1=5370&r2=5407 [^]
User avatar (0019425)
Extend (reporter)
2008-09-22 18:13

how can i apply this patch i just upgraded from an earlier version i found different settings for the email notification i want someone to provide me how to configure notification to be sent when assigned a bug to someone or add a note to developer who maintaining this bug only, i tried to customize email notifications from the mantis web interface but there are a lot of conflicts.

- Related Changesets
MantisBT: master-1.1.x b76e4818
Timestamp: 2008-07-12 22:23:36
Author: giallu
Details ] Diff ]
Fix 9309: Problems with e-mail notifications about bugnotes.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@5407 [^] /?p=mantisbt.git;a=object;h=f5dc347c-c33d-0410-90a0-b07cc1902cb9
mod - core/bugnote_api.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2008-06-27 19:00 OlegD New Issue
2008-06-27 19:00 OlegD File Added: bugnote_api.php.patch
2008-06-28 08:52 grangeway Note Added: 0018217
2008-06-28 08:52 grangeway Status @0@ => resolved
2008-06-28 08:52 grangeway Resolution @0@ => suspended
2008-06-28 08:52 grangeway Assigned To => grangeway
2008-06-28 09:53 OlegD Note Added: 0018218
2008-06-28 09:57 OlegD Note Added: 0018219
2008-06-28 09:57 OlegD Status @0@ => feedback
2008-06-28 09:57 OlegD Resolution @0@ => reopened
2008-06-28 12:19 blueray Note Added: 0018220
2008-06-30 13:52 vboctor Tag Attached: patch
2008-06-30 13:53 vboctor Relationship added related to 0009305
2008-07-01 01:23 vboctor Note Deleted: 0018218
2008-07-01 01:27 vboctor Note Added: 0018253
2008-07-01 01:27 vboctor Assigned To grangeway => vboctor
2008-07-01 01:27 vboctor Status feedback => resolved
2008-07-01 01:27 vboctor Resolution reopened => fixed
2008-07-01 01:27 vboctor Fixed in Version => 1.1.3
2008-07-02 03:16 giallu Note Added: 0018270
2008-07-02 03:17 giallu Relationship added has duplicate 0009327
2008-07-02 05:06 OlegD Note Added: 0018277
2008-07-02 05:06 OlegD Status @0@ => feedback
2008-07-02 05:06 OlegD Resolution @0@ => reopened
2008-07-02 05:10 OlegD File Added: correct_bugnote_api.php.patch
2008-07-02 05:11 OlegD Note Added: 0018278
2008-07-10 16:54 jaiger Note Added: 0018361
2008-07-11 13:01 giallu Status feedback => assigned
2008-07-11 13:01 giallu Assigned To vboctor => giallu
2008-07-11 18:38 giallu Relationship replaced has duplicate 0009305
2008-07-12 18:30 giallu Note Added: 0018381
2008-07-12 18:30 giallu Status @0@ => resolved
2008-07-12 18:30 giallu Resolution @0@ => fixed
2008-07-12 18:38 giallu Note Added: 0018382
2008-07-14 09:41 giallu Note Added: 0018511
2008-07-30 16:07 giallu Relationship added has duplicate 0009457
2008-08-01 11:52 giallu Target Version => 1.1.3
2008-09-22 18:13 Extend Note Added: 0019425
2008-10-18 18:32 giallu Status resolved => closed
2008-10-20 20:19 Changeset attached master-1.1.x e561d1cb =>
2008-11-11 09:03 giallu Changeset attached master-1.1.x b76e4818 =>


MantisBT 1.2.17 [^]
Copyright © 2000 - 2014 MantisBT Team
Time: 0.1168 seconds.
memory usage: 3,142 KB
Powered by Mantis Bugtracker