Closed Bug 562329 Opened 15 years ago Closed 14 years ago

importxml.pl shouldn't set the resolution to INVALID when a closed bug has none

Categories

(Bugzilla :: Bug Import/Export & Moving, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: fabian, Assigned: LpSolit)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.0.18) Gecko/2010021619 Camino/2.0.2 (like Firefox/3.0.18) Build Identifier: Bugzilla-3.6 Use of uninitialized value $resolution in concatenation (.) or string at ./importxml.pl line 1027. code: 1026 if(!$valid_res){ 1027 $err .= "Unknown resolution \"$resolution\".\n"; 1028 $err .= " Setting resolution to MOVED\n"; Problem here is that the assumption is made that resolution is always set to something. However, it is initialised to undef when not found in the input XML, and at various places undeffed at as well. Hence a suggested fix: if(!$valid_res){ if (defined $resolution) { $err .= "Resolution value absent.\n"; } else { $err .= "Unknown resolution \"$resolution\".\n"; } $err .= " Setting resolution to MOVED\n"; $resolution = "MOVED"; } The problem just results in a warning, nothing big really. Reproducible: Always
Severity: normal → trivial
Version: unspecified → 3.6
Attached patch patch, v1Splinter Review
If there is no resolution defined, then the bug is reopened and so we shouldn't set the resolution to INVALID.
Assignee: import-export → LpSolit
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #528130 - Flags: review?(gregaryh)
Severity: trivial → normal
Summary: importxml.pl: Use of uninitialized value problem → importxml.pl shouldn't set the resolution to INVALID when a closed bug has none
Target Milestone: --- → Bugzilla 4.0
Comment on attachment 528130 [details] [diff] [review] patch, v1 mkanat said I didn't need review for this.
Attachment #528130 - Flags: review?(gregaryh) → review+
Flags: approval4.0+
Flags: approval+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified importxml.pl Committed revision 7788. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/ modified importxml.pl Committed revision 7577.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: