-
-
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
Rename labelpattern to bibtexkeypattern and fix pref issue #1704
Conversation
@JabRef/developers Two related questions regarding the migration of LabelPatterns:
... and why the hell is this test failing now?!
|
Keep the old prefs. They are not consuming much space in the registry. If someone starts an old JabRef version, the old patterns should still be there. It might be that users update from <= 3.5 to a far newer version (4.0?) and want to go back to 3.5, because something does not work on 4.0. Keep the new ones, if old prefs are there. I foresee that some users will complain that the patterns change when having used an old version and changed the patterns there. But I think, those guys will be seldom :) |
Probably just keeping them is the easiest alternative, as long as this does not create any side effects. |
Chosen approach is: The first time JabRef is run it is checked whether old patterns are there - if yes, they are migrated. Subsequently migration is skipped. Old prefs are not deleted. Apart from the changes in the help.jabref.org repo this is good to go from my side. |
@@ -79,4 +88,43 @@ public static void upgradeSortOrder() { | |||
} | |||
} | |||
|
|||
/** | |||
* Migrate LabelPattern configuration from version 3.3-3.5 to new BibtexKeyPatterns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment: Could we also upgrade from <3.3? We still have users coming from JabRef 2.9.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be possible. I'll implement the logic that the newest available prefs are migrated to 3.6
Besides the minor comment: LGTM. As far as I can see, import/export of preferences doesn't include the bibtex key patterns, does it? |
|
||
} | ||
if (mainPrefsNode.nodeExists("bibtexkeypatterns")) { | ||
return; //Pref node already exists do not migrate from previous version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move the comment above the statement?
Prefs were already reported correctly, regarding this point I was wrong at the Dev call. But I should check whether importing is now working fine. |
LGTM 👍 |
f63c458
to
fd21ad4
Compare
Added further migrations fors 3.0-3.2 and <3.0. Exporting and importing prefs is working with KeyPatterns. |
Does this fix #1257 ? (Except the 3.2 to 3.3 part...) In that case add a ChangeLog entry and remove the wontfix tag. :-) |
Added the changelog entry. ... can be merged as soon as https://github.com/JabRef/help.jabref.org/pull/46 is merged - which fixes the failing test. |
As mentioned by @lenhard in #1626 (comment) - this is a follow up PR:
Change in CHANGELOG.md describedinternal cleanupTests created for changesold tests still passScreenshots added (for bigger UI changes)no UI changes