uvalib / tracksys

UVA Library Digitization Services workflow and repository management tool.
8 stars 2 forks source link

Assignments of master_files to components are incorrect #181

Closed sdm7g closed 10 years ago

sdm7g commented 10 years ago

Assignments of master_files to components are incorrect -- at least it appears so in the Reed Guide. ( We're checking to see how far back this bug goes. )

I think lib/import_iview.rb:122

        setname = root.xpath("//SetName/following-sibling::UniqueID[contains(., '#{iview_id}')]/preceding-sibling::SetName").last.text

should be:

        setname = root.xpath("//SetName/following-sibling::UniqueID[ normalize-space()= '#{iview_id}']/preceding-sibling::SetName").last.text

In the case of <UniqueID>2</UniqueID>, it is matching 2,12,2*,32,42 and 'last' is selecting 42 instead of 2 .

sdm7g commented 10 years ago

commit 5ba85dc1e1c7d9ccfc527b33fc1b917bcdce9f01 Author: Steve Majewski sdm7g@virginia.edu Date: Mon May 19 11:41:30 2014 -0400

Issue #181: Assignment of master_files to components are incorrect
https://github.com/uvalib-dcs/tracksys/issues/181

Code to fix check & bad assignments added as a rake task commit 402ec190a8c742e80854ce243727b496d36d2839