Closed
Bug 439075
Opened 16 years ago
Closed 16 years ago
Importing bugs which have a multi-select field with a single value fail
Categories
(Bugzilla :: Bug Import/Export & Moving, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
(Keywords: regression)
Attachments
(1 file)
2.24 KB,
patch
|
gregaryh
:
review+
|
Details | Diff | Splinter Review |
I tried to import a bug from a 2.23.3 installation into a 3.1.4 one. Bugs which have no dependency or several ones are imported without any problem. Those having a single dependency cannot be imported and the following error is thrown: Can't use string ("1020") as an ARRAY ref while "strict refs" in use at ./importxml.pl line 568, <> chunk 1. The problem comes from: if ( defined $bug_fields{'dependson'} ) { $comments .= "This bug depended on bug(s) " . join(' ', @{$bug_fields{'dependson'}}) . ".\n"; If there is a single <dependson>1020</dependson> in the XML file, it's not seen as an array and @{...} fails. I cannot reproduce the problem when importing into Bugzilla 3.0.4, so this regression is pretty new. We should fix it before releasing 3.2 RC1.
Flags: blocking3.2+
Assignee | ||
Comment 1•16 years ago
|
||
OK, I regressed it in bug 417030, so I will fix it myself.
Assignee: import-export → LpSolit
Depends on: 417030
Assignee | ||
Comment 2•16 years ago
|
||
As discussed with ghendricks on IRC, this affects any multi-select field which has only one value selected, including custom multi-select fields, the dependency fields (dependson and blocked) and the CC list. In all other cases, this should be fine.
Status: NEW → ASSIGNED
Summary: Importing bugs which have only one dependency fail → Importing bugs which have a multi-select field with a single value fail
Assignee | ||
Comment 3•16 years ago
|
||
Make sure all checks about multi-select fields always have an array in hands.
Attachment #325030 -
Flags: review?(ghendricks)
Comment 4•16 years ago
|
||
Comment on attachment 325030 [details] [diff] [review] patch, v1 I like it. Simple, easy to remember.
Attachment #325030 -
Flags: review?(ghendricks) → review+
Assignee | ||
Updated•16 years ago
|
Flags: approval3.2+
Flags: approval+
Assignee | ||
Comment 5•16 years ago
|
||
tip: Checking in importxml.pl; /cvsroot/mozilla/webtools/bugzilla/importxml.pl,v <-- importxml.pl new revision: 1.84; previous revision: 1.83 done 3.1.4: Checking in importxml.pl; /cvsroot/mozilla/webtools/bugzilla/importxml.pl,v <-- importxml.pl new revision: 1.82.2.2; previous revision: 1.82.2.1 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•