Update EDTFYear.php to handle multi valued fields#149
Merged
seth-shaw-asu merged 1 commit intoIslandora:2.xfrom Aug 28, 2025
Merged
Update EDTFYear.php to handle multi valued fields#149seth-shaw-asu merged 1 commit intoIslandora:2.xfrom
seth-shaw-asu merged 1 commit intoIslandora:2.xfrom
Conversation
joecorall
reviewed
Aug 20, 2025
| $paragraph_field_config = reset($paragraph_ids); | ||
| $paragraph_field_config_array = explode('.', $paragraph_field_config); | ||
| $paragraph_field_name = end($paragraph_field_config_array); | ||
| $paragraph_entity = $entity->get($paragraph_field_name) |
Member
There was a problem hiding this comment.
need to keep this in case $entity references a deleted paragraph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this Pull Request do?
Before this the EDTF Year processor would only grab years from the first value of a multi valued field. This updates it to get years from each value.
How should this be tested?
Check the years that are being indexed from multi valued fields before and after these changes. I tested on normal fields, and you can see the before and after here:


It should also be tested on paragraphs. This updates it to handle multiple paragraphs as well, but I'm not familiar with paragraphs so it would be good to get some expert feedback on that aspect.
Interested parties
@Islandora/committers