Open jamieu opened 5 months ago
We also seem to be setting a parent link in getLinks
within jsonapi-response.js
on the data.links
element, but there is also a parent elect on the data.relationships
element too.
We should problay go over all this very careful as documents
already uses parent
in a very special way to drive the archive navigator and its tree like structure (which we don't to accidentally break).
We should probably use the grouping
elements to drive and hold parent/child structure for objects, rarther the the existing parent element (as that has a very specific and existing use, relating to documents
, within the codebase).
Root issue resolved https://github.com/TheScienceMuseum/collectionsonline/pull/1661
But we should probably take a fresh look over all of this before we forget ;-)
Which is the correct value to identify a MPHs' parent record?
The parent of a MPH child record (for example co8413707) appears in four different places (at least on most MPH child records) in the index.
1. parent
2. hierarch
3. hierarchy
4. grouping
Which field are currently being used
We are currently filtering the child record to display on a MPH parent record (co8413731) by the
grouping
element. This feels correct.However, we seem to be retrieving the title and link (back to the parent record) from the
parent
element. This is wrong / inconsistent with the above. We should change this to usegrouping
in order to be consistent.grouping
when passing/displaying parent title/link.Why do some records only have a
parent
element?On further investigation it seem that in the case of
1924-793
and1924-793/1
,1924-793
hasOPTION13=COLLECTION
.Therefore the parent record is behaving correctly in not displaying any child records. The child record is currently incorrectly showing a link to the parent as we are currently pulling the title/link from the
parent
element (which all child records have) rather than thegrouping
element (which only MPH children have)grouping
when passing/displaying parent title/link.~~It appears that some records (1924-793/1) contain only a
parent
element. Why is this? https://collection.sciencemuseumgroup.org.uk/objects/co8226380/components-of-the-james-watt-workshop-reproduction-replica-workshop-work-space~~This result in those record not being grouped or displayed under the MPH parent as that logic uses thegrouping
element. which for these child records doesn't exists.Why do these record have aparent
but not agrouping
element?What is the relationship between1924-793
and1924-793/1
in Mimsy?Should these records (1924-793/1) have agrouping
element? ie. are they direct dependent of a parent MPH record (1924-793) and we would expect to display on that parent page (co52336).