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

Fixed secondary sorting not working for some special fields #7409

Merged
merged 3 commits into from
Feb 1, 2021
Merged

Fixed secondary sorting not working for some special fields #7409

merged 3 commits into from
Feb 1, 2021

Conversation

Fu188
Copy link
Contributor

@Fu188 Fu188 commented Feb 1, 2021

Since we do not set compartor if the special field is "Relevancy" or "Quality" or "Print status", it would not work for secondary sorting. To deal with it, I add a file called "ToggleFieldComparator" to be these three toggle special field as their comparator. And it works now. Fixes #7015

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

Example: Set "Relevancy" as the first criteria and "Year" as the second.

Ascending
image

Descending
image

@Fu188 Fu188 requested a review from tobiasdiez February 1, 2021 14:11
Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution!

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Yes, looks good! Thanks!

@calixtus calixtus changed the title Fix the secondary sorting is not working for some special fields Fixed secondary sorting not working for some special fields Feb 1, 2021
@calixtus calixtus merged commit c951877 into JabRef:master Feb 1, 2021
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

Successfully merging this pull request may close these issues.

Secondary sorting: not working for some special fields
4 participants