Implement a duplicate checker for Citation Relations entities#11186
Conversation
- implemented a duplicate checker by comparing entries names - Marked existing entries "Light Green" - Added a "localEntry" in the "CitationRelationItem"
|
much simpler, use the existing duplicate check https://github.com/JabRef/jabref/blob/main/src/main/java/org/jabref/logic/database/DuplicateCheck.java#L38 |
It might be that the duplicate check needs to be improved. One can do that test-driven. -- Nevertheless, that check needs to be used, because other JabRef functionality also relies on that code. |
I'd like to try to improve the checker. Should I start by writing test cases and detect the weaknesses? |
Sure thing. I think, the main issue is #8885. - The hint at #9769 (comment) is worth to read. See the diff https://github.com/JabRef/jabref/pull/9769/files where tests are located. When working in the code, leave some JavaDoc how to treat duplicates. The current idea is IMHO that each difference gets some points. So that if, by accident, an entry has the same identifier, it could still be a non-duplicate somehow. However, I would try to change the algorithm to treat identifier equality as equal entries. -- And weight title the highest. One has really to play around with the thing. Please do in a separate pull request - and just use the duplication check in this PR. (Reason: Keeping the pull requests small) |
Ok, I will keep that in mind. |
koppor
left a comment
There was a problem hiding this comment.
Good start, some minor comments.
…TabViewModelTest" to match the new constructor
… check" Signed-off-by: AbdAlRahmanGad <abdobngad@gmail.com>
|
@AbdAlRahmanGad Please check GitHubs CI report 30 minutes after submitting the PR. In the concrete case, you see that |
…te entries Signed-off-by: AbdAlRahmanGad <abdobngad@gmail.com>
|
@AbdAlRahmanGad Looks good. Do you think, something is left from your side? If not, you can mark it as "Ready for review"! |
Fixes #10414
I implemented the duplicate checker by comparing entries names although I am not sure if it's the best way yet.
As for the second requirement.
There is already a code that replaces the "add button" to a "link button" if the entry is a local one.

Preview
Untitled.mov
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)