Closed foglabs-zen closed 3 years ago
There is already a facet for avalon_resource_type
, but the facet is labelled as 'Format'. There is both a 'Format' and a 'Resource Type' field on the Ingest API soooooo... gonna have to figure out what's going on there.
Resource Type column's value is getting wiped out on ingest because its not duplicated on MasterFile#file_format
:
def set_resource_types!
self.avalon_resource_type = master_files.reject {|mf| mf.file_format.blank? }.collect{ |mf|
case mf.file_format
when 'Moving image'
'moving image'
when 'Sound'
'sound recording'
else
mf.file_format.downcase
end
}.uniq
end
We should probably omit the 'resource type' column and instead require 'file format' for each file, since the former will be wiped out in lieu of the latter unless we hack dat.
^ Confirmed
@foglabs-zen I'm not seeing this. Should there be a facet called "Resource Type" or am I misreading something?
Done When: -There is a facet for the 'Resource Type' Field -'Resource Type' only accepts either 'Sound Recording' or 'Moving Image' as values, to enable faceting of resource type field