Closed
Bug 293181
Opened 19 years ago
Closed 19 years ago
[BUGZILLA] Move bugsHistory checking into FetchBug
Categories
(Webtools Graveyard :: Mozbot, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
2.6
People
(Reporter: mkanat, Assigned: cso)
References
Details
Attachments
(1 file, 1 obsolete file)
2.70 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
The Bugzilla.bm module checks every time somebody mentions a bug, to make sure that it hasn't reported it too recently. It does this in CheckForBugs, which calls FetchBug. However, with the new bzbot-into-mozbot code (bug 292492), we call FetchBug directly when we want to mention a bug. So the bzbot-into-mozbot will report the same bug over and over, if many changes to the same bug come in a few seconds apart. Instead, the check should happen in FetchBug, and there should be a parateter to override it. Also, we have so many parameters to the Bugzilla.bm GetURI, now, that I think we should instead pass the final args as a hash of params, since so many of them are optional.
Reporter | ||
Comment 1•19 years ago
|
||
*** Bug 302117 has been marked as a duplicate of this bug. ***
Reporter | ||
Updated•19 years ago
|
Assignee: mkanat → colin.ogilvie
Target Milestone: --- → Mozbot 2.6
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #190570 -
Flags: review?(mkanat)
Reporter | ||
Comment 3•19 years ago
|
||
Comment on attachment 190570 [details] [diff] [review] Patch v1 It looks generally good. Only two comments: needToFetchBug is both an accessor and a mutator. That is, it gives us information, and as a side effect it silently changes the bugsHistory. I'd prefer to have two different functions for doing it. Also, we might as well make bugsToFetch an array and pass it around as an arrayref, while we're in that code anyway. Oh, and you don't need to do "return unless scalar(@ids) > 0" -- you can just do "return unless @ids" (that's a nit).
Attachment #190570 -
Flags: review?(mkanat) → review-
Reporter | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•19 years ago
|
||
(In reply to comment #3) > needToFetchBug is both an accessor and a mutator. That is, it gives us > information, and as a side effect it silently changes the bugsHistory. I'd > prefer to have two different functions for doing it. Fixed by moving the change out of needToFetchBug, not moving it to another function though as it doesn't seem to need one for one line of code... > Also, we might as well make bugsToFetch an array and pass it around as an > arrayref, while we're in that code anyway. That's a bigger change than this bug deals with IMO. > Oh, and you don't need to do "return unless scalar(@ids) > 0" -- you can just > do "return unless @ids" (that's a nit). Changed...
Attachment #190605 -
Flags: review?(mkanat)
Assignee | ||
Updated•19 years ago
|
Attachment #190570 -
Attachment is obsolete: true
Reporter | ||
Comment 5•19 years ago
|
||
Comment on attachment 190605 [details] [diff] [review] Patch v2 Yeah, this looks right. I can't yet test it on ssdbot, because it seems to conflict with the "DUPLICATE of" patch, but I'll get it into ssdbot soon.
Attachment #190605 -
Flags: review?(mkanat) → review+
Assignee | ||
Comment 6•19 years ago
|
||
Perhaps checking things in would help... I can never remember if the Bugzilla module needs anything more than r+ from someone though otherwise I would.
Reporter | ||
Comment 7•19 years ago
|
||
The Bugzilla module only needs r+. You can check in anything with an r+ on it.
Assignee | ||
Comment 8•19 years ago
|
||
(In reply to comment #5) > Yeah, this looks right. I can't yet test it on ssdbot, because it seems to > conflict with the "DUPLICATE of" patch, but I'll get it into ssdbot soon. Interesting - it didn't conflict when doing the checkin :) Checking in BotModules/Bugzilla.bm; /cvsroot/mozilla/webtools/mozbot/BotModules/Bugzilla.bm,v <-- Bugzilla.bm new revision: 2.16; previous revision: 2.15 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
QA Contact: kerz → mozbot
Updated•5 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•