Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectFactory#search_by_identifier bug #866

Open
alishaevn opened this issue Oct 3, 2023 · 0 comments
Open

ObjectFactory#search_by_identifier bug #866

alishaevn opened this issue Oct 3, 2023 · 0 comments
Assignees

Comments

@alishaevn
Copy link
Contributor

story

when using the default source_identifier value on v5.4.0, it does not return the correct work_index value in ObjectFactory#search_by_identifier. it returns source_sim while according to solr, the proper value should be source_tesim.
therefore a work is not found. this means that on the bulkrax entries show page, the "Item Link" says "Item has not yet been imported successfully". however, viewing the works page shows that the work was created.

ref: https://github.com/samvera/active_fedora/blob/v13.3.0/lib/active_fedora/indexing/field_mapper.rb#L29-L39

def search_by_identifier
  work_index = ::ActiveFedora.index_field_mapper.solr_name(work_identifier, :facetable)
  query = { work_index =>
            source_identifier_value }
  # Query can return partial matches (something6 matches both something6 and something68)
  # so we need to weed out any that are not the correct full match. But other items might be
  # in the multivalued field, so we have to go through them one at a time.
  match = klass.where(query).detect { |m| m.send(work_identifier).include?(source_identifier_value) }
  return match if match
end

screenshots

view here Screenshot 2023-10-03 at 5 53 48 PM Screenshot 2023-10-03 at 5 56 15 PM

acceptance criteria

  • [ ]
alishaevn added a commit that referenced this issue Oct 4, 2023
* restore the ability to load the "/importers" page.

there was an extra "x" in the app/views/bulkrax/importers/_oai_fields.html.erb file. it threw a syntax error when trying to create a new
importer.

* restore our ability to properly look up works by their `work_identifier`

- ref: #866
- ref:#867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants