Skip to content

[Port to black-forest] Fix numeric sorting for citationcount, day, and dayfiled columns - #18

Merged
Siedlerchr merged 1 commit into
black-forestfrom
port-17649-to-black-forest
Nov 7, 2026
Merged

Siedlerchr merged 1 commit into
black-forestfrom
port-17649-to-black-forest

Conversation

@jabref-machine

Copy link
Copy Markdown
Collaborator

Port of JabRef#17649 to black-forest, see Branching strategy.

If this PR is a draft, the cherry-pick conflicted: the conflicting files are committed with Git's conflict markers left in. Resolve the markers locally, push, and mark the PR ready.

…Ref#17649)

### Summary

Fixes JabRef#17459

In `StandardField.java`, the fields `CITATIONCOUNT`, `DAY`, and
`DAYFILED` were missing `FieldProperty.NUMERIC`. Because of this, their
table columns sorted values alphabetically (e.g. `1, 10, 2, 200, 9`)
rather than numerically (`1, 2, 9, 10, 200`).

Following maintainer guidance in JabRef#17459 and JabRef#17469, this PR:
1. Adds `FieldProperty.NUMERIC` to `CITATIONCOUNT`, `DAY`, and
`DAYFILED` in `StandardField.java`.
2. Adds unit test coverage in `StandardFieldTest.java` verifying
`isNumeric()` on all updated fields.
3. Adds a changelog entry to `CHANGELOG.md`.

### Steps to test

1. Open JabRef.
2. In Settings -> Entry Table, add columns for `day` or `citationcount`.
3. Create entries with numerical values (e.g. 1, 2, 9, 10, 20).
4. Click the column header to sort. Notice they sort in numerical order.

### Related issues and pull requests

Closes JabRef#17459

### AI usage

I used Antigravity / Gemini 3.8 Flash (Medium) to assist with finding
the enum in `StandardField.java` and preparing unit tests in
`StandardFieldTest.java`. I reviewed, tested, and verified all changes
locally.

### Checklist

- [x] I own the copyright of the code submitted and I license it under
the [MIT license](https://github.com/JabRef/jabref/blob/main/LICENSE)
- [x] If AI tools were used, I disclosed them in the "AI usage" section
and reviewed, understood, and take full ownership of all AI-generated
code
- [x] I manually tested my changes in running JabRef (always required)
- [x] I added JUnit tests for changes (if applicable)
- [ ] I added screenshots in the PR description (if change is visible to
the user)
- [x] I added **one sentence (max 20 words)** to `CHANGELOG.md`
describing the change from the user's point of view (if the change is
visible to the user)
- [/] I checked the [user documentation](https://docs.jabref.org/) for
up to dateness and submitted a pull request to our [user documentation
repository](https://github.com/JabRef/user-documentation/tree/main/en)

---------

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>
(cherry picked from commit 4bedad1)
@jabref-machine jabref-machine added the automerge PR is tagged with that label will be merged if workflows are green label Nov 5, 2026
@Siedlerchr
Siedlerchr added this pull request to the merge queue Nov 7, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Nov 7, 2026
Merged via the queue into black-forest with commit a930133 Nov 7, 2026
77 of 90 checks passed
@Siedlerchr
Siedlerchr deleted the port-17649-to-black-forest branch November 7, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge PR is tagged with that label will be merged if workflows are green status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants