Closed Bug 303284 Opened 19 years ago Closed 19 years ago

[BUGZILLA] When directly addressed, mozbot should report information about bugs regardless of whether its within backOffTime

Categories

(Webtools Graveyard :: Mozbot, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: cso, Assigned: cso)

Details

Attachments

(2 files)

Mozbot used to always respond to "bug xyz" when directly addressed, but bug
293181 changed that.

Forthcoming patch to put the facility back...
Attached patch Patch v1 β€” β€” Splinter Review
Attachment #191508 - Flags: review?(mkanat)
Summary: When directly addressed, mozbot should report information about bugs regardless of whether its within backOffTime → [BUGZILLA] When directly addressed, mozbot should report information about bugs regardless of whether its within backOffTime
Comment on attachment 191508 [details] [diff] [review]
Patch v1

>@@ -168,9 +168,9 @@
>         my $bug = $1;
>         # Single bugs use xml.cgi, because then we get error messages
>         if ($bug =~ m/^\d+$/) {
>-            $self->FetchBug($event, $bug, 'bug', 0, 0);
>+            $self->FetchBug($event, $bug, 'bug', 0, 0, 1);
>         } else {
>-            $self->FetchBug($event, $bug, 'bugs', 0, 0);
>+            $self->FetchBug($event, $bug, 'bugs', 0, 0, 1);
>         }
>         $self->{'bugsHistory'}->{$target}->{$bug} = $event->{'time'} if $bug =~ m/^[0-9]+$/os;
>     } elsif ($message =~ m/^\s*bug-?total\s+(.+?)\s*$/osi) {

  This looks like he'll $sayAlways every time somebody mentions "bug 123456",
even if the bot isn't being directly adressed...?
Attachment #191508 - Flags: review?(mkanat) → review-
Comment on attachment 191508 [details] [diff] [review]
Patch v1

It lives in sub Told, which, according to BotModules/devel.txt is called for
messages prefixed by the bot's nickname.
Attachment #191508 - Flags: review- → review?(mkanat)
Comment on attachment 191508 [details] [diff] [review]
Patch v1

OK, if you say it works, I believe you. It looks all right.

However, I'd really like those last three FetchBug params to become a single hash (named parameters) instead of sequential parameters. Could you perhaps do that?
Attachment #191508 - Flags: review?(mkanat) → review+
Attached patch Patch v2 β€” β€” Splinter Review
Hashrefs.... think I got all the callers.
Attachment #202874 - Flags: review?(mkanat)
Comment on attachment 202874 [details] [diff] [review]
Patch v2

Yeah, that looks much better. :-)

r=mkanat by inspection
Attachment #202874 - Flags: review?(mkanat) → review+
Fix checked in...

Checking in BotModules/Bugzilla.bm;
/cvsroot/mozilla/webtools/mozbot/BotModules/Bugzilla.bm,v  <--  Bugzilla.bm
new revision: 2.18; previous revision: 2.17
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
QA Contact: kerz → mozbot
Target Milestone: --- → 2.6
Verified Fixed.
Status: RESOLVED → VERIFIED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: