Skip to content

RIS export SP/EP fields when pages contain Unicode en-dash or em-dash#15315

Merged
calixtus merged 4 commits into
JabRef:mainfrom
faneeshh:fix-15106
Mar 13, 2026
Merged

RIS export SP/EP fields when pages contain Unicode en-dash or em-dash#15315
calixtus merged 4 commits into
JabRef:mainfrom
faneeshh:fix-15106

Conversation

@faneeshh

@faneeshh faneeshh commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Related issues and pull requests

Closes #15106

PR Description

Since the split regex only matched ASCII hyphens, both SP and EP ended up with the full page range instead of being split correctly. Extended the regex in FirstPage.java and LastPage.java to also match en-dash and em-dash characters.

Steps to test

  1. Create a library entry with pages = {13905--13911}
  2. Export as RIS
  3. Verify the exported file contains SP - 13905 and EP - 13911 (previously both contained the full range)
2026-03-10.20-17-26.mp4

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • [/] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Fix RIS export page range splitting for Unicode dashes

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Fixed RIS export splitting page ranges with en-dash and em-dash characters
• Extended regex patterns in FirstPage and LastPage formatters
• Now correctly exports SP and EP fields for Unicode dash characters
Diagram
flowchart LR
  A["Page range with en/em-dash"] -->|"FirstPage.format()"| B["Extract start page"]
  A -->|"LastPage.format()"| C["Extract end page"]
  B -->|"Updated regex"| D["Correct SP field"]
  C -->|"Updated regex"| E["Correct EP field"]
Loading

Grey Divider

File Changes

1. jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java 🐞 Bug fix +1/-1

Add Unicode dash support to FirstPage formatter

• Extended split regex to include en-dash (U+2013) and em-dash (U+2014) characters
• Changed from [ \\-]+ to [ \\-\u2013\u2014]+ pattern
• Enables correct extraction of first page from ranges with Unicode dashes

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java


2. jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java 🐞 Bug fix +1/-1

Add Unicode dash support to LastPage formatter

• Extended split regex to include en-dash (U+2013) and em-dash (U+2014) characters
• Changed from [\\-]+ to [\\-\u2013\u2014]+ pattern
• Enables correct extraction of last page from ranges with Unicode dashes

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java


3. CHANGELOG.md 📝 Documentation +1/-0

Document RIS export page range fix

• Added entry documenting the RIS export page range splitting fix
• References issue #15106
• Placed in Fixed section of changelog

CHANGELOG.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (5) 📘 Rule violations (5) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Missing unicode dash testcases📘 Rule violation ✓ Correctness
Description
Behavior in FirstPage/LastPage was changed to handle en-dash/em-dash page ranges, but the
existing unit tests were not updated to cover these new inputs. This risks regressions and leaves
the reported bug scenario unverified by automated tests.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
PR modifies core logic under org.jabref.logic to split pages on \u2013/\u2014, which is a
behavior change requiring test updates. The existing FirstPageTest/LastPageTest only cover ASCII
hyphen variants and do not include en-dash/em-dash inputs.

AGENTS.md
AGENTS.md
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]
jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`FirstPage` and `LastPage` were updated to split page ranges on Unicode en-dash/em-dash, but the existing unit tests only cover ASCII hyphen variants. Add/extend tests so the new behavior is verified and regressions are prevented.
## Issue Context
The production code now uses a split regex including `\u2013` and `\u2014`, which changes parsing behavior in `org.jabref.logic`.
## Fix Focus Areas
- jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
- jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. EP retains whitespace🐞 Bug ✓ Correctness
Description
LastPage.format() splits only on dash characters and returns pageParts[1] without trimming, so a
page range like "13905 – 13911" produces an EP value with leading/trailing spaces that is written
verbatim into RIS output.
Code

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[R16-18]

+        String[] pageParts = s.split("[\\-\u2013\u2014]+");
      if (pageParts.length == 2) {
          return pageParts[1];
Evidence
LastPage’s split regex does not include spaces, unlike FirstPage, so whitespace around the dash
remains attached to the second token. RIS layouts use LastPage directly for the EP line, and
TemplateExporter (used for RIS) writes each line as-is (no trimming), so the whitespace propagates
into the exported file.

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-21]
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[12-21]
jablib/src/main/resources/resource/layout/ris/ris.article.layout[8-9]
jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[53-53]
jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[269-275]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`LastPage.format()` splits page ranges on dash characters but does not consume surrounding whitespace and does not trim the extracted last page. For inputs with spaces around the dash (e.g., `"13905 – 13911"`), RIS export can emit `EP  -  13911` (note the leading space) because TemplateExporter writes the formatted line verbatim.
### Issue Context
`FirstPage` already treats spaces as separators, but `LastPage` does not, creating inconsistent SP/EP formatting.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-23]
### Suggested fix approach
- Align the split pattern with `FirstPage` by including spaces: `[ \-\u2013\u2014]+`.
- Trim the returned page tokens (`pageParts[0]`, `pageParts[1]`) before returning.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Missing unicode dash testcases📘 Rule violation ✓ Correctness
Description
Behavior in FirstPage/LastPage was changed to handle en-dash/em-dash page ranges, but the
existing unit tests were not updated to cover these new inputs. This risks regressions and leaves
the reported bug scenario unverified by automated tests.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
PR modifies core logic under org.jabref.logic to split pages on \u2013/\u2014, which is a
behavior change requiring test updates. The existing FirstPageTest/LastPageTest only cover ASCII
hyphen variants and do not include en-dash/em-dash inputs.

AGENTS.md
AGENTS.md
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]
jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`FirstPage` and `LastPage` were updated to split page ranges on Unicode en-dash/em-dash, but the existing unit tests only cover ASCII hyphen variants. Add/extend tests so the new behavior is verified and regressions are prevented.
## Issue Context
The production code now uses a split regex including `\u2013` and `\u2014`, which changes parsing behavior in `org.jabref.logic`.
## Fix Focus Areas
- jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
- jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (3)
4. EP retains whitespace🐞 Bug ✓ Correctness
Description
LastPage.format() splits only on dash characters and returns pageParts[1] without trimming, so a
page range like "13905 – 13911" produces an EP value with leading/trailing spaces that is written
verbatim into RIS output.
Code

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[R16-18]

+        String[] pageParts = s.split("[\\-\u2013\u2014]+");
     if (pageParts.length == 2) {
         return pageParts[1];
Evidence
LastPage’s split regex does not include spaces, unlike FirstPage, so whitespace around the dash
remains attached to the second token. RIS layouts use LastPage directly for the EP line, and
TemplateExporter (used for RIS) writes each line as-is (no trimming), so the whitespace propagates
into the exported file.

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-21]
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[12-21]
jablib/src/main/resources/resource/layout/ris/ris.article.layout[8-9]
jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[53-53]
jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[269-275]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`LastPage.format()` splits page ranges on dash characters but does not consume surrounding whitespace and does not trim the extracted last page. For inputs with spaces around the dash (e.g., `"13905 – 13911"`), RIS export can emit `EP  -  13911` (note the leading space) because TemplateExporter writes the formatted line verbatim.
### Issue Context
`FirstPage` already treats spaces as separators, but `LastPage` does not, creating inconsistent SP/EP formatting.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-23]
### Suggested fix approach
- Align the split pattern with `FirstPage` by including spaces: `[ \-\u2013\u2014]+`.
- Trim the returned page tokens (`pageParts[0]`, `pageParts[1]`) before returning.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Missing unicode dash testcases📘 Rule violation ✓ Correctness
Description
Behavior in FirstPage/LastPage was changed to handle en-dash/em-dash page ranges, but the
existing unit tests were not updated to cover these new inputs. This risks regressions and leaves
the reported bug scenario unverified by automated tests.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
PR modifies core logic under org.jabref.logic to split pages on \u2013/\u2014, which is a
behavior change requiring test updates. The existing FirstPageTest/LastPageTest only cover ASCII
hyphen variants and do not include en-dash/em-dash inputs.

AGENTS.md
AGENTS.md
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]
jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`FirstPage` and `LastPage` were updated to split page ranges on Unicode en-dash/em-dash, but the existing unit tests only cover ASCII hyphen variants. Add/extend tests so the new behavior is verified and regressions are prevented.
## Issue Context
The production code now uses a split regex including `\u2013` and `\u2014`, which changes parsing behavior in `org.jabref.logic`.
## Fix Focus Areas
- jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
- jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. EP retains whitespace🐞 Bug ✓ Correctness
Description
LastPage.format() splits only on dash characters and returns pageParts[1] without trimming, so a
page range like "13905 – 13911" produces an EP value with leading/trailing spaces that is written
verbatim into RIS output.
Code

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[R16-18]

+        String[] pageParts = s.split("[\\-\u2013\u2014]+");
      if (pageParts.length == 2) {
          return pageParts[1];
Evidence
LastPage’s split regex does not include spaces, unlike FirstPage, so whitespace around the dash
remains attached to the second token. RIS layouts use LastPage directly for the EP line, and
TemplateExporter (used for RIS) writes each line as-is (no trimming), so the whitespace propagates
into the exported file.

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-21]
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[12-21]
jablib/src/main/resources/resource/layout/ris/ris.article.layout[8-9]
jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[53-53]
jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[269-275]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`LastPage.format()` splits page ranges on dash characters but does not consume surrounding whitespace and does not trim the extracted last page. For inputs with spaces around the dash (e.g., `"13905 – 13911"`), RIS export can emit `EP  -  13911` (note the leading space) because TemplateExporter writes the formatted line verbatim.
### Issue Context
`FirstPage` already treats spaces as separators, but `LastPage` does not, creating inconsistent SP/EP formatting.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-23]
### Suggested fix approach
- Align the split pattern with `FirstPage` by including spaces: `[ \-\u2013\u2014]+`.
- Trim the returned page tokens (`pageParts[0]`, `pageParts[1]`) before returning.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

7. Duplicated page split regex📘 Rule violation ⛯ Reliability
Description
The same page-range splitting regex is duplicated in both FirstPage and LastPage, increasing the
risk of future divergence and inconsistent behavior. This violates the guideline to refactor
duplicated logic into shared helpers/constants.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
PR Compliance ID 45 requires refactoring copy-pasted logic into shared helpers. The identical regex
literal is introduced/maintained in two separate classes on modified lines, meaning the duplication
is part of this PR's touched code.

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The page-range splitting regex is duplicated in both `FirstPage` and `LastPage`, which increases maintenance cost and the risk of future inconsistent updates.
## Issue Context
Both classes use the identical `split("[ \\-\u2013\u2014]+")` expression on modified lines.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. Em-dash validation mismatch 🐞 Bug ⛯ Reliability
Description
FirstPage/LastPage now treat the Unicode em-dash (\u2014) as a page-range separator for export
formatting, but PagesChecker’s validation regex does not allow \u2014, so the same pages value can
be considered invalid by integrity checks while still being split for export. This creates
inconsistent behavior for entries using em-dash page ranges.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
The PR explicitly adds \u2014 to the page splitting regex in layout formatters, but PagesChecker’s
allowed range separators include only '+', double hyphen, or en-dash (\u2013). Therefore, a pages
field containing an em-dash range will be rejected by the integrity checker even though export
formatting now recognizes it as a separator.

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[10-22]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[10-25]
jablib/src/main/java/org/jabref/logic/integrity/PagesChecker.java[12-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Export formatting (`FirstPage`/`LastPage`) now recognizes em-dash (\u2014) as a pages range separator, but `PagesChecker` validation does not. This can lead to integrity warnings for data that exports “correctly”.
### Issue Context
`PagesChecker` is used for page-range validation; `FirstPage`/`LastPage` are used during export formatting (e.g., RIS SP/EP).
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/integrity/PagesChecker.java[14-17]
- jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[12-21]
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-23]
### Suggested implementation direction
- If em-dash should be valid, extend `BIBTEX_RANGE_SEPARATOR` / `BIBLATEX_RANGE_SEPARATOR` to include `\u2014`.
- Optionally add/adjust tests for PagesChecker to cover em-dash ranges.
- Ensure the chosen behavior is consistent across validation and export.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


9. Duplicated page split regex📘 Rule violation ⛯ Reliability
Description
The same page-range splitting regex is duplicated in both FirstPage and LastPage, increasing the
risk of future divergence and inconsistent behavior. This violates the guideline to refactor
duplicated logic into shared helpers/constants.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
PR Compliance ID 45 requires refactoring copy-pasted logic into shared helpers. The identical regex
literal is introduced/maintained in two separate classes on modified lines, meaning the duplication
is part of this PR's touched code.

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The page-range splitting regex is duplicated in both `FirstPage` and `LastPage`, which increases maintenance cost and the risk of future inconsistent updates.
## Issue Context
Both classes use the identical `split("[ \\-\u2013\u2014]+")` expression on modified lines.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
10. Em-dash validation mismatch 🐞 Bug ⛯ Reliability
Description
FirstPage/LastPage now treat the Unicode em-dash (\u2014) as a page-range separator for export
formatting, but PagesChecker’s validation regex does not allow \u2014, so the same pages value can
be considered invalid by integrity checks while still being split for export. This creates
inconsistent behavior for entries using em-dash page ranges.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
The PR explicitly adds \u2014 to the page splitting regex in layout formatters, but PagesChecker’s
allowed range separators include only '+', double hyphen, or en-dash (\u2013). Therefore, a pages
field containing an em-dash range will be rejected by the integrity checker even though export
formatting now recognizes it as a separator.

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[10-22]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[10-25]
jablib/src/main/java/org/jabref/logic/integrity/PagesChecker.java[12-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Export formatting (`FirstPage`/`LastPage`) now recognizes em-dash (\u2014) as a pages range separator, but `PagesChecker` validation does not. This can lead to integrity warnings for data that exports “correctly”.
### Issue Context
`PagesChecker` is used for page-range validation; `FirstPage`/`LastPage` are used during export formatting (e.g., RIS SP/EP).
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/integrity/PagesChecker.java[14-17]
- jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[12-21]
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-23]
### Suggested implementation direction
- If em-dash should be valid, extend `BIBTEX_RANGE_SEPARATOR` / `BIBLATEX_RANGE_SEPARATOR` to include `\u2014`.
- Optionally add/adjust tests for PagesChecker to cover em-dash ranges.
- Ensure the chosen behavior is consistent across validation and export.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@github-actions github-actions Bot added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Mar 11, 2026
@faneeshh

Copy link
Copy Markdown
Collaborator Author

Still have to write the tests.

Comment thread jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java
Comment thread jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java Outdated
@testlens-app

This comment has been minimized.

@subhramit

Copy link
Copy Markdown
Member

Still have to write the tests.

Please convert the PR to draft, in that case.

@faneeshh faneeshh marked this pull request as draft March 11, 2026 10:32
@faneeshh

Copy link
Copy Markdown
Collaborator Author

Still have to write the tests.

Please convert the PR to draft, in that case.

Done. It was really hard to find that tiny convert to draft button +_+

@testlens-app

This comment has been minimized.

@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Mar 11, 2026
@testlens-app

This comment has been minimized.

@faneeshh faneeshh marked this pull request as ready for review March 11, 2026 22:12
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Fix RIS export page range splitting with Unicode dashes

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Fixed RIS export to correctly split page ranges with en-dash and em-dash characters
• Extended regex patterns in FirstPage and LastPage formatters to recognize Unicode dash variants
• Added comprehensive test cases for en-dash, em-dash, and spaced dash separators
• Updated CHANGELOG to document the fix for issue #15106
Diagram
flowchart LR
  A["Page range with Unicode dashes<br/>13905–13911 or 13905—13911"] -->|FirstPage formatter| B["Extract start page<br/>13905"]
  A -->|LastPage formatter| C["Extract end page<br/>13911"]
  D["Updated regex pattern<br/>includes \u2013 and \u2014"] -->|Applied to| B
  D -->|Applied to| C
Loading

Grey Divider

File Changes

1. jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java 🐞 Bug fix +1/-1

Add Unicode dash support to FirstPage formatter

• Updated split regex from [ \\-]+ to [ \\-\u2013\u2014]+ to match en-dash and em-dash
 characters
• Enables correct extraction of first page number from ranges using Unicode dash separators

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java


2. jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java 🐞 Bug fix +1/-1

Add Unicode dash support to LastPage formatter

• Updated split regex from [\\-]+ to [ \\-\u2013\u2014]+ to match en-dash and em-dash characters
• Enables correct extraction of last page number from ranges using Unicode dash separators

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java


3. jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java 🧪 Tests +4/-1

Add Unicode dash test cases for FirstPage

• Added three new test cases for en-dash (\u2013), em-dash (\u2014), and spaced en-dash
 separators
• Tests verify correct extraction of first page (13905) from various Unicode dash formats

jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java


View more (2)
4. jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java 🧪 Tests +4/-1

Add Unicode dash test cases for LastPage

• Added three new test cases for en-dash (\u2013), em-dash (\u2014), and spaced en-dash
 separators
• Tests verify correct extraction of last page (13911) from various Unicode dash formats

jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java


5. CHANGELOG.md 📝 Documentation +1/-0

Document RIS export page range fix

• Added entry documenting the fix for RIS export page range splitting issue #15106
• Clarifies that the fix addresses incorrect handling of page ranges in exported RIS files

CHANGELOG.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (2) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Missing unicode dash testcases 📘 Rule violation ✓ Correctness
Description
Behavior in FirstPage/LastPage was changed to handle en-dash/em-dash page ranges, but the
existing unit tests were not updated to cover these new inputs. This risks regressions and leaves
the reported bug scenario unverified by automated tests.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
PR modifies core logic under org.jabref.logic to split pages on \u2013/\u2014, which is a
behavior change requiring test updates. The existing FirstPageTest/LastPageTest only cover ASCII
hyphen variants and do not include en-dash/em-dash inputs.

AGENTS.md
AGENTS.md
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]
jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`FirstPage` and `LastPage` were updated to split page ranges on Unicode en-dash/em-dash, but the existing unit tests only cover ASCII hyphen variants. Add/extend tests so the new behavior is verified and regressions are prevented.
## Issue Context
The production code now uses a split regex including `\u2013` and `\u2014`, which changes parsing behavior in `org.jabref.logic`.
## Fix Focus Areas
- jablib/src/test/java/org/jabref/logic/layout/format/FirstPageTest.java[23-30]
- jablib/src/test/java/org/jabref/logic/layout/format/LastPageTest.java[23-31]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. EP retains whitespace 🐞 Bug ✓ Correctness
Description
LastPage.format() splits only on dash characters and returns pageParts[1] without trimming, so a
page range like "13905 – 13911" produces an EP value with leading/trailing spaces that is written
verbatim into RIS output.
Code

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[R16-18]

