Re: bugzilla & hooks for processing attachments
- From: Stefan Kost <ensonic hora-obscura de>
- To: Frederic Peters <fpeters gnome org>
- Cc: desktop-devel-list gnome org
- Subject: Re: bugzilla & hooks for processing attachments
- Date: Thu, 24 Sep 2009 11:52:40 +0300
Frederic Peters schrieb:
> Stefan Kost wrote:
>
>
>> I am sure there are more ideas. So if someone could let me know if
>> bugzilla has hooks and maybe have some pointer on how to get started, I
>> could give that a try (yeah, I know its written in perl, no worries).
>>
>
> There is https://wiki.mozilla.org/Bugzilla:Writing_Extensions and
> there are some extensions in the bugzilla.gnome.org repository.
>
> http://mail.gnome.org/archives/gnome-bugsquad/2009-September/msg00006.html
>
Thanks for the pointers. It does not sound too difficult. We need to
write an extension that uses code-hooks. Here is an example for
attachements:
http://mxr.mozilla.org/mozilla/source/webtools/bugzilla/extensions/example/code/attachment-process_data.pl
and here is some more docs about the parameters:
http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/Hook.html#attachment-process_data
http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/Attachment.html#Instance_Properties
so we would need to extend the example to write the file to a tempdir,
run file command against it and append the output to the description.
Kind of like this:
$args->{attributes}->{description} .= `file $tmp_data`;
do we have a toy instance where I could try this?
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]