Closed Bug 738896 Opened 12 years ago Closed 12 years ago

tr_importxml was not working and needs some patching on BZ 4.2 / Testopia 2.4

Categories

(Testopia :: Import/Export, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: florijn.peter, Assigned: aliustek)

References

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Attached patch Patch to make it work (obsolete) — Splinter Review
Attachment #608976 - Flags: review?(gregaryh)
Comment on attachment 608976 [details] [diff] [review]
Patch to make it work

>-    my $product = Bugzilla::Product::check_product( $e->field('tr:product') );
>+    my $product = new Bugzilla::Product( {name => $e->field('tr:product')} );

check_product() has been replaced by ->check(). new() doesn't throw any error if the product is invalid.
Attachment #608976 - Flags: review?(gregaryh) → review-
Attached patch Test Case ImportSplinter Review
Attachment #613197 - Flags: review?(LpSolit)
Attached file Import errors
I have updated the patch with Product->check() but still errors occurred when importing an XML file exported from Testopia from 3.6
Blocks: 743645
Comment on attachment 613197 [details] [diff] [review]
Test Case Import

>-    my $product = Bugzilla::Product::check_product( $e->parent->field('tr:product') );
>+    my $product = Bugzilla::Product->check($e->field('tr:product'));

The parameter is $e->parent->field('tr:product'), not $e->field('tr:product'). This can be fixed on checkin. Otherwise looks good. r=LpSolit
Attachment #613197 - Flags: review?(LpSolit) → review+
Assignee: gregaryh → aliustek
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 2.5
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/extensions/testopia/trunk/
modified extensions/Testopia/lib/Importer.pm
Committed revision 651.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Attachment #608976 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: