Need help with note editing customization

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Supagoat

Need help with note editing customization

Post by Supagoat »

This is with version 1.0rc5.

Based on another request I got, I added a checkbox to the add note box that lets users determine whether their note is something they want monitoring users to get an email notification on. That went smoothly.

I tried to do the same thing for the edit box, but it won't send emails! I've tracked the problem down to the function email_notify_flag in email_api.php, specifically this line:

$t_default_notify_flags = config_get( 'default_notify_flags' );

When this line is called when adding a note, it retrieves the following:

reporter Array ( [handler] => 1 [monitor] => 1 [threshold_min] => 70 [threshold_max] => 70 )
handler Array ( [handler] => 1 [monitor] => 1 [threshold_min] => 70 [threshold_max] => 70 )
monitor Array ( [handler] => 1 [monitor] => 1 [threshold_min] => 70 [threshold_max] => 70 )
Array ( [handler] => 1 [monitor] => 1 [threshold_min] => 70 [threshold_max] => 70 )
threshold_min Array ( [handler] => 1 [monitor] => 1 [threshold_min] => 70 [threshold_max] => 70 )
threshold_max Array ( [handler] => 1 [monitor] => 1 [threshold_min] => 70 [threshold_max] => 70 )

And it retrieves the email addresses just fine.
However, when called from the note editing page through the same code path, I get:

reporter Array ( [threshold_min] => 100 [threshold_max] => 0 )
handler Array ( [threshold_min] => 100 [threshold_max] => 0 )
monitor Array ( [threshold_min] => 100 [threshold_max] => 0 )
bugnotes Array ( [threshold_min] => 100 [threshold_max] => 0 )
threshold_min Array ( [threshold_min] => 100 [threshold_max] => 0 )
threshold_max Array ( [threshold_min] => 100 [threshold_max] => 0 )

And it doesn't retrieve any email addresses.

I can't figure out what makes it return different values here... And it's making my emails-on-note-edit feature not work! Can anyone make any suggestions?

Thanks!
Post Reply