Skip to content

Fixed secondary sorting not working for some special fields#7409

Merged
calixtus merged 3 commits into
JabRef:masterfrom
Fu188:fix-for-issue-7015
Feb 1, 2021
Merged

Fixed secondary sorting not working for some special fields#7409
calixtus merged 3 commits into
JabRef:masterfrom
Fu188:fix-for-issue-7015

Conversation

@Fu188

@Fu188 Fu188 commented Feb 1, 2021

Copy link
Copy Markdown
Contributor

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

Comment thread src/main/java/org/jabref/gui/util/comparator/ToggleFieldComparator.java Outdated
@Fu188 Fu188 requested a review from tobiasdiez February 1, 2021 14:11

@Siedlerchr Siedlerchr left a comment

Copy link
Copy Markdown
Member

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!

@calixtus calixtus left a comment

Copy link
Copy Markdown
Member

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