New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make FOLIO item sort configurable. #2726
Conversation
@bbusenius, I'm interested to know how you're dealing with this situation at UChicago... |
Hi @demiankatz, for this we just do a |
Thanks, @bbusenius! I've revised this PR so it now offers two options: you can configure Also note that this changes the way VuFind generates copy numbers so that each holding location has its own numeric sequence; I think this probably makes more sense than the previous approach (though the change comes mostly as a side effect of refactoring rather than as a conscious design decision). |
@bbusenius, I also wonder if it might be valuable to refactor this very long method a bit so that there's a support method that formats a single item record, and another support record that formats a single holdings record... This will not only improve readability but also enable custom code like yours to be more narrowly targeted. Do you think that's worth doing here, or as a follow-up? |
I had forgotten that since we use enumeration and copy number for the |
Thanks, @bbusenius -- if you can give me an approval on this PR, then I can merge this and open a follow-up to refactor as discussed. (Of course, if there's anything here you don't feel comfortable approving, or if you'd like to get more eyes on this first, let me know and we can discuss/ask for more input first). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Thanks for taking us into consideration with the post sort!
Thanks, @bbusenius, I'll get to work on the refactoring as soon as time permits. :-) |
This PR adds a config setting to control the sort order of items within holding locations. It defaults to using volumes. Note that this is imperfect, as it uses an ASCII-based sort that will sort "100" before "90", etc. However, even with that limitation, it is an improvement on the completely random order we otherwise get. It could be augmented in future with additional settings to apply custom sorting in VuFind after the data has loaded.