Bug #12845

CSV authority record import task --index option not working as expected

Added by Steve Breker 3 months ago. Updated 27 days ago.

Status:VerifiedStart date:03/01/2019
Priority:MediumDue date:
Assignee:Michelle Curran% Done:

0%

Category:CSV import
Target version:Release 2.5.0
Google Code Legacy ID: Tested version:2.5
Sponsored:No Requires documentation:

Description

The --index flag is getting overwritten when the relations file is being included.

You can see the value is being assigned at the top of the highlighted block here, then $import is being reassigned a new copy of the QubitFlatfileImport object at the bottom of the highlighted area:

https://github.com/artefactual/atom/blob/qa/2.5.x/lib/task/import/csvAuthorityRecordImportTask.class.php#L464-L484

The $import->csv method requires this option to be set before being called. This task creates a new instance of QubitFlatFileImport and assigns it to $import three times. Ensure that the --index flag is assigned each time $import is reassigned.

History

#1 Updated by Steve Breker 3 months ago

  • Tested version 2.4, 2.5 added

#2 Updated by Dan Gillean 3 months ago

  • Category set to CSV import

#4 Updated by Steve Breker 3 months ago

  • Status changed from New to In progress

#5 Updated by Mike Cantelon 3 months ago

  • Status changed from In progress to Feedback

The PR looks good to me!

You could use the ! operator to boolean not the option, but that might be less readable so it's pretty subjective.

#6 Updated by Steve Breker 3 months ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Steve Breker to Dan Gillean

Ready for QA

#7 Updated by Michelle Curran about 1 month ago

  • Assignee changed from Dan Gillean to Michelle Curran

#8 Updated by Michelle Curran about 1 month ago

  • Status changed from QA/Review to Verified
  • Tested version deleted (2.4)

#9 Updated by Dan Gillean 27 days ago

  • Target version set to Release 2.5.0

Also available in: Atom PDF