Skip to content

Add a new field for citation count#13531

Merged
koppor merged 54 commits into
JabRef:mainfrom
SalvadorRomo:fix-for-issue-13477
Jul 21, 2025
Merged

Add a new field for citation count#13531
koppor merged 54 commits into
JabRef:mainfrom
SalvadorRomo:fix-for-issue-13477

Conversation

@SalvadorRomo

@SalvadorRomo SalvadorRomo commented Jul 12, 2025

Copy link
Copy Markdown

Closes #13477

This PR add a new filed in the General Count to fetch the citationCount for a given Entry, with the ability to look it up.

Steps to test

1- Add a new paper
2- Go to the General Tab and
3 - Place your cursor in the new Citation Field
4- next to the field, there is button available to start the search
5- if the value is blank or the TTL for the actual Doi has expiered, the field must be filled with the expected value
6- if the there is an existing value or the TTL is not yet reached, it won't perform fetching and will keep the same value
image

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • [/] 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.

@SalvadorRomo SalvadorRomo changed the title Fix for issue 13477 PR to add a new field for citation count Jul 12, 2025
Comment thread jablib/src/main/java/org/jabref/model/entry/field/FieldFactory.java
Comment thread jabgui/src/main/java/org/jabref/gui/fieldeditors/FieldEditors.java
Comment thread jabgui/src/main/java/org/jabref/gui/fieldeditors/FieldEditors.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/entryeditor/SciteTab.java
Comment thread jabgui/src/main/java/org/jabref/gui/entryeditor/SciteTab.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/fieldeditors/CitationCountEditor.java Outdated
// JabRef-specific fields
GROUPS("groups"),
OWNER("owner"),
CITATIONCOUNT("Citation count"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Field name should be in lowercase with underscores for consistency with other field names. The display name should be sentence case as per UI text guidelines.

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 - how can this happen?

@SalvadorRomo SalvadorRomo requested a review from koppor July 18, 2025 13:12
koppor
koppor previously approved these changes Jul 21, 2025

@koppor koppor 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.

The space in the field name is strange.

An additional test (writing BibTeX and trying to read it) would have discoved it. However, too much effort for the gain. I fixed it.

I also parsed the error field and display it to the user at deee352 (#13531)

"Funny" DOI is 10.1145/1028174.971312, where no citation count is available, but the tab "Citation information" shows the count.

We will create a follow up issue (internal link https://github.com/JabRef/jabref-issue-melting-pot/issues/995).

I will let this through to move forward.

// JabRef-specific fields
GROUPS("groups"),
OWNER("owner"),
CITATIONCOUNT("Citation count"),

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 - how can this happen?

@koppor koppor enabled auto-merge July 21, 2025 09:11
koppor
koppor previously approved these changes Jul 21, 2025
koppor
koppor previously approved these changes Jul 21, 2025
@trag-bot

trag-bot Bot commented Jul 21, 2025

Copy link
Copy Markdown

@trag-bot didn't find any issues in the code! ✅✨

@koppor koppor added this pull request to the merge queue Jul 21, 2025
Merged via the queue into JabRef:main with commit d6858cb Jul 21, 2025
1 check passed
@SalvadorRomo

Copy link
Copy Markdown
Author

thks @koppor !!! i saw you are going to open a deffect, plase feel free to consider me in resolving, i will appreciate it

@koppor

koppor commented Jul 21, 2025

Copy link
Copy Markdown
Member

@SalvadorRomo Thank you! Just grab the issue if you feel comfortable working with. I currently don't have the capacity to do a deep management...

dcarpentiero pushed a commit to dcarpentiero/jabref that referenced this pull request Jul 24, 2025
* first changes

* partial change

* add fields to GUI

* finish change

* fix citation count identifier

* adding tests

* add more testing

* remove unwanted logic

* add entry to change log

* resolve comments

* resolve comments

* resolve conflicts

* enhance citation count change log

* enhance citation count change log

* change assertion style

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve test errors

* resolve conflicts

* fix branch

* fix test

* remove unused class

* resolve comment

* Update CHANGELOG.md

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

* resolve comments

* fix comments

* fix comments

* fix comments

* fix issues

* fix comments

* remove unused import

* fix comments

* fix test cases

* fix comments

* fix tests

* Fix space in fieldname

* Use "error" from server for notification of error

* Fix requires for xmlunit

* Ensure that streams are closed during test

* Fix test file

* Fix OpenRewrite

---------

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Co-authored-by: Salvador Romo <salvadorromo@MacBook-Air-de-Salvador.local>
Siedlerchr added a commit that referenced this pull request Aug 2, 2025
* upstream/main:
  Bump jablib/src/main/resources/csl-locales from `3bad433` to `ea1b54f` (#13565)
  New Crowdin updates (#13562)
  Add a new field for citation count (#13531)
  Automatic lookup of DOI at citation relations (#13539)
  Update dependency com.konghq:unirest-modules-gson to v4.5.0 (#13557)
  Group tab is now empty when there are no libraries open (#13473)
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.

Add citation count field (including semantic scholar fetcher)

3 participants