Hello, the provided code isn't just copy and paste. You have to extend Bugzilla.pm to add support for version 3.2.x. For bug comments only (incl. mentioned mailing) it shouldn't be a big task to patch the source file.
Mit freundlichen Grüßen / Best regards Oliver Schäfer Software Development & Integration MB-technology GmbH Kolumbusstraße 2 71063 Sindelfingen Fon +49 (0)160-86 86 945 [email protected] Fax +49 (0)7031-686-3010 http://www.mbtech-group.com MB-technology GmbH, Kolumbusstr. 19+21, 71063 Sindelfingen, Geschäftsführer: Dipl.-Wirtsch.-Ing. Hartmut Tresp, Amtsgericht Stuttgart, HRB 24 4792, Vorsitzender des Aufsichtsrats: Dr. Thomas Weber On Feb 13, 2009, at 12:18 AM, James Webb wrote: > Thank you, Oliver, for that bit of code. I may be missing something > but into > which file does this code go? > > To answer another question presented earlier.... I am just the > repository 'guy' when it comes to our move from CVS to Subversion > which > happens to include Bugzilla and an integration tool to make > everything work > together. > I don't care one way or the other but everyone else really wants > to be able > to get their comments into Bugzilla and receive an email just as > they used to > before. And yes they do NOT want one when it is not connected to a > bug. It > IS what they want and I did not care to ask or argue. > > James L. Webb Jr. > ------- > systems programmer > > >> Hello Kristis, >> >> here's some code for http://bugzilla.mkgnu.net/show_bug.cgi?id=832 >> and >> Bugzilla 3.2 >> >> use Bugzilla; >> use Bugzilla::Config; >> use Bugzilla::Bug; >> use Bugzilla::BugMail; >> >> #Add bug comment to Bugzilla and send mail. >> my $changer = new Bugzilla::User({ name => $login_name}); >> Bugzilla->set_user($changer); >> my $vars = {}; >> $vars->{'changer'} = Bugzilla->user->login; >> foreach my $bugid (@bugs) { >> >> my $issue = new Bugzilla::Bug($bugid); >> $issue->add_comment($message); >> $issue->update; >> Bugzilla::BugMail::Send($bugid, $vars); >> } >> >> Mit freundlichen Grüßen / Best regards >> >> Oliver Schäfer >> >> Software Development & Integration >> MB-technology GmbH >> Kolumbusstraße 2 >> 71063 Sindelfingen >> >> >> Fon +49 (0)160-86 86 945 oliver.schaefer at mbtech-services.com >> Fax +49 (0)7031-686-3010 http://www.mbtech-group.com >> >> >> MB-technology GmbH, Kolumbusstr. 19+21, 71063 Sindelfingen, >> Geschäftsführer: Dipl.-Wirtsch.-Ing. Hartmut Tresp, >> Amtsgericht Stuttgart, HRB 24 4792, Vorsitzender des Aufsichtsrats: >> Dr. Thomas Weber >> >> Diese E-Mail kann vertrauliche Informationen enthalten. Wenn Sie >> nicht >> der Adressat sind, sind Sie nicht zur >> Verwendung dieser Informationen befugt. Bitte benachrichtigen Sie uns >> sofort über den irrtümlichen Empfang. >> >> This email may contain confidential information. If you are not the >> addressee you are not authorized to make >> use of the information contained in this email. Please inform us >> immediately that you have received it by mistake. >> >> On Jan 31, 2009, at 2:24 AM, Kristis Makris wrote: >>> Hi James, >>> >>> On Fri, 2009-01-30 at 15:34 -0600, James Webb wrote: >>>> To all, >>>> >>>> >>>> I was going through the archives and buglist and found there is >>>> a bug for >>>> possibly using the native bugtracker's email ability to send >>>> emails. I wanted >>>> to know what happened to that idea? >>> >>> You are referring to two different things: >>> >>> 1) Use the native bugtracker's email ability to send emails. >>> >>> http://bugzilla.mkgnu.net/show_bug.cgi?id=784 >>> >>> 2) Actually FOLLOW the bugtracker's email process when a commit >>> happens >>> or a tag is applied. >>> >>> http://bugzilla.mkgnu.net/show_bug.cgi?id=832 >>> >>> >>> If we skipped (1), all would still be well, because... we still have >>> an >>> ability to send emails. >>> >>> We haven't implemented (2) yet. A patch for (2) was developed, but >>> it >>> has not been merged yet. >>> >>>> What the real issue is... >>> >>> I am not sure what the real issue you are describing is. >>> >>>> I have a simple hook setup to email all staff when a commit >>>> happens. But >>>> what I want is a second email to be sent for bug updates such >>>> as "[productname] [bug 1000]... " but I don't want >>>> "[productname] [bug NONE]... ". >>> >>> First, these emails are sent by Scmbug, not the bug-tracker. Thus, >>> the >>> discussion of (1) and (2) are irrelevant here. >>> >>> Second, why ? Does "[bug NONE]" bother you ? >>> >>> What is the real issue ? I believe "[bug NONE]" will be sent if you >>> are >>> using CVS and you are applying a tag. This is configurable. You can >>> choose to NOT send emails when tagging by setting mail_on_label to 0 >>> in >>> glue.conf. >>> >>>> Obviously you only get an email from Bugzilla when you edit a >>>> real bug; >>>> and, it only goes out to the ones assigned to the bug or who placed >>>> the bug. >>> >>> ..? >>> >>> I hope this helps somewhat... ? >>> _______________________________________________ >>> scmbug-users mailing list >>> scmbug-users at lists.mkgnu.net >>> http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users > _______________________________________________ > scmbug-users mailing list > [email protected] > http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users _______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
