Add button to shorten the DOI
JabRef renders the DOI in General -> DOI - Example DOI: 10.1038/ejcn.2011.64
(See this: Open JabRef -> "New example library" -> "Tokede_2011")
JabRef allows to shorten the doi using the cleanup dialog: (Quality -> cleanup entries)
Result:
10/bt29n7
Although this is technically OK, there should be a better way: A button "shorten" at the DOI editor
Task:
- Copy
IdentifierEditor.fxmltoDoiIdentifierEditor.fxml - Add button "shortenDoi" (you need to find a nice glyph)
- Copy
IdentifierEditor.javato new packageorg.jabref.gui.fieldeditors.identifier.doitoDoiEditor - Move
DoiIdentifierEditorViewModelto the new package - Remove doi logic from
org.jabref.gui.fieldeditors.identifier.IdentifierEditor - Adapt
DoiEditorto contain the new button w/ the shortDoi functionality7. Add anifatorg.jabref.gui.fieldeditors.FieldEditors#getForFieldbeforefieldProperties.contains(FieldProperty.IDENTIFIERto return theDoiEditor
/assign-me
👋 Hey @turhantolgaunal, thank you for your interest in this issue! 🎉
We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.
For questions on JabRef functionality and the code base, you can consult the JabRef Guru or ask on our Gitter chat.
In case you encounter failing tests during development, please check our developer FAQs!
Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.
Happy coding! 🚀
Copy IdentifierEditor.fxml to DoiIdentifierEditor.fxml
We have a mechnism in BaseIdentifierEditorViewModel to enable/disable actions based on type of identifier, so creating a new ID editor specifically for DOI is not necessary.
See BaseIdentifierEditorViewModel#configure.
We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.
For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/13657.