Skip to content
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

Backups: Handle discarded changes v2 #9457

Closed
wants to merge 2 commits into from

Conversation

mmohanb1
Copy link

@mmohanb1 mmohanb1 commented Dec 15, 2022

Fixes #9361

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Added code to discard changes made by user and prevent jabRef to show restore dialog when user opens applications again.
Added code to set discardedFlagExists of backupManager to true, when user discards changes before shutting down jabRef(Issue JabRef#9361).
@koppor koppor mentioned this pull request Dec 16, 2022
6 tasks
@koppor
Copy link
Member

koppor commented Dec 16, 2022

@mmohanb1 Thank you for continuously working on it. For the others, you could have explained why you opened a new pull request. You could also have done a force-push to the existing branch to discard all old commits.

Based on our discussions at #9361 and seeing the new release coming up soon, three members of the core team sat together this evening and worked on fixing the issue. It turned out that it was much harder than we thought. The test cases were very difficult to craft. It are more than 100 lines --> https://github.com/JabRef/jabref/pull/9458/files#diff-a7050d7b065fe4dfb3b7d7b02f0c4aa1743ae657992a882b0b4056c61c19275a.

The whole solution is available at #9458. Feel free to comment on the implementation or to add some more test cases.

Since the other pull request is more advanced (checkstyle is OK, test cases exist, seems to work).

@koppor koppor closed this Dec 16, 2022
@mmohanb1
Copy link
Author

mmohanb1 commented Dec 16, 2022 via email

@ThiloteE ThiloteE changed the title Draft PR in reference to issue #9361 Backups: Handle discarded changes v2 Dec 20, 2022
@Siedlerchr Siedlerchr mentioned this pull request Dec 29, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Discard changes" in "Save before closing" should delete "newer" backups
3 participants