Resending ... forgot to CC list
Roudy Veve wrote:
As I am in a rush to get this Email function working. Here is the way
I get it working, now bugzilla can send me an Email when scmbug
happens a comment.
I took a similar approach albeit probably not as elegant. Attached is
my patch.
Cheers,
Matt
(Commit log message follows)
Extended process_activity_commit() to also call
/var/www/bugzilla/contrib/sendbugmail.pl after processing a commit. We
need to do this otherwise people will not be notified of changes
via scmbug. This is a bit of a hack but it works, should be portable
and is unlikely to stop working so long as sendbugmail.pl continues to
be supported.
Please note that this path is currently hardcoded and it would be nice
if it was specified somewhere in /etc/scmbug/daemon.conf
--
Matt Adams
Development & Network Services
Cypress Interactive
http://cypressinteractive.com, http://edsuite.com
Index: usr/share/scmbug/lib/Scmbug/Daemon/Integration.pm
===================================================================
--- usr/share/scmbug/lib/Scmbug/Daemon/Integration.pm (revision 187)
+++ usr/share/scmbug/lib/Scmbug/Daemon/Integration.pm (revision 188)
@@ -100,6 +100,34 @@
$self->bugtracker()->integration_disconnect_database();
+ ##
+ # [email protected] - Sun Sep 21 17:46:12 CDT 2008
+ # Step through commented/changed bugs and send Bugzilla mail
+ # Custom addition to trigger Bugzilla's own mailing processes since scmbug does not do this
+ #
+ my $username = $self->request()->{ translated_username };
+
+ foreach my $bugid ( @{ $self->request()->{ ids } } ) {
+ my $output = `cd /var/www/bugzilla && /usr/bin/perl -T contrib/sendbugmail.pl $bugid $username 2>&1`;
+ }
+
+ if ( $self->request()->{ policies }->{ resolution_template }->{ enabled } ) {
+ foreach my $bugid ( sort keys %{ $self->request()->{ resolution_ids } } ) {
+ ##
+ # FIXME: there should probably be some error checking & logging here using scmbugs activity log
+ # as I don't think that the error checking that is here really works
+ #
+ #my $installation_dir = $self->installation_directory;
+ #my $output = `cd $installation_dir && /usr/bin/perl -T contrib/sendbugmail.pl $bugid $username 2>&1`;
+ my $output = `cd /var/www/bugzilla && /usr/bin/perl -T contrib/sendbugmail.pl $bugid $username 2>&1`;
+ $? == -1
+ or return 1, "sendbugmail.pl failed $output: $?\n";
+ #
+ # End customization
+ ##
+ }
+ }
+
return $retval;
}
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users