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

fix backwards newest oldest sort order #11000

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

stevenwinship
Copy link
Contributor

@stevenwinship stevenwinship commented Nov 4, 2024

What this PR does / why we need it: Sort order in UI on dataset file listing is backwards for Newest and Oldest

Which issue(s) this PR closes:#10742

Special notes for your reviewer: fully tested the comparator and determined it was just a UI issue

Suggestions on how to test this: Test using UI
On a dataset file listing, click "Sort -> Newest"
The resulting order should be newest first.

On a dataset file listing, click "Sort -> Oldest"
The resulting order should be oldest first.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?: Included

Additional documentation:

@stevenwinship stevenwinship self-assigned this Nov 4, 2024
@stevenwinship stevenwinship added Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug a defect FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) labels Nov 4, 2024
@stevenwinship stevenwinship removed their assignment Nov 4, 2024
@qqmyers
Copy link
Member

qqmyers commented Nov 5, 2024

@stevenwinship - I see the JsonParserTest.parseDataverseDTO test failure - can you update from develop to get the fix for it (I assume that's the problem).

Copy link
Member

@qqmyers qqmyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - a simple swap of the two cases to get the order right. There is a test failing, presumably unrelated, but we should verify in QA.

@ofahimIQSS ofahimIQSS self-assigned this Nov 5, 2024
@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Nov 6, 2024

@stevenwinship I'm trying to push the PR to Internal and received a failure in jenkins: [ERROR] Failures:
[ERROR] JsonParserTest.parseDataverseDTO:286 expected: <pi@example.edu,student@example.edu> but was: pi@example.edu

Could you please update your PR with the latest from Dev. Thanks!

Edit: Just saw the update on the PR - will retest with latest build

@coveralls
Copy link

Coverage Status

coverage: 21.856%. remained the same
when pulling d8b7ed0 on 10742-newest-oldest-sort-order-backwards
into e208eed on develop.

@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Nov 6, 2024

@stevenwinship Came across an observation while testing the fix in Internal.

Reproduction Steps:

  1. Push PR to Internal https://dataverse-internal.iq.harvard.edu/
  2. Login
  3. Go to https://dataverse-internal.iq.harvard.edu/dataset.xhtml?persistentId=doi:10.70122/FK2/3KPIQP
  4. Add a file and sort by "Newest"
  5. See screenshot - look at the 4th data file in the data set Deposited on Nov 4th

Note: I uploaded 1 csv file on Nov 4th, 2024 and published the dataset. I pushed the fix to internal then I added 9 more files to the same dataset with Deposited date: Nov. 6, 2024.

image

@qqmyers
Copy link
Member

qqmyers commented Nov 6, 2024

My guess is that internal has Order By Folder turned on. With that, the sorting (newest/oldest/alphabetical, etc.) is done within each folder.

@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Nov 6, 2024

Thanks @qqmyers that did the trick. Merging PR
Testing of 11000.docx

Screen.Recording.2024-11-06.at.12.08.23.PM.mov

@ofahimIQSS ofahimIQSS merged commit 092e17f into develop Nov 6, 2024
11 checks passed
@ofahimIQSS ofahimIQSS deleted the 10742-newest-oldest-sort-order-backwards branch November 6, 2024 17:10
@ofahimIQSS ofahimIQSS removed their assignment Nov 6, 2024
@pdurbin pdurbin added this to the 6.5 milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug a defect
Projects
Status: Done 🧹
Development

Successfully merging this pull request may close these issues.

Dataset File Listing: Sort Order for Newest/Oldest is backwards
5 participants