Skip to content
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

As a content editor, when I'm editing a source I want footnotes sorted by location so I can review them in the same order they appear in the source. #810

Closed
4 tasks done
rlskoeser opened this issue Apr 25, 2022 · 13 comments
Assignees

Comments

@rlskoeser
Copy link
Contributor

rlskoeser commented Apr 25, 2022

testing notes

  1. In admin, go to scholarship records -> sources and choose a source that has multiple footnotes with locations set.
  2. Confirm that sources are now ordered by location.

dev notes

  • implement a natural sort field
  • use new natural sort field for location
  • sort on new natural sort location field
  • remove natsort template tag and use in scholarship records template
@rlskoeser rlskoeser self-assigned this Apr 25, 2022
@rlskoeser
Copy link
Contributor Author

configured ordering on source footnote inline in d8f0929

@rlskoeser rlskoeser added the 🗜️ awaiting testing Implemented and ready to be tested label Apr 25, 2022
@richmanrachel
Copy link

@rlskoeser - it mostly works! I think the main issues are the data inconsistencies in how the locations are entered, but also there are some oddities like "109, 10, 110" [for reference, I'm looking at the entries for Gil's Pious Foundations: https://test-geniza.cdh.princeton.edu/admin/footnotes/source/38/change/?_changelist_filters=q%3Dgil ]

@richmanrachel
Copy link

Here is a screenshot from Gil's unsorted Kingdom of Ishmael, which show the type of data problems we have:
image

But when I changed the number in the location box to make it more consistent, saving did cause it to reorder properly.

@richmanrachel
Copy link

Here for Kingdom of Ishmael vol. 2, the doc numbers are more consistent and producing good results:
image
@rlskoeser - So should this be a data problem that I close here and assign to RAs?

@rlskoeser
Copy link
Contributor Author

@richmanrachel right now it's sorting the locations as strings and not numbers — which is why you're seeing the order "109, 10, 110". I see that there's a django naturalsort library — we could try using that. Ben used a natural sort when displaying footnotes on the scholarship records page, but if this library (or the approach) works, then we would have that logical sorting available everywhere. Please let me know how important that is — do you want simple sort right away, or should we spend a little more time and implement natural sorting?

I think the other things you're seeing are a result of the data and you all need to decide how consistent you want to be in tracking footnotes — would make sense to me to be consistent within a single source, but IDK how much effort that is or how much value it gives you for existing contetn. Maybe you could set up as conventions to follow going forward.

@richmanrachel
Copy link

@rlskoeser - I agree conventions are a good idea.

If implementing naturalsort takes less than 30 minutes, could we try it?

@rlskoeser
Copy link
Contributor Author

@richmanrachel yes, I think it's worth trying to implement natural sort — it will be useful in a couple of places if we can get it working

@rlskoeser rlskoeser added ⚠️ tested needs attention Has been through acceptance testing and needs additional work 🗜️ awaiting testing Implemented and ready to be tested and removed 🗜️ awaiting testing Implemented and ready to be tested ⚠️ tested needs attention Has been through acceptance testing and needs additional work labels Apr 27, 2022
@rlskoeser
Copy link
Contributor Author

@richmanrachel updated to use natural sort order for footnote locations. Please confirm in the admin view editing a single source with many footnotes and also check the scholarship details page for a document that has a number of sources to check that the sorting is still correct there.

@richmanrachel
Copy link

@rlskoeser - just got a server error while trying to update footnotes for Gil's Pious Foundations (which only has 145 footnotes) :(

@rlskoeser
Copy link
Contributor Author

@richmanrachel based on the error in the log, I think the error may be related to the recent db migration we did on the staging db — it's complaining about a log entry key violation.

I think I'll need to refresh the data from production at some point, which I hope will clear out these problems.

@richmanrachel
Copy link

@rlskoeser - got it. Should I pause testing for now so you can run it? Or should I keep going with other open issues and we can return to this next week?

@rlskoeser
Copy link
Contributor Author

@richmanrachel please test other open issues and I'll plan to refresh the db next week

@richmanrachel richmanrachel added ⚠️ tested needs attention Has been through acceptance testing and needs additional work and removed 🗜️ awaiting testing Implemented and ready to be tested labels Apr 29, 2022
@richmanrachel
Copy link

Works! Closing!

@rlskoeser rlskoeser removed the ⚠️ tested needs attention Has been through acceptance testing and needs additional work label May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants