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

Update sorting of entries in maintable by special fields immediately #9338

Merged
merged 3 commits into from
Nov 3, 2022

Conversation

SebieF
Copy link
Contributor

@SebieF SebieF commented Nov 2, 2022

Once applied, entries in the maintable sorted by a special field value are getting updated immediately after their value has changed.

The workaround is necessary because specialFieldValues and entry.fields get updated separately (entry.fields before speicalFieldValues). This lead to the behaviour that when sorting for a special field in the maintaible (like ranking or read status), the sorting does not get updated properly on change.

Closes #9334. (See also the issue for a more detailed description of the underlying problem)

  • Change in CHANGELOG.md described in a way that is understandable for the average user (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 developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Workaround that is necessary because specialFieldValues and entry.fields get updated separately (entry.fields before speicalFieldValues). This lead to the behaviour that when sorting for a special field in the maintaible (like ranking or read status), the sorting does not get updated properly on change.
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 2, 2022
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.

Changes look good so far to me, thanks for your contribution. Looking for distraction from writing a thesis is probably how half of the other maintainers got to JabRef. :-)

Co-authored-by: Carl Christian Snethlage <[email protected]>
@calixtus
Copy link
Member

calixtus commented Nov 3, 2022

Would there be an quick and easy way to add a test to your solution?

@Siedlerchr Siedlerchr merged commit bcc200c into JabRef:main Nov 3, 2022
@SebieF SebieF deleted the specialFields-workaround branch November 3, 2022 14:30
Siedlerchr added a commit to yanyanliu1400/jabref that referenced this pull request Nov 7, 2022
* upstream/main: (61 commits)
  Bump jackson-datatype-jsr310 from 2.13.4 to 2.14.0 (JabRef#9357)
  Bump jackson-dataformat-yaml from 2.13.4 to 2.14.0 (JabRef#9356)
  Bump tika-core from 2.5.0 to 2.6.0 (JabRef#9358)
  Refine guideline "Set up a local workspace" (JabRef#9355)
  Adds missing "requires" statement (JabRef#9354)
  Bind "Find unlinked files" default directory to the current library (JabRef#9290)
  Rename "Remote" to "Tele" (JabRef#9270)
  Fixed display of file field adjusting for the dark theme (JabRef#9343)
  Update sorting of entries in maintable by special fields immediately (JabRef#9338)
  New translations JabRef_en.properties (German) (JabRef#9336)
  Fix Abbreviation for Escaped Ampersand (JabRef#9288)
  Fix font size preference not updating in preference dialog 8386 (JabRef#9287)
  New Crowdin updates (JabRef#9333)
  Refresh example styles
  Squashed 'buildres/csl/csl-styles/' changes from 4eee79a..13fd98e
  Bump unirest-java from 3.13.11 to 3.13.12 (JabRef#9330)
  Bump checkstyle from 10.3.4 to 10.4 (JabRef#9331)
  Bump gittools/actions from 0.9.14 to 0.9.15 (JabRef#9332)
  Group context menu presents relevant options depending on number of subgroups (JabRef#9286)
  Removed BibTeX file type and included HTML and Markdown types (JabRef#9318)
  ...
Siedlerchr added a commit that referenced this pull request Nov 8, 2022
* upstream/main:
  Add date format and respective test case (#9310)
  Bump jackson-datatype-jsr310 from 2.13.4 to 2.14.0 (#9357)
  Bump jackson-dataformat-yaml from 2.13.4 to 2.14.0 (#9356)
  Bump tika-core from 2.5.0 to 2.6.0 (#9358)
  Refine guideline "Set up a local workspace" (#9355)
  Adds missing "requires" statement (#9354)
  Bind "Find unlinked files" default directory to the current library (#9290)
  Rename "Remote" to "Tele" (#9270)
  Fixed display of file field adjusting for the dark theme (#9343)
  Update sorting of entries in maintable by special fields immediately (#9338)
  New translations JabRef_en.properties (German) (#9336)
  Fix Abbreviation for Escaped Ampersand (#9288)
  Fix font size preference not updating in preference dialog 8386 (#9287)

# Conflicts:
#	CHANGELOG.md
Siedlerchr added a commit to shafinkamal/jabref that referenced this pull request Nov 11, 2022
* upstream/main: (55 commits)
  Update guidelines-for-setting-up-a-local-workspace.md
  Add link to good first issues (and fix link)
  Refine guidelines (and fix .md file linking)
  Extend ArXiv fetcher results by using data from related DOIs (JabRef#9170)
  New Crowdin updates (JabRef#9366)
  Fix token
  New translations JabRef_en.properties (Chinese Simplified) (JabRef#9364)
  Fix date field change causes an uncaught exception (JabRef#9365)
  Add date format and respective test case (JabRef#9310)
  Bump jackson-datatype-jsr310 from 2.13.4 to 2.14.0 (JabRef#9357)
  Bump jackson-dataformat-yaml from 2.13.4 to 2.14.0 (JabRef#9356)
  Bump tika-core from 2.5.0 to 2.6.0 (JabRef#9358)
  Refine guideline "Set up a local workspace" (JabRef#9355)
  Adds missing "requires" statement (JabRef#9354)
  Bind "Find unlinked files" default directory to the current library (JabRef#9290)
  Rename "Remote" to "Tele" (JabRef#9270)
  Fixed display of file field adjusting for the dark theme (JabRef#9343)
  Update sorting of entries in maintable by special fields immediately (JabRef#9338)
  New translations JabRef_en.properties (German) (JabRef#9336)
  Fix Abbreviation for Escaped Ampersand (JabRef#9288)
  ...

# Conflicts:
#	CHANGELOG.md
#	src/main/java/org/jabref/preferences/AppearancePreferences.java
#	src/main/java/org/jabref/preferences/JabRefPreferences.java
#	src/test/java/org/jabref/gui/theme/ThemeManagerTest.java
Siedlerchr added a commit that referenced this pull request Nov 12, 2022
* upstream/main: (40 commits)
  Update guidelines-for-setting-up-a-local-workspace.md
  Add link to good first issues (and fix link)
  Refine guidelines (and fix .md file linking)
  Extend ArXiv fetcher results by using data from related DOIs (#9170)
  New Crowdin updates (#9366)
  Fix token
  New translations JabRef_en.properties (Chinese Simplified) (#9364)
  Fix date field change causes an uncaught exception (#9365)
  Add date format and respective test case (#9310)
  Bump jackson-datatype-jsr310 from 2.13.4 to 2.14.0 (#9357)
  Bump jackson-dataformat-yaml from 2.13.4 to 2.14.0 (#9356)
  Bump tika-core from 2.5.0 to 2.6.0 (#9358)
  Refine guideline "Set up a local workspace" (#9355)
  Adds missing "requires" statement (#9354)
  Bind "Find unlinked files" default directory to the current library (#9290)
  Rename "Remote" to "Tele" (#9270)
  Fixed display of file field adjusting for the dark theme (#9343)
  Update sorting of entries in maintable by special fields immediately (#9338)
  New translations JabRef_en.properties (German) (#9336)
  Fix Abbreviation for Escaped Ampersand (#9288)
  ...

# Conflicts:
#	CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintable status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing a specialFieldValue does not update the sorting of entries immediately
4 participants