Closed erussey closed 1 year ago
# PUI Inheritance
# Define the fields for a record type that are inherited from ancestors
# if they don't have a value in the record itself.
# This is used in common/record_inheritance.rb and was developed to support
# the public UI application.
# Note - any changes to record_inheritance config will require a reindex of pui
# records to take affect. To do this remove files from indexer_pui_state
AppConfig[:record_inheritance] = {
:archival_object => {
:inherited_fields => [
{
:property => 'title',
:inherit_directly => true
},
{
:property => 'component_id',
:inherit_directly => false
},
{
:property => 'lang_materials',
:inherit_directly => false
},
{
:property => 'dates',
:inherit_directly => true
},
{
:property => 'extents',
:inherit_directly => false
},
{
:property => 'linked_agents',
:inherit_if => proc {|json| json.select {|j| j['role'] == 'creator'} },
:inherit_directly => false
},
{
:property => 'notes',
:inherit_if => proc {|json| json.select {|j| j['type'] == 'accessrestrict'} },
:inherit_directly => true
},
{
:property => 'notes',
:inherit_if => proc {|json| json.select {|j| j['type'] == 'scopecontent'} },
:inherit_directly => false
},
{
:property => 'notes',
:inherit_if => proc {|json| json.select {|j| j['type'] == 'langmaterial'} },
:inherit_directly => false
},
]
}
}
@erussey Above is the default config. I'm not aware of any customizations for these properties, so I'm just guessing this is what we have. Everywhere above that states :inherit_directly => true
will never preface the value with an inheritance statement. As always, we can change these values to false
and get that preface, but it will involve a complete reindex of all archival_object
s.
We shouldn't move forward with this change until we confirm that this particular configuration is either already customized (if that's the case, I'll reach out to basecamp and get a copy of this code snippet), or we are sporting the default configuration in this case.
@bwatson78 : What are the next steps here?
The behavior the archivists want is documented in the ticket description (i.e. We want the prefix to appear on scope and content, lang_materials, extent, dates, and restrictions on access). I am assuming, if I am reading the documentation correctly, that this change would only be for notes inherited from a parent level and if the note is present on the archival object there would be no inheritance. Correct?
Currently only some of the inherited notes for an archival object contain an indication that the note is inherited from a higher level of the finding aid. According to the documentation for the PUI, the following notes can be inherited at lower levels of the finding aid if a note at the lower level is missing by default: title, identifier, language code, dates, extents, creator, access restrictions note, scope and contents note, language of material note. For more information see: archival inheritance
The text "from the collection" or "from the series" or from the subseries" (depending on the finding aid level) should prefix all notes that are inherited from a higher level to notify the user that the note may not be directly applicable to that archival object. This is happening for some notes, but not all. See: https://emory-dev.lyrasistechnology.org/repositories/7/archival_objects/943962 (where the text is appearing for scope and content, language, extent but NOT for dates and restrictions on access). Please note that this extra text should only appear when the note is inherited; if a note exists at the archival object level, that note should appear without the text.
Please ensure the behavior for inherited notes is the same for all note types where notes are inherited. Right now it is not working for dates and restrictions on access.