+        String[] pageParts = s.split("[\\-\u2013\u2014]+");
       if (pageParts.length == 2) {
           return pageParts[1];
Evidence
LastPage’s split regex does not include spaces, unlike FirstPage, so whitespace around the dash
remains attached to the second token. RIS layouts use LastPage directly for the EP line, and
TemplateExporter (used for RIS) writes each line as-is (no trimming), so the whitespace propagates
into the exported file.

jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-21]
jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[12-21]
jablib/src/main/resources/resource/layout/ris/ris.article.layout[8-9]
jablib/src/main/java/org/jabref/logic/exporter/ExporterFactory.java[53-53]
jablib/src/main/java/org/jabref/logic/exporter/TemplateExporter.java[269-275]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`LastPage.format()` splits page ranges on dash characters but does not consume surrounding whitespace and does not trim the extracted last page. For inputs with spaces around the dash (e.g., `&amp;quot;13905 – 13911&amp;quot;`), RIS export can emit `EP  -  13911` (note the leading space) because TemplateExporter writes the formatted line verbatim.
### Issue Context
`FirstPage` already treats spaces as separators, but `LastPage` does not, creating inconsistent SP/EP formatting.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-23]
### Suggested fix approach
- Align the split pattern with `FirstPage` by including spaces: `[ \-\u2013\u2014]+`.
- Trim the returned page tokens (`pageParts[0]`, `pageParts[1]`) before returning.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Duplicated page split regex 📘 Rule violation ⛯ Reliability ⭐ New
Description
The same page-range splitting regex is duplicated in both FirstPage and LastPage, increasing the
risk of future divergence and inconsistent behavior. This violates the guideline to refactor
duplicated logic into shared helpers/constants.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
PR Compliance ID 45 requires refactoring copy-pasted logic into shared helpers. The identical regex
literal is introduced/maintained in two separate classes on modified lines, meaning the duplication
is part of this PR's touched code.

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The page-range splitting regex is duplicated in both `FirstPage` and `LastPage`, which increases maintenance cost and the risk of future inconsistent updates.

## Issue Context
Both classes use the identical `split(&quot;[ \\-\u2013\u2014]+&quot;)` expression on modified lines.

## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16-16]
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[16-16]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Em-dash validation mismatch 🐞 Bug ⛯ Reliability ⭐ New
Description
FirstPage/LastPage now treat the Unicode em-dash (\u2014) as a page-range separator for export
formatting, but PagesChecker’s validation regex does not allow \u2014, so the same pages value can
be considered invalid by integrity checks while still being split for export. This creates
inconsistent behavior for entries using em-dash page ranges.
Code

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[16]

+        String[] pageParts = s.split("[ \\-\u2013\u2014]+");
Evidence
The PR explicitly adds \u2014 to the page splitting regex in layout formatters, but PagesChecker’s
allowed range separators include only '+', double hyphen, or en-dash (\u2013). Therefore, a pages
field containing an em-dash range will be rejected by the integrity checker even though export
formatting now recognizes it as a separator.

jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[10-22]
jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[10-25]
jablib/src/main/java/org/jabref/logic/integrity/PagesChecker.java[12-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Export formatting (`FirstPage`/`LastPage`) now recognizes em-dash (\u2014) as a pages range separator, but `PagesChecker` validation does not. This can lead to integrity warnings for data that exports “correctly”.

### Issue Context
`PagesChecker` is used for page-range validation; `FirstPage`/`LastPage` are used during export formatting (e.g., RIS SP/EP).

### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/integrity/PagesChecker.java[14-17]
- jablib/src/main/java/org/jabref/logic/layout/format/FirstPage.java[12-21]
- jablib/src/main/java/org/jabref/logic/layout/format/LastPage.java[12-23]

### Suggested implementation direction
- If em-dash should be valid, extend `BIBTEX_RANGE_SEPARATOR` / `BIBLATEX_RANGE_SEPARATOR` to include `\u2014`.
- Optionally add/adjust tests for PagesChecker to cover em-dash ranges.
- Ensure the chosen behavior is consistent across validation and export.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@calixtus

Copy link
Copy Markdown
Member

Can you please comment on this one or address the report?
#15315 (comment)

Then its good to go i think.
Thanks.

@calixtus calixtus enabled auto-merge March 13, 2026 06:32
@testlens-app

testlens-app Bot commented Mar 13, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 9739180
▶️ Tests: 10135 executed
⚪️ Checks: 50/50 completed


Learn more about TestLens at testlens.app.

@github-actions github-actions Bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Mar 13, 2026
@calixtus calixtus added this pull request to the merge queue Mar 13, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Mar 13, 2026
Merged via the queue into JabRef:main with commit d687c08 Mar 13, 2026
49 of 50 checks passed
Syimyk43 pushed a commit to Syimyk43/jabref that referenced this pull request Mar 15, 2026
…JabRef#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Mar 15, 2026
* Close entry editor when last library is closed

When no library tab is active, the entry editor remained visible.
Added close() call in the activeTabProperty listener's else branch
to handle the zero-libraries-open case.

Fixes #13125

* Update CHANGELOG for #13125

* Fix case-insensitive DOI comparison in duplicate detection (#12967)

* Chore(deps): Bump org.gradlex:java-module-dependencies in /build-logic (#15328)

Bumps [org.gradlex:java-module-dependencies](https://github.com/gradlex-org/java-module-dependencies) from 1.12 to 1.12.1.
- [Release notes](https://github.com/gradlex-org/java-module-dependencies/releases)
- [Changelog](https://github.com/gradlex-org/java-module-dependencies/blob/main/CHANGELOG.md)
- [Commits](gradlex-org/java-module-dependencies@v1.12...v1.12.1)

---
updated-dependencies:
- dependency-name: org.gradlex:java-module-dependencies
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.openrewrite.rewrite from 7.26.0 to 7.28.1 (#15326)

Bumps org.openrewrite.rewrite from 7.26.0 to 7.28.1.

---
updated-dependencies:
- dependency-name: org.openrewrite.rewrite
  dependency-version: 7.28.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.mockito:mockito-core in /versions (#15330)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.22.0 to 5.23.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.22.0...v5.23.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.cyclonedx.bom from 3.2.0 to 3.2.1 (#15327)

Bumps org.cyclonedx.bom from 3.2.0 to 3.2.1.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump com.squareup.okio:okio-jvm in /versions (#15329)

Bumps [com.squareup.okio:okio-jvm](https://github.com/square/okio) from 3.16.4 to 3.17.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.16.4...parent-3.17.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-version: 3.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* New translations jabref_en.properties (Italian) (#15334)

* RIS export SP/EP fields when pages contain Unicode en-dash or em-dash (#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Remove object redundancy, miscellaneous refactoring (#15332)

* Remove object redundancy, miscellaneous refactoring

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use abbreviationRepository parameter

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use less injections for journal abbreviations repository

Signed-off-by: subhramit <subhramit.bb@live.in>

* Indent

Signed-off-by: subhramit <subhramit.bb@live.in>

* Revert to codepoint

---------

Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Add drag-and-drop support for Citation Relations tab (#15181)

* Add drag-and-drop support for Citation Relations tab

- Implement drag detection in CitationRelationsTab to allow dragging entries
- Add drag support to ViewModelListCellFactory
- Fix NullPointerException in FrameDndHandler when dropping onto tabs without IDs
- Fixes #15135

* Fix: correctly set drop completion status for entries

* Fix: Add Unreleased section and moved changelog entries

* Fix CHANGELOG formatting and upstream linter errors; removed empty groups

* Fix code consistency for cr

* Add explicit type

* Consistency in CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Update dependency org.eclipse.jgit:org.eclipse.jgit.pgm to v7.6.0.202603022253-r (#15335)

* Chore(deps): Bump org.cyclonedx.bom from 3.2.1 to 3.2.2 (#15337)

Bumps org.cyclonedx.bom from 3.2.1 to 3.2.2.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.eclipse.jgit:org.eclipse.jgit in /versions (#15338)

Bumps [org.eclipse.jgit:org.eclipse.jgit](https://github.com/eclipse-jgit/jgit) from 7.5.0.202512021534-r to 7.6.0.202603022253-r.
- [Commits](eclipse-jgit/jgit@v7.5.0.202512021534-r...v7.6.0.202603022253-r)

---
updated-dependencies:
- dependency-name: org.eclipse.jgit:org.eclipse.jgit
  dependency-version: 7.6.0.202603022253-r
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add 'All' citation fetcher that aggregates results from all providers (#15292)

* Add 'All' citation fetcher that aggregates and deduplicates results from all providers

- Implements CitationFetcher as AllCitationFetcher aggregating CrossRef,
  OpenAlex, OpenCitations, and SemanticScholar
- Deduplicates results using DuplicateCheck with BibDatabaseMode.BIBTEX
- Returns maximum citation count across all providers
- Tolerates individual provider failures gracefully
- Adds ALL entry to CitationFetcherType enum and factory method
- Covers behaviour with unit tests (failure tolerance, deduplication, max count)

Closes #15029

* Add 'All' citation fetcher that aggregates results from all providers

- Add ALL as first entry in CitationFetcherType enum
- Implement AllCitationFetcher aggregating CrossRef, OpenAlex,
  OpenCitations, and SemanticScholar
- Union results using DatabaseMerger with keyword separator from
  ImportFormatPreferences, as specified in the task
- Return maximum citation count across all providers
- Tolerate individual provider failures gracefully
- Fix race condition in SearchCitationsRelationsService by marking
  citationFetcher and citationCountFetcher fields as volatile
- Set ALL as the default citation fetcher in preferences
- Add unit tests covering failure tolerance, deduplication, and
  max citation count

Closes #15029

* Update CHANGELOG for issue #15029

* Address bot review: fix AllCitationFetcher and improve tests

- Build provider list from CitationFetcherType enum (excluding ALL)
  to avoid duplicate list that can drift when new providers are added
- Track anySuccess in fetch() and getCitationCount(); throw
  FetcherException when all providers fail instead of silently
  returning empty results
- Emit WARN log when some providers fail but others succeed
- Rename test variables to intent-revealing names
- Fix citation count assertion to use assertEquals(Optional.of(20))
- Add tests for all-providers-fail and partial-failure scenarios

* Trigger CI

* Reformat AllCitationFetcher

* Fix checkstyle: remove blank line at start of constructor block

* Reverted back to semantic scholar ui preference

* Revert default citation fetcher to SEMANTIC_SCHOLAR in EntryEditorPreferences

* Re-trigger CI

* Adapt tests to use real constructor with mocks, remove test constructor

* fix unchecked excpetion

---------

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Avoid error logs when search queries are incomplete (#15333)

* Avoid error logs when search queries are incomplete

Log the parsing error at debug level instead of error level. This prevents having
unnecessary output when user is still entering input like "title =".

* Update changelog for fixing incomplete search logging issue

* Update changelog entry for incomplete search logging issue

* Refine changelog entry for incomplete search logging issue

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom from 3.24.0 to 3.25.0 (#15217)

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom

Bumps [org.openrewrite.recipe:rewrite-recipe-bom](https://github.com/openrewrite/rewrite-recipe-bom) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/openrewrite/rewrite-recipe-bom/releases)
- [Commits](openrewrite/rewrite-recipe-bom@v3.24.0...v3.25.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-recipe-bom
  dependency-version: 3.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* udpate plugin

* update rewrite

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Select better value in MultiMergeEntries dialog component (#15027) (#15255)

* Select better value in MultiMergeEntries dialog component (#15027)

* Use PlausibilityComparatorFactory in MultiMergeEntriesViewModel
to select the more plausible value when merging fields from
multiple sources, instead of always keeping the first-seen value.

* Add DateFieldPlausibilityComparator to prefer more specific dates.

* Add unit tests for DateFieldPlausibilityComparator

* implement review comments

* Fix trailing whitespace in MultiMergeEntriesViewModelTest

* Trigger CI

* CI: re-trigger

* CI: re-trigger

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>

* Fix reset and import for PreviewPreferences (#15306)

* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Fix javadoc markdown artifacts (#15309)

* Closes #14897
This incorporates all the pending old Javadoc to  Markdown changes required after merging #14891.The following files are changed:
1.AutoCompletionTextInputBinding.java
2.JabRefCliPreferences.java
3.SearchBasedParserFetcher.java
4.StartNewStudyAction.java
                                             1.

* 1.

* Rsolved mix up of endregion and endRegion.Final one is endregion.
1.File changed-JabRefCliPreferences.java

* Rsolved format issue related to line space.Files changed.
1.JabRefCliPreferences.java
2.SearchBasedParserFetcher.java

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Added // endregion to maintain sync with region:AI
  And // region Push to application preferences and //region to Git
2.Changed region: to region
3.Changed region: Cleanup to previous ToDo: Cleanup
4.changed endRegion to end region
5.Adjusted  dangling // endregion by merging Imported Preference tag(new one) with Other Preferences(old one)

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Apply IntelliJ formatting

* Update CHANGELOG for JabRef#12967

* Apply case-insensitive comparison only to DOI identifiers

* Apply IntelliJ code formatting to DuplicateCheck and DuplicateCheckTest

* Add tests for case-insensitive DOI duplicate detection

* Fix case-insensitive DOI comparison in duplicate detection

* fix formatting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Faneesh Juneja <willowstration@gmail.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
Co-authored-by: Paul <thecoder777.github@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Nishant Dasgupta <nishant.24bcs10451@sst.scaler.com>
Co-authored-by: Mike Zhang <97817030+mikezhanghaozhe@users.noreply.github.com>
Co-authored-by: JunWang222 <70090336+JunWang222@users.noreply.github.com>
Co-authored-by: AbhijitBhowmick <94289124+AbhijitBhowmick@users.noreply.github.com>
AnvitaPrasad pushed a commit to AnvitaPrasad/jabref that referenced this pull request Mar 18, 2026
…JabRef#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
AnvitaPrasad pushed a commit to AnvitaPrasad/jabref that referenced this pull request Mar 18, 2026
* Close entry editor when last library is closed

When no library tab is active, the entry editor remained visible.
Added close() call in the activeTabProperty listener's else branch
to handle the zero-libraries-open case.

Fixes JabRef#13125

* Update CHANGELOG for JabRef#13125

* Fix case-insensitive DOI comparison in duplicate detection (JabRef#12967)

* Chore(deps): Bump org.gradlex:java-module-dependencies in /build-logic (JabRef#15328)

Bumps [org.gradlex:java-module-dependencies](https://github.com/gradlex-org/java-module-dependencies) from 1.12 to 1.12.1.
- [Release notes](https://github.com/gradlex-org/java-module-dependencies/releases)
- [Changelog](https://github.com/gradlex-org/java-module-dependencies/blob/main/CHANGELOG.md)
- [Commits](gradlex-org/java-module-dependencies@v1.12...v1.12.1)

---
updated-dependencies:
- dependency-name: org.gradlex:java-module-dependencies
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.openrewrite.rewrite from 7.26.0 to 7.28.1 (JabRef#15326)

Bumps org.openrewrite.rewrite from 7.26.0 to 7.28.1.

---
updated-dependencies:
- dependency-name: org.openrewrite.rewrite
  dependency-version: 7.28.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.mockito:mockito-core in /versions (JabRef#15330)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.22.0 to 5.23.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.22.0...v5.23.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.cyclonedx.bom from 3.2.0 to 3.2.1 (JabRef#15327)

Bumps org.cyclonedx.bom from 3.2.0 to 3.2.1.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump com.squareup.okio:okio-jvm in /versions (JabRef#15329)

Bumps [com.squareup.okio:okio-jvm](https://github.com/square/okio) from 3.16.4 to 3.17.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.16.4...parent-3.17.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-version: 3.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* New translations jabref_en.properties (Italian) (JabRef#15334)

* RIS export SP/EP fields when pages contain Unicode en-dash or em-dash (JabRef#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Remove object redundancy, miscellaneous refactoring (JabRef#15332)

* Remove object redundancy, miscellaneous refactoring

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use abbreviationRepository parameter

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use less injections for journal abbreviations repository

Signed-off-by: subhramit <subhramit.bb@live.in>

* Indent

Signed-off-by: subhramit <subhramit.bb@live.in>

* Revert to codepoint

---------

Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Add drag-and-drop support for Citation Relations tab (JabRef#15181)

* Add drag-and-drop support for Citation Relations tab

- Implement drag detection in CitationRelationsTab to allow dragging entries
- Add drag support to ViewModelListCellFactory
- Fix NullPointerException in FrameDndHandler when dropping onto tabs without IDs
- Fixes JabRef#15135

* Fix: correctly set drop completion status for entries

* Fix: Add Unreleased section and moved changelog entries

* Fix CHANGELOG formatting and upstream linter errors; removed empty groups

* Fix code consistency for cr

* Add explicit type

* Consistency in CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Update dependency org.eclipse.jgit:org.eclipse.jgit.pgm to v7.6.0.202603022253-r (JabRef#15335)

* Chore(deps): Bump org.cyclonedx.bom from 3.2.1 to 3.2.2 (JabRef#15337)

Bumps org.cyclonedx.bom from 3.2.1 to 3.2.2.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.eclipse.jgit:org.eclipse.jgit in /versions (JabRef#15338)

Bumps [org.eclipse.jgit:org.eclipse.jgit](https://github.com/eclipse-jgit/jgit) from 7.5.0.202512021534-r to 7.6.0.202603022253-r.
- [Commits](eclipse-jgit/jgit@v7.5.0.202512021534-r...v7.6.0.202603022253-r)

---
updated-dependencies:
- dependency-name: org.eclipse.jgit:org.eclipse.jgit
  dependency-version: 7.6.0.202603022253-r
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add 'All' citation fetcher that aggregates results from all providers (JabRef#15292)

* Add 'All' citation fetcher that aggregates and deduplicates results from all providers

- Implements CitationFetcher as AllCitationFetcher aggregating CrossRef,
  OpenAlex, OpenCitations, and SemanticScholar
- Deduplicates results using DuplicateCheck with BibDatabaseMode.BIBTEX
- Returns maximum citation count across all providers
- Tolerates individual provider failures gracefully
- Adds ALL entry to CitationFetcherType enum and factory method
- Covers behaviour with unit tests (failure tolerance, deduplication, max count)

Closes JabRef#15029

* Add 'All' citation fetcher that aggregates results from all providers

- Add ALL as first entry in CitationFetcherType enum
- Implement AllCitationFetcher aggregating CrossRef, OpenAlex,
  OpenCitations, and SemanticScholar
- Union results using DatabaseMerger with keyword separator from
  ImportFormatPreferences, as specified in the task
- Return maximum citation count across all providers
- Tolerate individual provider failures gracefully
- Fix race condition in SearchCitationsRelationsService by marking
  citationFetcher and citationCountFetcher fields as volatile
- Set ALL as the default citation fetcher in preferences
- Add unit tests covering failure tolerance, deduplication, and
  max citation count

Closes JabRef#15029

* Update CHANGELOG for issue JabRef#15029

* Address bot review: fix AllCitationFetcher and improve tests

- Build provider list from CitationFetcherType enum (excluding ALL)
  to avoid duplicate list that can drift when new providers are added
- Track anySuccess in fetch() and getCitationCount(); throw
  FetcherException when all providers fail instead of silently
  returning empty results
- Emit WARN log when some providers fail but others succeed
- Rename test variables to intent-revealing names
- Fix citation count assertion to use assertEquals(Optional.of(20))
- Add tests for all-providers-fail and partial-failure scenarios

* Trigger CI

* Reformat AllCitationFetcher

* Fix checkstyle: remove blank line at start of constructor block

* Reverted back to semantic scholar ui preference

* Revert default citation fetcher to SEMANTIC_SCHOLAR in EntryEditorPreferences

* Re-trigger CI

* Adapt tests to use real constructor with mocks, remove test constructor

* fix unchecked excpetion

---------

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Avoid error logs when search queries are incomplete (JabRef#15333)

* Avoid error logs when search queries are incomplete

Log the parsing error at debug level instead of error level. This prevents having
unnecessary output when user is still entering input like "title =".

* Update changelog for fixing incomplete search logging issue

* Update changelog entry for incomplete search logging issue

* Refine changelog entry for incomplete search logging issue

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom from 3.24.0 to 3.25.0 (JabRef#15217)

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom

Bumps [org.openrewrite.recipe:rewrite-recipe-bom](https://github.com/openrewrite/rewrite-recipe-bom) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/openrewrite/rewrite-recipe-bom/releases)
- [Commits](openrewrite/rewrite-recipe-bom@v3.24.0...v3.25.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-recipe-bom
  dependency-version: 3.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* udpate plugin

* update rewrite

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Select better value in MultiMergeEntries dialog component (JabRef#15027) (JabRef#15255)

* Select better value in MultiMergeEntries dialog component (JabRef#15027)

* Use PlausibilityComparatorFactory in MultiMergeEntriesViewModel
to select the more plausible value when merging fields from
multiple sources, instead of always keeping the first-seen value.

* Add DateFieldPlausibilityComparator to prefer more specific dates.

* Add unit tests for DateFieldPlausibilityComparator

* implement review comments

* Fix trailing whitespace in MultiMergeEntriesViewModelTest

* Trigger CI

* CI: re-trigger

* CI: re-trigger

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>

* Fix reset and import for PreviewPreferences (JabRef#15306)

* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Fix javadoc markdown artifacts (JabRef#15309)

* Closes JabRef#14897
This incorporates all the pending old Javadoc to  Markdown changes required after merging JabRef#14891.The following files are changed:
1.AutoCompletionTextInputBinding.java
2.JabRefCliPreferences.java
3.SearchBasedParserFetcher.java
4.StartNewStudyAction.java
                                             1.

* 1.

* Rsolved mix up of endregion and endRegion.Final one is endregion.
1.File changed-JabRefCliPreferences.java

* Rsolved format issue related to line space.Files changed.
1.JabRefCliPreferences.java
2.SearchBasedParserFetcher.java

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Added // endregion to maintain sync with region:AI
  And // region Push to application preferences and //region to Git
2.Changed region: to region
3.Changed region: Cleanup to previous ToDo: Cleanup
4.changed endRegion to end region
5.Adjusted  dangling // endregion by merging Imported Preference tag(new one) with Other Preferences(old one)

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Apply IntelliJ formatting

* Update CHANGELOG for JabRef#12967

* Apply case-insensitive comparison only to DOI identifiers

* Apply IntelliJ code formatting to DuplicateCheck and DuplicateCheckTest

* Add tests for case-insensitive DOI duplicate detection

* Fix case-insensitive DOI comparison in duplicate detection

* fix formatting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Faneesh Juneja <willowstration@gmail.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
Co-authored-by: Paul <thecoder777.github@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Nishant Dasgupta <nishant.24bcs10451@sst.scaler.com>
Co-authored-by: Mike Zhang <97817030+mikezhanghaozhe@users.noreply.github.com>
Co-authored-by: JunWang222 <70090336+JunWang222@users.noreply.github.com>
Co-authored-by: AbhijitBhowmick <94289124+AbhijitBhowmick@users.noreply.github.com>
FynnianB pushed a commit to FynnianB/jabref that referenced this pull request Mar 19, 2026
…JabRef#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
FynnianB pushed a commit to FynnianB/jabref that referenced this pull request Mar 19, 2026
* Close entry editor when last library is closed

When no library tab is active, the entry editor remained visible.
Added close() call in the activeTabProperty listener's else branch
to handle the zero-libraries-open case.

Fixes JabRef#13125

* Update CHANGELOG for JabRef#13125

* Fix case-insensitive DOI comparison in duplicate detection (JabRef#12967)

* Chore(deps): Bump org.gradlex:java-module-dependencies in /build-logic (JabRef#15328)

Bumps [org.gradlex:java-module-dependencies](https://github.com/gradlex-org/java-module-dependencies) from 1.12 to 1.12.1.
- [Release notes](https://github.com/gradlex-org/java-module-dependencies/releases)
- [Changelog](https://github.com/gradlex-org/java-module-dependencies/blob/main/CHANGELOG.md)
- [Commits](gradlex-org/java-module-dependencies@v1.12...v1.12.1)

---
updated-dependencies:
- dependency-name: org.gradlex:java-module-dependencies
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.openrewrite.rewrite from 7.26.0 to 7.28.1 (JabRef#15326)

Bumps org.openrewrite.rewrite from 7.26.0 to 7.28.1.

---
updated-dependencies:
- dependency-name: org.openrewrite.rewrite
  dependency-version: 7.28.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.mockito:mockito-core in /versions (JabRef#15330)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.22.0 to 5.23.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.22.0...v5.23.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.cyclonedx.bom from 3.2.0 to 3.2.1 (JabRef#15327)

Bumps org.cyclonedx.bom from 3.2.0 to 3.2.1.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump com.squareup.okio:okio-jvm in /versions (JabRef#15329)

Bumps [com.squareup.okio:okio-jvm](https://github.com/square/okio) from 3.16.4 to 3.17.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.16.4...parent-3.17.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-version: 3.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* New translations jabref_en.properties (Italian) (JabRef#15334)

* RIS export SP/EP fields when pages contain Unicode en-dash or em-dash (JabRef#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Remove object redundancy, miscellaneous refactoring (JabRef#15332)

* Remove object redundancy, miscellaneous refactoring

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use abbreviationRepository parameter

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use less injections for journal abbreviations repository

Signed-off-by: subhramit <subhramit.bb@live.in>

* Indent

Signed-off-by: subhramit <subhramit.bb@live.in>

* Revert to codepoint

---------

Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Add drag-and-drop support for Citation Relations tab (JabRef#15181)

* Add drag-and-drop support for Citation Relations tab

- Implement drag detection in CitationRelationsTab to allow dragging entries
- Add drag support to ViewModelListCellFactory
- Fix NullPointerException in FrameDndHandler when dropping onto tabs without IDs
- Fixes JabRef#15135

* Fix: correctly set drop completion status for entries

* Fix: Add Unreleased section and moved changelog entries

* Fix CHANGELOG formatting and upstream linter errors; removed empty groups

* Fix code consistency for cr

* Add explicit type

* Consistency in CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Update dependency org.eclipse.jgit:org.eclipse.jgit.pgm to v7.6.0.202603022253-r (JabRef#15335)

* Chore(deps): Bump org.cyclonedx.bom from 3.2.1 to 3.2.2 (JabRef#15337)

Bumps org.cyclonedx.bom from 3.2.1 to 3.2.2.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.eclipse.jgit:org.eclipse.jgit in /versions (JabRef#15338)

Bumps [org.eclipse.jgit:org.eclipse.jgit](https://github.com/eclipse-jgit/jgit) from 7.5.0.202512021534-r to 7.6.0.202603022253-r.
- [Commits](eclipse-jgit/jgit@v7.5.0.202512021534-r...v7.6.0.202603022253-r)

---
updated-dependencies:
- dependency-name: org.eclipse.jgit:org.eclipse.jgit
  dependency-version: 7.6.0.202603022253-r
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add 'All' citation fetcher that aggregates results from all providers (JabRef#15292)

* Add 'All' citation fetcher that aggregates and deduplicates results from all providers

- Implements CitationFetcher as AllCitationFetcher aggregating CrossRef,
  OpenAlex, OpenCitations, and SemanticScholar
- Deduplicates results using DuplicateCheck with BibDatabaseMode.BIBTEX
- Returns maximum citation count across all providers
- Tolerates individual provider failures gracefully
- Adds ALL entry to CitationFetcherType enum and factory method
- Covers behaviour with unit tests (failure tolerance, deduplication, max count)

Closes JabRef#15029

* Add 'All' citation fetcher that aggregates results from all providers

- Add ALL as first entry in CitationFetcherType enum
- Implement AllCitationFetcher aggregating CrossRef, OpenAlex,
  OpenCitations, and SemanticScholar
- Union results using DatabaseMerger with keyword separator from
  ImportFormatPreferences, as specified in the task
- Return maximum citation count across all providers
- Tolerate individual provider failures gracefully
- Fix race condition in SearchCitationsRelationsService by marking
  citationFetcher and citationCountFetcher fields as volatile
- Set ALL as the default citation fetcher in preferences
- Add unit tests covering failure tolerance, deduplication, and
  max citation count

Closes JabRef#15029

* Update CHANGELOG for issue JabRef#15029

* Address bot review: fix AllCitationFetcher and improve tests

- Build provider list from CitationFetcherType enum (excluding ALL)
  to avoid duplicate list that can drift when new providers are added
- Track anySuccess in fetch() and getCitationCount(); throw
  FetcherException when all providers fail instead of silently
  returning empty results
- Emit WARN log when some providers fail but others succeed
- Rename test variables to intent-revealing names
- Fix citation count assertion to use assertEquals(Optional.of(20))
- Add tests for all-providers-fail and partial-failure scenarios

* Trigger CI

* Reformat AllCitationFetcher

* Fix checkstyle: remove blank line at start of constructor block

* Reverted back to semantic scholar ui preference

* Revert default citation fetcher to SEMANTIC_SCHOLAR in EntryEditorPreferences

* Re-trigger CI

* Adapt tests to use real constructor with mocks, remove test constructor

* fix unchecked excpetion

---------

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Avoid error logs when search queries are incomplete (JabRef#15333)

* Avoid error logs when search queries are incomplete

Log the parsing error at debug level instead of error level. This prevents having
unnecessary output when user is still entering input like "title =".

* Update changelog for fixing incomplete search logging issue

* Update changelog entry for incomplete search logging issue

* Refine changelog entry for incomplete search logging issue

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom from 3.24.0 to 3.25.0 (JabRef#15217)

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom

Bumps [org.openrewrite.recipe:rewrite-recipe-bom](https://github.com/openrewrite/rewrite-recipe-bom) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/openrewrite/rewrite-recipe-bom/releases)
- [Commits](openrewrite/rewrite-recipe-bom@v3.24.0...v3.25.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-recipe-bom
  dependency-version: 3.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* udpate plugin

* update rewrite

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Select better value in MultiMergeEntries dialog component (JabRef#15027) (JabRef#15255)

* Select better value in MultiMergeEntries dialog component (JabRef#15027)

* Use PlausibilityComparatorFactory in MultiMergeEntriesViewModel
to select the more plausible value when merging fields from
multiple sources, instead of always keeping the first-seen value.

* Add DateFieldPlausibilityComparator to prefer more specific dates.

* Add unit tests for DateFieldPlausibilityComparator

* implement review comments

* Fix trailing whitespace in MultiMergeEntriesViewModelTest

* Trigger CI

* CI: re-trigger

* CI: re-trigger

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>

* Fix reset and import for PreviewPreferences (JabRef#15306)

* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Fix javadoc markdown artifacts (JabRef#15309)

* Closes JabRef#14897
This incorporates all the pending old Javadoc to  Markdown changes required after merging JabRef#14891.The following files are changed:
1.AutoCompletionTextInputBinding.java
2.JabRefCliPreferences.java
3.SearchBasedParserFetcher.java
4.StartNewStudyAction.java
                                             1.

* 1.

* Rsolved mix up of endregion and endRegion.Final one is endregion.
1.File changed-JabRefCliPreferences.java

* Rsolved format issue related to line space.Files changed.
1.JabRefCliPreferences.java
2.SearchBasedParserFetcher.java

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Added // endregion to maintain sync with region:AI
  And // region Push to application preferences and //region to Git
2.Changed region: to region
3.Changed region: Cleanup to previous ToDo: Cleanup
4.changed endRegion to end region
5.Adjusted  dangling // endregion by merging Imported Preference tag(new one) with Other Preferences(old one)

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Apply IntelliJ formatting

* Update CHANGELOG for JabRef#12967

* Apply case-insensitive comparison only to DOI identifiers

* Apply IntelliJ code formatting to DuplicateCheck and DuplicateCheckTest

* Add tests for case-insensitive DOI duplicate detection

* Fix case-insensitive DOI comparison in duplicate detection

* fix formatting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Faneesh Juneja <willowstration@gmail.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
Co-authored-by: Paul <thecoder777.github@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Nishant Dasgupta <nishant.24bcs10451@sst.scaler.com>
Co-authored-by: Mike Zhang <97817030+mikezhanghaozhe@users.noreply.github.com>
Co-authored-by: JunWang222 <70090336+JunWang222@users.noreply.github.com>
Co-authored-by: AbhijitBhowmick <94289124+AbhijitBhowmick@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue An issue intended for project-newcomers. Varies in difficulty. status: no-bot-comments 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.

Correctly export RIS fields SP and EP if double dash "--" is used for range in bibtex pages

3 participants