Closed
Bug 292423
Opened 20 years ago
Closed 19 years ago
[BUGZILLA] mozbot fails on "bug XXX" searches if the installation has disabled target_milestone
Categories
(Webtools Graveyard :: Mozbot, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.6
People
(Reporter: mkanat, Assigned: mkanat)
Details
Attachments
(1 file)
|
962 bytes,
patch
|
cso
:
review+
|
Details | Diff | Splinter Review |
I'm trying to set up a mozbot against bugzilla.redhat.com, which doesn't use the target_milestone field. When I say: "bug 1922" to mozbot, it dies with this: Can't call method "getData" on an undefined value at (eval 131) line 322, <GEN132> chunk 1. (That line number isn't totally accurate for CVS, because I have one or two debug lines in there, also.) This is with the CVS tip as of today. In the XML, I have: <target_milestone/> So getFirstChild is probably returning undef, and that's killing this. Should be an easy fix.
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
OS: Linux → All
Target Milestone: --- → Mozbot 2.6
| Assignee | ||
Comment 1•20 years ago
|
||
This fixes it, verified by me against bugzilla.redhat.com. (You can see the working bot, "cluebot" in #fedora or #fedora-devel on FreeNode.) I'd ask justdave for review, but... I'm not sure he'd ever have the time. :-)
Attachment #182243 -
Flags: review?(ian)
Comment 2•20 years ago
|
||
Comment on attachment 182243 [details] [diff] [review] Fix ok, so we're not creating a %bug key for the field in it's null in the XML... so what happens when we try to reference it later? Is the later code using the %bug keys instead of the %fieldmap keys? If it's using %fieldmap, does it fail gracefully on a non-existing or undef key?
| Assignee | ||
Comment 3•20 years ago
|
||
(In reply to comment #2) > (From update of attachment 182243 [details] [diff] [review] [edit]) >[snip] If it's using %fieldmap, does it fail gracefully on a non-existing or > undef key? The later code is using the %bug keys, so it just excludes that field from the printed list. It works quite nicely, actually. :-)
| Assignee | ||
Updated•19 years ago
|
Attachment #182243 -
Flags: review?(ian) → review?(colin.ogilvie)
Comment 4•19 years ago
|
||
Just a useless 'me too' comment that this worked beautifully for me as well.
Comment 5•19 years ago
|
||
Comment on attachment 182243 [details] [diff] [review] Fix Seems to work in my test cases (bugs on redhat and mozilla's bugzilla) You could do the following I guess, but that may make the line quite long ;) $bug{$fieldMap{$field}} = $firstChild->getData();
Attachment #182243 -
Flags: review?(colin.ogilvie) → review+
| Assignee | ||
Comment 6•19 years ago
|
||
Ahh, good point. :-) I made the change before I did the checkin. :-) Checking in Bugzilla.bm; /cvsroot/mozilla/webtools/mozbot/BotModules/Bugzilla.bm,v <-- Bugzilla.bm new revision: 2.13; previous revision: 2.12 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
QA Contact: kerz → mozbot
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
•