Skip to content

When fetching from DOI: Dialog should select field data based on validity #12549

Open
@koppor

Description

@koppor

As user, I can refine entry's data using a DOI. See https://docs.jabref.org/finding-sorting-and-cleaning-entries/getbibtexdatafromdoi#completing-information-based-on-doi-or-isbn for an example.

Then, for any field, it could be possible that information is existing locally ("Original entry") and from the DOI ("Entry from DOI").

Example:

Image

However, sometimes, the local data is really wrong. In this example, the "year" (1109) and the "Entrytype" (Misc).

The dialog should select the data which could be more right. Here, "Entrytype" and "Year" should be selected from "Entry from DOI":

Image

Task

  1. Find out how the Merge Entries Dialog is called
  2. Modify it to know that it knows that is called from "get bibliographic data from DOI" (or not)
  3. If called from "get bibliographic data from DOI", then it should go through all fields existing in both entries and select the ones more "right". Implement it for entry type (misc; != misc) and year. - Also use "DOI" from the "DOI" fetcher (if code-wise clean enough)
  4. Implement a class "FieldValueValidityComparator" implementing a comparator. The score returned is -, +, 0 depending if the left,, right value are "better" and 0 if the fields are equal or the comparator cannot tell
  5. Inherit from it for YearFieldValueValidityComparator.
  6. Use these comparators in the Merge Entries Dialog

Details

The dialog currently prioritizes the entry from the library. Sometimes, the data from the library is really wrong.

Example:

@Misc{,
  year      = {1109},
  doi       = {10.1109/IPDPSW55747.2022.00093},
  publisher = {IEEE},
}
  1. Wrong entry type
  2. Wrong year

When the merge entries dialog is started, it should select the more propriate entry type (everything else as MISC is better) and the better year (if year differs more than 10 years, the "new" year should be taken)

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: mergeMerging of BibTeX entries, merge entry dialog, diffing ...component: uigood first issueAn issue intended for project-newcomers. Varies in difficulty.

    Type

    No type

    Projects

    Status

    Free to take

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions