[p4dti-discussion] Changelist description in bugzilla mail

Alen Ladavac alenl-ml at croteam.com
Tue Jan 15 10:53:39 GMT 2008


I'm trying to look into this, but my perl skills are not that shiny,
so I'm not sure I'm comprehending the overall design completely, and I
guess a little review wouldn't hurt before I blow everything up:

First, it seems that something like this:

[% IF bug.p4dti.hasfixes %]
  Fixed by Bugzilla changes:
  [% FOREACH fix = bug.p4dti.fixes %]
    [% fix.changelist %]
  [% END %]
[% END %]

should be added to
"template/en/default/email/newchangedmail.txt.tmpl".

But it looks like the "bug" value is not available to that template,
so I guess I should add something like this:

  bug => new Bugzilla::Bug($id),

to the $vars list in sendMail in the "Bugzilla/BugMail.pl"

Am I completely off with this? I notice that Bugzilla::BugMail uses
the Bugzilla::Bug very sparingly, but it is not clear if there
a good reason for that or is that just legacy....

Thanks,
Alen

Nick wrote:

> At 2007-12-21 07:34:49+0000, Alen Ladavac writes:
>> Hi all,
>> 
>> When a bugzilla bug is resolved by fixing a job in perforce, bugzilla
>> will send an email. However, the mail does not contain any info of the
>> changelist. By looking at the mail, it is not possible to say whether
>> the bug was resolved manually (in bugzilla), or by fixing a job in p4.
>> 
>> Is there any way to make the mail contain the changelist
>> description or number?

> Only by patching the code in Bugzilla which sends the email.  This
> wouldn't be especially hard for a Perl programmer.

> At present the replicator just invokes the usual Bugzilla email
> system, which does not know that the change was made via Perforce.

> Nick Barnes
> P4DTI Project
> Ravenbrook Limited







-- 
Alen



More information about the P4DTI-discussion mailing list