Skip to content

Keep organization authors containing "and" intact in RIS export. - #17876

Merged
Siedlerchr merged 12 commits into
JabRef:mainfrom
AnishKmSingh:fix-17821-ris-organization-author
Nov 29, 2026
Merged

Siedlerchr merged 12 commits into
JabRef:mainfrom
AnishKmSingh:fix-17821-ris-organization-author

Conversation

@AnishKmSingh

Copy link
Copy Markdown
Contributor

Summary

When exporting to RIS, brace protected organization authors whose names contain "and" (e.g. {Research and Development Institute}) were split into multiple authors . Two things caused this -> the RIS layouts applied FormatChars before RisAuthors which removed the protecting braces and RisAuthors itself split the formatted author string on " and ".

RisAuthors now parses the field with AuthorList which respects brace protected names , converts each author from LaTeX to Unicode via latexFree() and writes one RIS line per author. Accordingly, FormatChars was removed in front of RisAuthors in all RIS layouts; all other fields keep FormatChars.

Regular author lists and LaTeX-encoded names (e.g. M{\"u}ller → Müller) are exported as before. Editors (A2) benefit from the same fix.

Steps to test

  1. Create an entry with the following author field:
    author = {{Food and Agriculture Organization} and John Smith}
  2. Select the entry and choose File → Export → Export selected entries, with RIS as the format.
  3. Open the exported file and verify that it contains:
    AU  - Food and Agriculture Organization
    AU  - Smith, John
    

Before fix:

Before_RIS_Issue Before_RIS_ISSIE_02

After fix:

After_ris_fix#17821_fix_entry_01 After_fix_#17821_02

Related issues and pull requests

Closes #17821

AI usage

I used CLAUDE Anthropic (opus 5.5 medium) find the root cause and drafted the code, tests and CHANGELOG entry. I reproduced the bug, applied the changes, ran the tests locally, verified the fix manually in JabRef (screenshots above) and reviewed and understood all changes. I take full ownership of the code.

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • 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
  • 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 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 for up to dateness and submitted a pull request to our user documentation repository

@jabref-machine jabref-machine added the dev: send-to-black-forest Port to the black-forest branch of JabRef/jabref-black-forest after merging (ADR-0073) label Nov 19, 2026
@github-actions github-actions Bot added component: export-or-save status: changes-required Pull requests that are not yet complete labels Nov 19, 2026
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Preserve organization names containing “and” in RIS exports

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Keep brace-protected organization authors intact in RIS author, editor, and assignee lines.
• Convert LaTeX names after parsing, preserving Unicode output and individual RIS name lines.
• Add formatter regression tests and document the user-visible fix.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The formatter and all updated RIS layouts participate in the single end-to-end RIS export integration.
  • Author, editor, and assignee fields are distinct output fields within that bounded export behavior, not independent functional scopes or deployment layers.
Sources

jablib/src/main/java/org/jabref/logic/layout/format/RisAuthors.java[20-29]

    public String format(@Nullable String fieldText) {
        if (fieldText == null) {
            return "";
        }
        return AuthorList.parse(normalizeWhitespaceInsideBraces(fieldText))
                         .latexFree()
                         .getAuthors()
                         .stream()
                         .map(author -> arg + "  - " + author.getFamilyGiven(false))
                         .collect(Collectors.joining(OS.NEWLINE));

jablib/src/main/resources/resource/layout/ris/ris.book.layout[2-3]

\begin{author}\format[RisAuthors(AU)]{\author}\end{author}
\begin{editor}\format[RisAuthors(A2)]{\editor}\end{editor}
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Data transformation

  • Before: the RIS layouts applied the general LaTeX/character formatter before RisAuthors, and RisAuthors split the already-transformed text on the literal author separator.
  • After: RisAuthors receives the original field text, normalizes whitespace only while inside brace regions, parses the complete author list, removes LaTeX, and formats each parsed author.
  • New correctness condition: brace depth and whitespace handling must preserve organization names while leaving separators outside braces available to AuthorListParser; parser-derived family/given formatting must also remain consistent for person names, editors, and assignees.
  • The change materially alters the ordering and interaction of parsing, brace protection, whitespace normalization, and LaTeX conversion; it does not introduce concurrency or coordinated persistence behavior.
Sources

jablib/src/main/java/org/jabref/logic/layout/format/RisAuthors.java[20-29]

    public String format(@Nullable String fieldText) {
        if (fieldText == null) {
            return "";
        }
        return AuthorList.parse(normalizeWhitespaceInsideBraces(fieldText))
                         .latexFree()
                         .getAuthors()
                         .stream()
                         .map(author -> arg + "  - " + author.getFamilyGiven(false))
                         .collect(Collectors.joining(OS.NEWLINE));

jablib/src/main/java/org/jabref/logic/layout/format/RisAuthors.java[32-56]

    /// Collapses line breaks and repeated whitespace inside braces to a single space.
    ///
    /// Whitespace outside braces is kept, because `AuthorListParser` treats line breaks and
    /// multiple spaces between names as author separators.
    private static String normalizeWhitespaceInsideBraces(String fieldText) {
        StringBuilder result = new StringBuilder(fieldText.length());
        int braceLevel = 0;
        boolean previousWasWhitespace = false;
        for (char c : fieldText.toCharArray()) {
            if (c == '{') {
                braceLevel++;
            } else if ((c == '}') && (braceLevel > 0)) {
                braceLevel--;
            }
            if ((braceLevel > 0) && Character.isWhitespace(c)) {
                if (!previousWasWhitespace) {
                    result.append(' ');
                }
                previousWasWhitespace = true;
            } else {
                result.append(c);
                previousWasWhitespace = false;
            }
        }
        return result.toString();
Potential damage 🟡 Medium 🩹 Incorrect results

  • Conditionally, if the changed parsing, brace normalization, or family/given conversion regresses, RIS files can contain split organization names, incorrectly separated authors, or altered author/editor/assignee text.
  • The source BibTeX entries are not changed, and regenerating the RIS file after correcting or reverting the formatter restores output; already distributed or imported incorrect RIS files require re-export or manual correction.
  • Recoverable by re-exporting from the unchanged source database.
  • Any downstream system that already imported the incorrect RIS artifact is not automatically repaired by code rollback and may require re-import or manual correction.
Sources

jablib/src/main/java/org/jabref/logic/layout/format/RisAuthors.java[20-29]

    public String format(@Nullable String fieldText) {
        if (fieldText == null) {
            return "";
        }
        return AuthorList.parse(normalizeWhitespaceInsideBraces(fieldText))
                         .latexFree()
                         .getAuthors()
                         .stream()
                         .map(author -> arg + "  - " + author.getFamilyGiven(false))
                         .collect(Collectors.joining(OS.NEWLINE));

jablib/src/main/java/org/jabref/logic/layout/format/RisAuthors.java[32-56]

    /// Collapses line breaks and repeated whitespace inside braces to a single space.
    ///
    /// Whitespace outside braces is kept, because `AuthorListParser` treats line breaks and
    /// multiple spaces between names as author separators.
    private static String normalizeWhitespaceInsideBraces(String fieldText) {
        StringBuilder result = new StringBuilder(fieldText.length());
        int braceLevel = 0;
        boolean previousWasWhitespace = false;
        for (char c : fieldText.toCharArray()) {
            if (c == '{') {
                braceLevel++;
            } else if ((c == '}') && (braceLevel > 0)) {
                braceLevel--;
            }
            if ((braceLevel > 0) && Character.isWhitespace(c)) {
                if (!previousWasWhitespace) {
                    result.append(' ');
                }
                previousWasWhitespace = true;
            } else {
                result.append(c);
                previousWasWhitespace = false;
            }
        }
        return result.toString();

jablib/src/main/resources/resource/layout/ris/ris.book.layout[2-3]

\begin{author}\format[RisAuthors(AU)]{\author}\end{author}
\begin{editor}\format[RisAuthors(A2)]{\editor}\end{editor}
Assessed commit d24702c
Diagram

graph TD
  A["RIS layouts"] --> B["RisAuthors formatter"] --> C["AuthorList parser"] --> D["LaTeX conversion"] --> E["RIS name lines"]
Loading
High-Level Assessment

Parsing the original field with the existing AuthorList model before LaTeX conversion is the appropriate approach: it preserves organization boundaries without introducing separate splitting rules. Keeping FormatChars and splitting the resulting string would lose the braces needed to distinguish organizations.

Files changed (15) +94 / -34

Bug fix (13) +35 / -34
RisAuthors.javaParse names before producing RIS lines +14/-13

Parse names before producing RIS lines

• Replaces splitting a formatted string on “ and ” with AuthorList parsing, followed by per-author LaTeX conversion and family-given formatting. Emits one newline-separated RIS line per parsed name.

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

ris.article.layoutPass article authors directly to RisAuthors +1/-1

Pass article authors directly to RisAuthors

• Removes FormatChars ahead of the AU formatter so author braces remain available for parsing.

jablib/src/main/resources/resource/layout/ris/ris.article.layout

ris.book.layoutPreserve book author and editor braces +2/-2

Preserve book author and editor braces

• Passes author and editor fields directly to RisAuthors for AU and A2 output.

jablib/src/main/resources/resource/layout/ris/ris.book.layout

ris.conference.layoutPreserve conference author and editor braces +2/-2

Preserve conference author and editor braces

• Removes FormatChars before RisAuthors for conference AU and A2 fields.

jablib/src/main/resources/resource/layout/ris/ris.conference.layout

ris.incollection.layoutPreserve in-collection author and editor braces +2/-2

Preserve in-collection author and editor braces

• Sends author and editor fields directly to RisAuthors without stripping protective braces first.

jablib/src/main/resources/resource/layout/ris/ris.incollection.layout

ris.inproceedings.layoutPreserve in-proceedings author and editor braces +2/-2

Preserve in-proceedings author and editor braces

• Removes FormatChars ahead of RisAuthors for AU and A2 fields.

jablib/src/main/resources/resource/layout/ris/ris.inproceedings.layout

ris.layoutPreserve generic RIS author and editor braces +2/-2

Preserve generic RIS author and editor braces

• Passes generic-entry author and editor fields directly to RisAuthors.

jablib/src/main/resources/resource/layout/ris/ris.layout

ris.mastersthesis.layoutPreserve master’s thesis author braces +1/-1

Preserve master’s thesis author braces

• Removes FormatChars before the thesis AU formatter.

jablib/src/main/resources/resource/layout/ris/ris.mastersthesis.layout

ris.patent.layoutPreserve patent author and assignee braces +2/-2

Preserve patent author and assignee braces

• Passes patent authors to AU and assignees to A2 through RisAuthors without prior FormatChars conversion.

jablib/src/main/resources/resource/layout/ris/ris.patent.layout

ris.phdthesis.layoutPreserve PhD thesis author braces +1/-1

Preserve PhD thesis author braces

• Passes the author field directly to RisAuthors for AU output.

jablib/src/main/resources/resource/layout/ris/ris.phdthesis.layout

ris.techreport.layoutPreserve technical-report author and editor braces +2/-2

Preserve technical-report author and editor braces

• Removes FormatChars ahead of RisAuthors for technical-report AU and A2 fields.

jablib/src/main/resources/resource/layout/ris/ris.techreport.layout

ris.unpublished.layoutPreserve unpublished-entry author and editor braces +2/-2

Preserve unpublished-entry author and editor braces

• Passes unpublished-entry author and editor fields directly to RisAuthors.

jablib/src/main/resources/resource/layout/ris/ris.unpublished.layout

ris.www.layoutPreserve web-entry author and editor braces +2/-2

Preserve web-entry author and editor braces

• Removes FormatChars ahead of RisAuthors for web-entry AU and A2 fields.

jablib/src/main/resources/resource/layout/ris/ris.www.layout

Tests (1) +58 / -0
RisAuthorsTest.javaTest RIS name formatting and organization boundaries +58/-0

Test RIS name formatting and organization boundaries

• Adds formatter tests for null input, individual and multiple people, brace-protected organizations, mixed lists, LaTeX-to-Unicode conversion, and the A2 tag.

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

Documentation (1) +1 / -0
CHANGELOG.mdDocument the RIS organization-author fix +1/-0

Document the RIS organization-author fix

• Adds a user-facing note about organization authors containing “and” being split during RIS export.

CHANGELOG.md

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

qodo-free-for-open-source-projects Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1)

Grey Divider


Remediation recommended

1. Accented name prefixes move into given names 🐞 Bug
Description
RisAuthors.format now parses LaTeX-encoded names before conversion, while AuthorListParser
classifies a token beginning inside braces as uppercase even when its converted first letter is
lowercase. For Jean {\a} la Fontaine, the previous Unicode-first path exports à la Fontaine,
Jean, but the new path exports la Fontaine, Jean à` in RIS author and editor lines.
Code

jablib/src/main/java/org/jabref/logic/layout/format/RisAuthors.java[R22-23]

+        return AuthorList.parse(fieldText)
+                         .latexFree()
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Parsing LaTeX-encoded personal names before Unicode conversion can classify a lowercase accented prefix as an uppercase token, moving it into the given name in RIS output.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/format/RisAuthors.java[22-26]
- jablib/src/main/java/org/jabref/logic/importer/AuthorListParser.java[500-510]
- jablib/src/test/java/org/jabref/logic/layout/format/RisAuthorsTest.java[48-51]
## Recommended Fix
Keep organization braces intact when identifying author boundaries, but ensure LaTeX-encoded lowercase personal-name tokens retain their lowercase classification before formatting. Add a regression test for a braced accented name prefix such as `Jean {\`a} la Fontaine` alongside the organization tests.

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


Grey Divider

Resolved findings
1. Some author lists export as one person ✓ Resolved Medium
Description
RisAuthors.format collapses repeated whitespace before AuthorList.parse, removing a separator
that the parser converts to  and  when the field contains no comma. For John Smith  Jane Doe,
the previous path produced two RIS author lines, but the new path parses the collapsed text as one
name and emits AU  - Doe, John Smith Jane; the same change affects newline-separated names.

2. RIS author export null check lacks a @nullable parameter ✓ Resolved Medium
Description
RisAuthors.format was rewritten with the parameter renamed to fieldText, and the new `if
(fieldText == null) check sits on a parameter that is not annotated @Nullable. The jablib`
module uses JSpecify (NonSpaceWhitespaceRemover in the same package imports
org.jspecify.annotations.Nullable), so the nullable contract is expected to be explicit here.
Callers and readers cannot tell from the signature that null is accepted, and the null-guard
returning an empty string is the behaviour the annotation would document.

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@github-actions github-actions Bot added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes-required Pull requests that are not yet complete labels Nov 20, 2026

@doraem-on doraem-on left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The single line organization case works here still a multiline case that changes the organizations name

@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Nov 21, 2026
@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: changes-required Pull requests that are not yet complete labels Nov 22, 2026
@github-actions github-actions Bot added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes-required Pull requests that are not yet complete labels Nov 22, 2026
@Siedlerchr

Copy link
Copy Markdown
Member

Can you take a look at the qodo issues? Are they still valid?`

@github-actions github-actions Bot removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 24, 2026
@AnishKmSingh

Copy link
Copy Markdown
Contributor Author

@Siedlerchr

I checked the Qodo findings:

  1. Valid . My whitespace normalization removed line breaks and double spaces that AuthorListParser uses as author separators. Fixed in d24702c: whitespace is now only collapsed inside braces. Added tests for space- and newline-separated names .
  2. Valid but the root cause is in AuthorListParser: it treats any token starting with { as uppercase, while BibTeX takes the case of a special character like {\a}from the letter inside. Before, RIS export avoided this by converting LaTeX first. Should I fix this inAuthorListParser` in this PR or in a separate issue/PR since it affects name parsing everywhere?
  3. Valid. Added @Nullable to the parameter.

@github-actions github-actions Bot added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 24, 2026
@AnishKmSingh

Copy link
Copy Markdown
Contributor Author

Hi @Siedlerchr. gentle ping on this one. I addressed the review comments and the Qodo findings (1 and 3 are fixed, all checks pass).

For Qodo point 2 (accented prefixes like {\a}), should I fix AuthorListParser` in this PR or open a separate issue for it? Happy to do either.

@Siedlerchr
Siedlerchr added this pull request to the merge queue Nov 29, 2026
@github-actions github-actions Bot added status: to-be-merged PRs which are accepted and should go into the merge-queue. and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Nov 29, 2026
Merged via the queue into JabRef:main with commit 8080099 Nov 29, 2026
78 checks passed
@jabref-machine

Copy link
Copy Markdown
Collaborator

Created backport PR for black-forest:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin port-17876-to-black-forest
git worktree add --checkout .worktree/port-17876-to-black-forest port-17876-to-black-forest
cd .worktree/port-17876-to-black-forest
git reset --hard HEAD^
git cherry-pick -x 8080099db172feb038a7c7638ec37a1454cf4773

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Nov 29, 2026
Siedlerchr added a commit to PedroSarmento2007/jabref that referenced this pull request Nov 29, 2026
* refs/heads/main:
  Keep organization authors containing "and" intact in RIS export. (JabRef#17876)
renovate-bot pushed a commit to renovate-bot/JabRef-_-jabref that referenced this pull request Nov 29, 2026
### Summary

RIS export splits page ranges even when the pages field starts with
whitespace, and preserves literal labels such as `App.1`. RIS import
keeps editors, identifiers, and PDF attachments in their own fields and
recognizes record terminators at line boundaries. RIS export writes
serial numbers as `SN` and retains the three separators in `Y1` dates.

The [RIS
requirements](https://github.com/JabRef/jabref/blob/8fb0c4056aab1884055568832cbc93cb825c7585/docs/requirements/export.md#ris-import-must-preserve-secondary-authors-as-editors)
link each behavior to the relevant section of the Reference Manager
specification.

### Alternatives considered

- `replace('\u00A0', ' ')` + `strip()` (the previous version): discarded
because it only covered one non-breaking space (U+00A0) and duplicated
logic that already exists in the project.
- `NormalizeUnicodeFormatter`: uses NFC, which does not convert U+00A0
into a regular space.
- `TrimWhitespaceFormatter` / `trim()`: do not remove U+00A0.
- `\h` in the split regex: would also handle non-breaking spaces, but
adds custom logic instead of reusing existing classes.

### Steps to test

1. Create an article through the GUI.
2. Insert ` 345-350` (with a leading space) in the pages field.
3. Export it with the RIS format.
4. Check that the exported file contains `SP  - 345` and `EP  - 350`.
5. Change the pages field to `App.1-App.3` and export again. Confirm
that the file contains `SP - App.1` and `EP - App.3`.
6. Create a book with distinct author and editor names, an ISBN, an
ISSN, and a linked PDF. Export it as RIS and import that file into a new
library. Confirm that the editor appears in the editor field, both
identifiers return to their respective fields, and the PDF appears under
linked files.
7. Export an article dated May 2024 and check for `Y1 - 2024/05//`.
Clear the month, export again, and check for `Y1 - 2024///`.
8. In a two-record RIS file, replace the first record's title line with
`TI - LASER - calibration` and import the file. Confirm that the first
title is `LASER - calibration` and the second record is still present.

Pages field with a leading space:
<img width="554" height="312" alt="1795454859519_image"
src="https://github.com/user-attachments/assets/2aa578c4-6db3-4144-8511-253e0a45e493"
/>
Exported RIS after the fix:
<img width="264" height="236" alt="1795454838371_image"
src="https://github.com/user-attachments/assets/8633b5cd-f948-4f27-ae7a-969d4c3dccf9"
/>

Before this fix, the export contained `SP - 345-350` and an empty `EP -
`.

Automated verification covered the expanded cases. All 149 targeted
tests passed after integrating JabRef#17876, and OpenFastTrace passed. JabLib
main and test Checkstyle, Markdown linting, and textlint passed for the
local RIS changes before that merge. The screenshots show the original
page-range reproduction. Manual verification and screenshots for the
follow-up cases are pending.

### Related issues and pull requests

Closes JabRef#17774

Based on the approach in JabRef#17775 and JabRef#17808, whose authors are credited
as co-authors.

The branch also includes the RIS organization author fix from JabRef#17876.
The identifier changes build on JabRef#17891.

### AI usage

Original contributor's disclosure:

> Claude (model claude-opus-5-5), AIL2. I used it to understand the code
and the bug, to suggest a test case, and to help with the English of the
CHANGELOG entry, the documentation comment, the commit message, and this
PR description. I reproduced the bug in the GUI, wrote the fix and the
tests myself, and ran them locally.

Follow-up changes in `8fb0c4056a` (AIL5 for the follow-up
implementation). OpenAI Codex (model `gpt-6.2-sol`) identified the
additional RIS issues, implemented the fixes and tests, added
specification references, verified the combined change, and updated this
PR description. Contributor review and manual verification of those
follow-up changes are pending.

<details>
<summary>AI CHECKLIST.md walkthrough</summary>

**Code checklist**

> [!IMPORTANT]
> **This is a mandatory final gate.** When the implementation is
finished and before you open a PR, work through **every** box below and
tick it. If a box cannot be ticked, fix the code first; mark a box `[/]`
only if the point genuinely does not apply.
>
> `AGENTS.md` describes how to write code *while* developing — this file
confirms the finished result. Do not skip the checklist and do not skip
individual points.

**1. Code self-review**

Read your own diff once, top to bottom, and confirm each point.

**Nullability and control flow**

- [x] No `== null` / `!= null` checks — JSpecify annotations
(`@NullMarked`, `@Nullable`, `@NonNull`) used instead.
- [x] No `Objects.requireNonNull(...)` — nullability expressed via
JSpecify annotations.
- [x] New classes annotated with `@NullMarked`
(`org.jspecify.annotations.NullMarked`).
- [/] New packages annotated with `@NullMarked`
(`org.jspecify.annotations.NullMarked`).
- [x] `Optional` consumed with `ifPresent` / `ifPresentOrElse` / `map` /
`orElseThrow` — never `orElse(unusedValue)` nor an `isPresent()` +
`get()` block.
- [/] `StringUtil.isBlank(...)` used instead of `s == null ||
s.isBlank()`.

**Exceptions**

- [x] No `catch (Exception e)` — only specific exceptions are caught.
- [x] No `throw new RuntimeException(...)` /
`IllegalStateException(...)` — these tear down the whole application.
- [/] Logged exceptions are passed as the **last** logger argument
(`LOGGER.info("...", e)`), not concatenated into the message string.

**Style and idioms**

- [x] New `BibEntry` objects built with withers (`withField`, not
`setField`).
- [x] Modern Java used: `List.of()` / `Map.of()` / `Set.of()`,
`Path.of()`, `SequencedCollection` / `SequencedSet`, text blocks.
- [x] Regexes use a precompiled `Pattern.compile(...)` constant, not
`String.matches(...)`.
- [ ] Keep alphabetical ordering when adding variables or enum items.
- [/] Background work uses `org.jabref.logic.util.BackgroundTask`, not
`new Thread()`.
- [x] No commented-out code, no trivial comments restating the code, no
AI-disclosure comments in source.
- [/] Markdown Javadoc (`///`) uses Markdown syntax, not JavaDoc inline
tags: `` `code` `` instead of `{@code}`, `[ClassName]` instead of
`{@link}`.

**User-facing text**

- [/] All user-facing text localized (`Localization.lang` in Java, `%`
prefix in FXML).
- [/] Sentence case (not Title Case); no trailing `!`; labels do not end
with `:`.
- [/] Variance expressed with placeholders (`"...: %0"`), not string
concatenation.

**Security**

- [/] User-controlled data (request params, entry fields, file contents)
is HTML-escaped before being written into any `text/html` response —
including exception/error messages, not just the success body (XSS).

**Tests**

- [x] In case issue lists an example, this concrete example is covered
by a test case.
- [x] Behavior changes in `org.jabref.model` / `org.jabref.logic` have
added or updated tests.
- [x] Tests assert object contents (`assertEquals`), use plain JUnit
asserts (not AssertJ), have no `@DisplayName`, do not catch exceptions
(let them propagate so JUnit reports setup/teardown failures directly),
and use `@TempDir` instead of manual temp directories.
- [/] Fetcher tests hit the live endpoints — the remote API is not
mocked or stubbed (automated-review suggestions to mock it are rejected
on purpose).

**2. Verification commands**

Run in this order — cheapest first. Each must pass.

- [ ] `./gradlew :jablib:check` (or `./gradlew check` for all modules).
- [ ] `./gradlew checkstyleMain checkstyleTest checkstyleJmh`.
- [ ] `./gradlew modernizer`.
- [ ] `./gradlew --no-configuration-cache :rewriteDryRun` reports no
changes (run `./gradlew rewriteRun` to fix).
- [ ] `./gradlew javadoc`.
- [ ] `npx markdownlint-cli2 "docs/**/*.md" "*.md"` (only if Markdown
changed).
- [ ] `npm ci && npm run textlint` reports no misspellings (only if
Markdown changed).
- [/] Only if formatting is still off after `rewriteRun`: `docker run -v
$(pwd):/github/workspace ghcr.io/leventebajczi/intellij-format:master
"*.java" "" ".idea/codeStyles/Project.xml"`.

**3. Documentation**

- [x] `CHANGELOG.md` entry added if the change is visible to the user
(end-user wording, no extra blank lines, sorted in next to existing
entries about the same component/feature). Link the issue if one exists;
link the PR only when no issue exists. Use `TODO` as the placeholder
when neither is known yet — never a fake number. No entry for fixes to
changes that were themselves introduced after the last release (feature
only in `## [Unreleased]`) — update the existing unreleased entry
instead if needed.
- [x] Searched [jabref/issues](https://github.com/JabRef/jabref/issues)
and
[jabref-koppor/issues](https://github.com/JabRef/jabref-koppor/issues)
for a related issue; linked only on a confident match, otherwise kept
`TODO` (no `closes`/`fixes` for merely-similar issues).
- [x] Requirement added to `docs/requirements/<area>.md` if the change
is a new feature or significant bug fix (skip for refactors, minor
fixes, and internal changes).
- [x] Developer documentation under `docs/` updated if behavior or
architecture changed.

**4. Pull request**

- [x] PR body built from `.github/PULL_REQUEST_TEMPLATE.md`, every
section filled.
- [x] All checklist items kept and marked `[x]`, `[ ]`, or `[/]`.
- [ ] "Steps to test" is a numbered list with a cropped screenshot of
the result for every visible change; no video (only allowed when another
program is involved, e.g. drag and drop or push to an external
application).
- [x] All HTML comments removed from the PR body.
- [/] PR created with `gh pr create --body-file <file>` (not `--body`).
- [/] If `CHANGELOG.md` used a `TODO` placeholder (no issue confidently
identified yet — an existing issue link always stays), the PR was opened
as draft, the placeholder was replaced with the real PR-number link
after PR creation, committed and pushed, and only then was the PR marked
ready for review. If an issue is identified or created later, the link
is switched to the issue.

</details>

### 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)
- [ ] 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
- [ ] 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: Aman Gautam <148102821+Gautam-aman@users.noreply.github.com>
Co-authored-by: Vadim Lazuk <8135225+Inf1mum@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>
Siedlerchr added a commit to gourprince222/jabref that referenced this pull request Nov 29, 2026
* main: (58 commits)
  Keep organization authors containing "and" intact in RIS export. (JabRef#17876)
  Fix author and editor name export in MODS format (JabRef#17936)
  Fix LaTeX conversion in exported PDF metadata (JabRef#17810)
  Fix preferences menu text (JabRef#17966)
  Skip forced full-text index merges on shutdown (JabRef#17961)
  Fix wrong bibo namespace in RDF export (JabRef#17842)
  New Crowdin updates (JabRef#17956)
  chore(deps): update dependency com.konghq:unirest-modules-gson to v4.12.4 (JabRef#17955)
  Let Renovate update JavaFX in the jabsrv launcher (JabRef#17954)
  chore(deps): update dependency com.konghq:unirest-modules-gson to v4.12.3 (JabRef#17953)
  Import the RIS serial number of books and chapters as ISBN (JabRef#17891)
  Share nested LaTeX conversion with Writer (JabRef#17921)
  Render BST preview italics and bold as text, not math letters (JabRef#17902)
  Chore(deps): Bump com.konghq:unirest-java-bom from 4.11.11 to 4.12.0 in /versions (JabRef#17951)
  Inject NativeDesktop into its callers and remove the deprecated static helpers (JabRef#17947)
  New Crowdin updates (JabRef#17945)
  Chore(deps): Bump org.graalvm.sdk:nativeimage from 25.5.5.0.3 to 25.6.5.1 in /versions (JabRef#17944)
  Chore(deps): Bump com.googlecode.plist:dd-plist from 1.30 to 1.31 in /versions (JabRef#17943)
  Chore(deps): Bump JetBrains/junie-github-action from 1.10.1 to 1.10.2 (JabRef#17942)
  Chore(deps): Bump softprops/action-gh-release from 3.0.3 to 3.0.4 (JabRef#17941)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: export-or-save dev: send-to-black-forest Port to the black-forest branch of JabRef/jabref-black-forest after merging (ADR-0073) size: medium status: changes-required Pull requests that are not yet complete 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.

RIS export splits an organization name containing “and” into multiple authors

4 participants