Skip to content

Commit

Permalink
Consider entries as equal if their DOI matches #2708
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-kolb committed Apr 4, 2017
1 parent a82328d commit 47f5dde
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/jabref/logic/bibtex/DuplicateCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ private DuplicateCheck() {}
* Requirements:
* 1. Equal entry type
*
* Checks:
* 1. Equal identifier (DOI)
*
* @param one BibEntry
* @param two BibEntry
* @return boolean
Expand All @@ -72,6 +75,11 @@ public static boolean isDuplicate(BibEntry one, BibEntry two, BibDatabaseMode bi
return false;
}

// same identifier
if (compareSingleField(FieldName.DOI, one, two) == 1) {

This comment has been minimized.

Copy link
@tobiasdiez

tobiasdiez Apr 4, 2017

Member

I think it makes sense to implement a similar check for the ISBN (at least for books) and eprint field.

This comment has been minimized.

Copy link
@stefan-kolb

stefan-kolb Apr 4, 2017

Author Member

Will do so.

return true;
}

EntryType type = EntryTypes.getTypeOrDefault(one.getType(), bibDatabaseMode);
// The check if they have the same required fields:
List<String> var = type.getRequiredFieldsFlat();
Expand Down

0 comments on commit 47f5dde

Please sign in to comment.