Skip to content

Support customized entry types in BibliographyConsistencyCheck #13794

@koppor

Description

@koppor

(This is a follow-up to #13584)

We have a library consistency check for checking whether fields in a set of entries are set/unset consistently. Currently, this is aware of the difference of BibTeX and BibLaTeX, but not Custom Entry Types

⚠ This is a good excercise to learn test-driven development and using a data model. This issue cannot be solved with an AI. You really have to think though BibTeX and BibLaTeX for yourself! Take this issue only if you are willing to invest significant time. ⚠

Example entry - from https://dblp.org/rec/journals/sqj/IftikharBAK25.html

@article{DBLP:journals/sqj/IftikharBAK25,
  author       = {Umar Iftikhar and
                  J{\"{u}}rgen B{\"{o}}rstler and
                  Nauman Bin Ali and
                  Oliver Kopp},
  title        = {Supporting the identification of prevalent quality issues in code
                  changes by analyzing reviewers' feedback},
  journal      = {Softw. Qual. J.},
  volume       = {33},
  number       = {2},
  pages        = {22},
  year         = {2025},
  url          = {https://doi.org/10.1007/s11219-025-09720-9},
  doi          = {10.1007/S11219-025-09720-9},
  timestamp    = {Mon, 12 May 2025 21:02:32 +0200},
  biburl       = {https://dblp.org/rec/journals/sqj/IftikharBAK25.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}

It contains bibourl and bibsource

One could make these two fields required.

@article{withBibSource,
  journal      = {Softw. Qual. J.},
  bibsource = {2025}
}

@article{withoutBibSource,
  journal      = {Softw. Qual. J.},
}

With the existing consistency check, bibsource is reported as unknown. If the entry type article is modified to have this as optional field, it is reported as optional.

Task

  • Modify org.jabref.logic.quality.consistency.BibliographyConsistencyCheck to use org.jabref.model.entry.BibEntryTypesManager instead of org.jabref.model.entry.types.BiblatexEntryTypeDefinitions#ALL

Hints

  • Do test-driven development. Start atorg.jabref.logic.quality.consistency.BibliographyConsistencyCheckTest. Do not modify existing tests; add new ones.
  • Look into org.jabref.model.entry.BibEntryTypesManagerTest for how to mock BibEntryTypesManager.
  • Do not get confused with "library" and "database". User-facing we talk about "library", inside the code, we use "database", but mean "library".

Metadata

Metadata

Assignees

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions