Open bkiahstroud opened 1 year ago
Assigning @laritakr to this for follow up support per slack convo.
#raw_data_from_batch_item
needs to account for when batch_item.source_location
is nil
batch_item.source_data
should be available in this case. Parse the data and count the number of intended children #raw_data_from_batch_item
needs to account for when batch_item.source_location
is present but the file cannot be found on the file system
this is blocked because I believe it will be done due to the resaving of every record, but we need to verify that.
@bkiahstroud now that we've been through most of the fedora -> pg migration, can you confirm if this still needs to be run or was it updated when we resaved the records?
@bkiahstroud now that we've been through most of the fedora -> pg migration, can you confirm if this still needs to be run or was it updated when we resaved the records?
@orangewolf assuming we're only concerned with Valkyrie records, I don't believe this needs to be run anymore.
# Count: Valkyrie Asset SolrDocuments that are missing a :intended_children_count_isi value
ActiveFedora::SolrService
.get('has_model_ssim:Asset AND valkyrie_bsi:true AND -intended_children_count_isi:[* TO *]')
.dig('response', 'numFound')
=> 0
# Count: Valkyrie Asset SolrDocuments that are missing a :validation_status_for_aapb_tesim value
ActiveFedora::SolrService
.get('has_model_ssim:Asset AND valkyrie_bsi:true AND -validation_status_for_aapb_tesim:[* TO *]')
.dig('response', 'numFound')
=> 0
@jillpe what's left to do here?
Story
PR
Ref
A "missing child" validation was added for
Asset
s in https://github.com/scientist-softserv/dev-ops/issues/729. With the changes made for that ticket, all future XML imports/ingests will have eachAsset
count its number of intended children and save that number to be used later for validation. The purpose of this ticket is to do the same, except for existingAsset
records.A script needs to be written that will loop through all existing
Asset
s and set both the:intended_children_count
and:validation_status_for_aapb
properties.Acceptance Criteria
:intended_children_count
and:validation_status_for_aapb
for all existingAsset
recordsTesting Instructions
ActiveFedora::SolrService.get('-intended_children_count_isi:[* TO *] has_model_ssim:Asset')['response']['numFound']
. Verify the result is0
ActiveFedora::SolrService.get('-validation_status_for_aapb_tesim:[* TO *] has_model_ssim:Asset')['response']['numFound']
. Verify the result is0
find
a randomAsset
that has at least one child record:intended_children_count
. Make sure it is notnil
or0
:validation_status_for_aapb
. Make sure it is notnil