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

"All versions of #{gem} since #{date}" has paginated date #4448

Open
MarcusRiemer opened this issue Feb 13, 2024 · 0 comments · May be fixed by #4460
Open

"All versions of #{gem} since #{date}" has paginated date #4448

MarcusRiemer opened this issue Feb 13, 2024 · 0 comments · May be fixed by #4460
Labels

Comments

@MarcusRiemer
Copy link

Steps to Reproduce

  1. Visit the most recent page of some gem with a version history over multiple pages. Note that in the case of Rails it (as the time of writing) "466 versions since January 18, 2019."
  2. Visit the oldest page of the same gem, in the case of Rails the text now reads "466 versions since October 25, 2004".

Expected Behavior

The date should not change depending on the selected page, it should always be the date of the oldest page / the oldest known gem release.

Current Behavior

The date is dependent on the pagination. Pages in between get different dates.

albertchae added a commit to albertchae/rubygems.org that referenced this issue Feb 17, 2024
…page

Fixes rubygems#4448

Previously, the "since date" was using oldest `version.authored_at` for a given
page. This change fixes it to get the oldest `version.authored_at` in
the database. Because `authored_at` depends on either `built_at` or
`created_at`, I fetch both and take the min. This should only be 2
additional queries of 1 record each.

I modified existing tests to check for the "versions since" text and
also have 2 pages of actual content.
albertchae added a commit to albertchae/rubygems.org that referenced this issue Feb 20, 2024
…page

Fixes rubygems#4448

Previously, the "since date" was using oldest `version.authored_at` for a given
page. This change fixes it to get the oldest `version.authored_at` in
the database. Because `authored_at` depends on either `built_at` or
`created_at`, I fetch both and take the min. This should only be 2
additional queries of 1 record each.

I modified existing tests to check for the "versions since" text and
also have 2 pages of actual content.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant