-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Citation keys are always overwritten when importing through web search #7420
Comments
Same issue for me. I always manually rewrite bibtex-key which i fetch from inspire or ads |
@bulmust, the workaround(s) work for now? |
I meant using the citation key pattern |
I debugged a bit and the problem seems to be that this import handler doesn't check the preferences if the key should be overwritten or not. And further down there isn't any check either. So the solution would be to add a check for the setting from the CitationKeyPrefereces. jabref/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java Lines 196 to 210 in 86d52cd
|
Thank you. It is solved. Before Jabref 5.x versions, this option was default. Solution is following: |
Fixes JabRef#7420 If 'Overwrite existing keys' in 'Preferences' > 'Citation key patterns' is unchecked, 'CitatonKeyGenerator' only overwrites the default citationKey if it is blank. If it is not blank, the default citationKey is not overwritten.
Hey, I've (possibly) been able to fix this, but I'm not sure if it's according to JabRefs intended behaviour for this feature (more details on that can be found in the Pull Request). |
* Fix citation keys unintentionally being overwritten on import Fixes #7420 If 'Overwrite existing keys' in 'Preferences' > 'Citation key patterns' is unchecked, 'CitatonKeyGenerator' only overwrites the default citationKey if it is blank. If it is not blank, the default citationKey is not overwritten. * WIP add import preferences tab, checkbox for setting Commit does not work as intended yet (is buggy) Co-authored-by: Christoph <siedlerkiller@gmail.com>
The citation key generator never preserves citation keys while importing from sites such as INSPIRE HEP. The citation keys are overwritten even if "Overwrite existing keys" is disabled in preferences and always without warning.
JabRef version
Relevant links
Temporary workaround
It is possible to keep citation keys by using the citation key pattern
[CITATIONKEY]
during the import.:
must also be removed from the "Remove the following characters" field in preferences.It should be possible to use the regexp in #7111 (comment) to create a workaround where a different pattern is used when there is no citation key in the imported entry. (If someone manages with this approach, feel free to add a comment and perhaps others will also find it useful)
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: