Closed
Bug 362778
Opened 18 years ago
Closed 6 years ago
[BUGZILLA] Add ability to filter bug notifications by keywords
Categories
(Webtools Graveyard :: Mozbot, enhancement)
Webtools Graveyard
Mozbot
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: cedric.corazza, Assigned: reed)
References
Details
(Whiteboard: [has-attachment-][needs review comments addressed])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
wicked
:
review-
|
Details | Diff | Splinter Review |
It would be nice to have a filter on the 'Keywords' field. As I've been told, firebot filters on components at the moment. For instance, I filed a few bugs concerning a11y on a component which seems to be not watched (bug 362639 and bug 362745), and firebot didn't warn the #accessibility channel about them.
Hannibal told me on IRC that https://bugzilla.mozilla.org/show_bug.cgi?id=362639&ctype=xml should help to get this feature implemented, as there is a <keywords> tag.
Is this doable? I think this could be valuable for everyone.
Comment 1•18 years ago
|
||
Currently BugzillaMailHandler.pl doesn't need to check the XML output for every bug it reports to do any of the filtering.
There's the X-Bugzilla-Product and X-Bugzilla-Component headers in the message for it to filter by.
If there's not a way to find out the keyword state without checking the XML page, it'd create the overhead of having to send one request to bugzilla /per/ message coming into the script, if we want to provide the keywords in the bugmail log.
As an aside, it might be useful for the Calendar project to have an a11y component that can be watched by firebot for you.
Comment 2•18 years ago
|
||
(In reply to comment #1)
> If there's not a way to find out the keyword state without checking the XML
> page, it'd create the overhead of having to send one request to bugzilla /per/
> message coming into the script, if we want to provide the keywords in the
> bugmail log.
>
> As an aside, it might be useful for the Calendar project to have an a11y
> component that can be watched by firebot for you.
Surely you could check it only once for each bug, and change it yourself if you get a mail that changes the keywords? Though I suppose that could be a slippery slope into keeping a shadow bugzilla db around, which isn't really feasible of course...
Comment 3•18 years ago
|
||
Actually, Bug 311913, implemented a X-Bugzilla-Keywords (as well as a X-Bugzilla-Severity and X-Bugzilla-Who header) headers in the bugmail to complement X-Bugzilla-Product and X-Bugzilla-Component, into Bugzilla 2.22 and higher.
So, once bmo is upgraded to 3.0rc1 (which is planned for December 26th) this should be much easier to implement, and my comment #1 is moot.
Depends on: 311913
Updated•18 years ago
|
Severity: normal → enhancement
Summary: Would like ability to have mozbot filter on keywords → [BUGZILLA] Add ability to filter bug notifications by keywords
Assignee | ||
Comment 4•18 years ago
|
||
This is a WIP patch to implement this feature. I needed to transfer the patch to another machine, so I thought I would just attach it to the bug.
Assignee: ian → reed
Status: NEW → ASSIGNED
Comment 5•18 years ago
|
||
Comment on attachment 250040 [details] [diff] [review]
WIP - v1
This patch caused a regression in mozbot. Bugs without keywords were not reported at all.
To fix:
+ $line =~ /^(.+)$sep(.+)$sep(.+)$sep(.+)$sep(.+)$sep(.+)$sep(.*)$sep(.*)$sep(.+)$/;
Should be:
+ $line =~ /^(.+)$sep(.+)$sep(.+)$sep(.*)$sep(.+)$sep(.+)$sep(.*)$sep(.*)$sep(.+)$/;
Otherwise it seems to work. I'm testing it on firebot in the #regressions channel (where its watching for bugs with crash/regression keywords).
Assignee | ||
Comment 6•18 years ago
|
||
Ok, this is tested patch that works on firebot.
Attachment #250040 -
Attachment is obsolete: true
Attachment #250804 -
Flags: review?(wicked+bz)
Comment 7•18 years ago
|
||
Comment on attachment 250804 [details] [diff] [review]
patch - v1
>Index: Bugzilla.bm
>===================================================================
>- ['mutes', 1, 1, ''], # "channel channel channel"
>+ ['mutes', 1, 1, ''], # "channel channel channel",
Nit: No need to add that comma to that comment.
>+sub CreateChannelListForKeywords {
..
>+ ($chan_list .= ',' . $self->{'keywordReportChannels'}->{$_})
..
>+ return (split /\s*,\s*/, $chan_list);
These seem to add a blank entry to the chan_list array which results in all kinds of funky errors. Most importantly a "Wrong arguments passed to sendmsg() - ignored at ./mozbot.pl line 1023" error and extraneous bug information fetch. Fetch duplicates bug info output or fails with same sendmsg() if bug 293985 has been fixed.
>Index: BugzillaMailHandler.pl
>===================================================================
>@@ -396,6 +399,7 @@ sub generate_log ($) {
> my $prefix = $bug_info->{'bug_id'} . FIELD_SEPARATOR
> . $bug_info->{'product'} . FIELD_SEPARATOR
> . $bug_info->{'component'} . FIELD_SEPARATOR
>+ . $bug_info->{'keywords'} . FIELD_SEPARATOR
> . $bug_info->{'who'} . FIELD_SEPARATOR;
This produces error "Use of uninitialized value in concatenation (.) or string at ./BugzillaMailHandler.pl line 399, <STDIN> line 54." if there was no X-Bugzilla-Keywords header in the bugmail. This can happen if 1) Bugzilla is too old to have this or 2) it was never added or was removed from the bugmail template.
Attachment #250804 -
Flags: review?(wicked+bz) → review-
Updated•16 years ago
|
Whiteboard: [has-attachment]
Updated•16 years ago
|
Whiteboard: [has-attachment] → [has-attachment-][needs review comments addressed]
Mozbot/Firebot is in maintenance-only mode; no further changes are planned.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Updated•6 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•