You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why these changes are being introduced:
The same subject value can appear twice in the full record
view. In some cases, this is because the value appears in the
record for different subject kinds. However, it's also entirely
possible for the same kind/value pair to appear multiple times
[in the same record](https://timdex-ui-prod.herokuapp.com/record/alma:990005961340106761),
so merely including the subject kinds as we do in other TIMDEX UI
apps does not solve this problem.
Relevant ticket(s):
* [GDT-297](https://mitlibraries.atlassian.net/browse/GDT-297)
How this addresses that need:
This adds a `deduplicate_subjects` method that calls `uniq` on
a record's subject values (within a given term and across all
term), then returns the deduplicated, two-dimensional array
of values.
Side effects of this change:
Case is ignored to manage known instances of the same subject value
appearing as capitalized and lower-case. However, passing the
`downcase` to `uniq` causes it to select the first instance it
finds, meaning it may select the lower-case value if it comes first
in the record.
This feels like more of an annoyance than a bug, so I've chosen
not to add complexity to the deduplication method to fix it.
(Calling `humanize` on every subject value was tempting, but I
suspect there may be subjects that are intentionally case-sensitive.)
0 commit comments