Skip to content

Mode-aware consistency check #13467

@koppor

Description

@koppor

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

⚠ 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:

@online{withDate,
  date = {2025},
  urldate = {2025-07-05}
}

@online{withoutDate,
  urldate = {2025-07-05}
}

In BibTeX: Only withDate, field: date should be reported, because both entries take urldate.

In BibLaTeX: Only withoutDate, field: date (missing) should be reported, because required field date is missing.

Task

  • Modify org.jabref.logic.quality.consistency.BibliographyConsistencyCheck to use a complete BibDatabaseContext instead of a list of entries
  • Modify org.jabref.logic.quality.consistency.BibliographyConsistencyCheck#check to adhere the mode

Hints

  • Required fields of BibLaTeX @online: org.jabref.model.entry.types.BiblatexEntryTypeDefinitions#ONLINE
  • Get used to org.jabref.model.entry.types.BibtexEntryTypeDefinitions and org.jabref.model.entry.types.BiblatexEntryTypeDefinitions
  • One can get the required fields using org.jabref.model.entry.BibEntryType#getRequiredFields
  • Do test-driven development. Start with enabling org.jabref.logic.quality.consistency.BibliographyConsistencyCheckTest#unsetFieldsReported again.
  • 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