Open
Bug 884730
Opened 12 years ago
Updated 12 years ago
Add an --exporter switch to importxml
Categories
(Bugzilla :: Bug Import/Export & Moving, enhancement)
Tracking
()
UNCONFIRMED
People
(Reporter: GeekShadow, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
1.95 KB,
patch
|
LpSolit
:
review-
|
Details | Diff | Splinter Review |
Currently each bug you want to import needs to have an exporter="" field in xml.
I ran a backup of bugs but I don't have this. So it would be nice to have a switch in importxml script to input the exporter.
![]() |
||
Updated•12 years ago
|
Severity: normal → enhancement
OS: Windows XP → All
Hardware: x86 → All
Reporter | ||
Comment 1•12 years ago
|
||
My patch work with --exporter=foo@bar.com but not --export foo@bar.com
also it's my first time on Perl.
Attachment #764764 -
Flags: review?(glob)
Attachment #764764 -
Flags: review?(LpSolit)
![]() |
||
Comment 2•12 years ago
|
||
Comment on attachment 764764 [details] [diff] [review]
v1 - add the --exporter flag
>+ if (!$exporter) {
>+ $exporter = $default_exporter;
>+ }
Simply write:
my $exporter = $root->{'att'}->{'exporter'} || $default_exporter;
> my $exporter_login = $root->{'att'}->{'exporter'};
>+
>+ if ($default_exporter) {
>+ $exporter_login = $default_exporter;
>+ }
Same here.
You also forgot to set the exporter around line 1268 if none is specified in the XML file.
Otherwise looks good. :)
Attachment #764764 -
Flags: review?(glob)
Attachment #764764 -
Flags: review?(LpSolit)
Attachment #764764 -
Flags: review-
Reporter | ||
Comment 3•12 years ago
|
||
Attachment #764764 -
Attachment is obsolete: true
Attachment #765233 -
Flags: review?(LpSolit)
Reporter | ||
Comment 4•12 years ago
|
||
@Frédéric
So what do you think ?
![]() |
||
Comment 5•12 years ago
|
||
Comment on attachment 765233 [details] [diff] [review]
v2 - add the --exporter flag
>+ my $exporter_login = $root->{'att'}->{'exporter'}; || $default_exporter;
The code doesn't compile due to the semi-colon before ||.
Also, you must detaint $exporter_login in process_bug(), else importxml.pl crashes:
Insecure dependency in parameter 5 of DBI::st=HASH(0xa677028)->execute method call while running with -T switch at ./importxml.pl line 1205.
One way to do it is to set $exporter_login = $exporter->login.
Do you want to upload a new patch with these problems fixed or do you want me to do it myself?
Attachment #765233 -
Flags: review?(LpSolit) → review-
You need to log in
before you can comment on or make changes to this bug.
Description
•