From 83b2afe2f7f455734cc31b042f792e9a18444825 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Mon, 9 Sep 2024 10:26:41 -0400 Subject: [PATCH] Include bulkrax metadata in resource forms and indexers (#2314) * Include bulkrax metadata Several models were missing bulkrax identifier metadata on the forms and indexers, causing it to not be saved on the resource. * Update bulkrax Brings in fix with file importing. --- Gemfile.lock | 2 +- app/forms/etd_resource_form.rb | 1 + app/forms/oer_resource_form.rb | 1 + app/indexers/etd_resource_indexer.rb | 3 ++- app/indexers/oer_resource_indexer.rb | 3 ++- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 88eacbf88..f40faaf71 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,7 +120,7 @@ GIT GIT remote: https://github.com/samvera/bulkrax.git - revision: cd9b58226ef215528a716a761f1d2b47d8c24915 + revision: b511db6968a12023d74b6e2788947bfe70d5405d branch: main specs: bulkrax (8.1.0) diff --git a/app/forms/etd_resource_form.rb b/app/forms/etd_resource_form.rb index 4838446ac..cb4ecc3f1 100644 --- a/app/forms/etd_resource_form.rb +++ b/app/forms/etd_resource_form.rb @@ -8,6 +8,7 @@ class EtdResourceForm < Hyrax::Forms::ResourceForm(EtdResource) # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. # include Hyrax::FormFields(:basic_metadata) + include Hyrax::FormFields(:bulkrax_metadata) include Hyrax::FormFields(:etd_resource) include Hyrax::FormFields(:with_pdf_viewer) include Hyrax::FormFields(:with_video_embed) diff --git a/app/forms/oer_resource_form.rb b/app/forms/oer_resource_form.rb index e82a45a86..bcfc2df29 100644 --- a/app/forms/oer_resource_form.rb +++ b/app/forms/oer_resource_form.rb @@ -8,6 +8,7 @@ class OerResourceForm < Hyrax::Forms::ResourceForm(OerResource) # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. # include Hyrax::FormFields(:basic_metadata) + include Hyrax::FormFields(:bulkrax_metadata) include Hyrax::FormFields(:oer_resource) include Hyrax::FormFields(:with_pdf_viewer) include Hyrax::FormFields(:with_video_embed) diff --git a/app/indexers/etd_resource_indexer.rb b/app/indexers/etd_resource_indexer.rb index cb0ae1d38..999eb6260 100644 --- a/app/indexers/etd_resource_indexer.rb +++ b/app/indexers/etd_resource_indexer.rb @@ -3,7 +3,8 @@ # Generated via # `rails generate hyrax:work_resource EtdResource` class EtdResourceIndexer < Hyrax::ValkyrieWorkIndexer - include Hyrax::Indexer(:basic_metadata) + # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. + # include Hyrax::Indexer(:basic_metadata) include Hyrax::Indexer(:bulkrax_metadata) include Hyrax::Indexer(:etd_resource) include Hyrax::Indexer(:with_pdf_viewer) diff --git a/app/indexers/oer_resource_indexer.rb b/app/indexers/oer_resource_indexer.rb index ce009e3fd..31f8d1a7c 100644 --- a/app/indexers/oer_resource_indexer.rb +++ b/app/indexers/oer_resource_indexer.rb @@ -3,7 +3,8 @@ # Generated via # `rails generate hyrax:work_resource OerResource` class OerResourceIndexer < Hyrax::ValkyrieWorkIndexer - include Hyrax::Indexer(:basic_metadata) + # Commented out basic_metadata because these terms were added to etd_resource so we can customize it. + # include Hyrax::Indexer(:basic_metadata) include Hyrax::Indexer(:bulkrax_metadata) include Hyrax::Indexer(:oer_resource) include Hyrax::Indexer(:with_pdf_viewer)