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

Fix import into current library issuing wrong message #6269

Merged
merged 3 commits into from
Apr 13, 2020

Conversation

jcampbell11245
Copy link
Contributor

This change fixes #6266 in which an erroneous message "import canceled" is displayed when importing into the current library. This fix was accomplished by modifying the parameter of the extends clause of the ImportEntriesDialog class to have a return type of Boolean rather than Void and making setResultConverter return false rather than null.

  • Change in CHANGELOG.md described (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 documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

This change fixes JabRef#6266 in which an erroneous message "import cancelled" is displayed when importing into the current library. This fix was accomplished by modifying the parameter of the extends clause of the ImportEntriesDialog class to have a return type of Boolean rather than Void and making setResultConverter return false rather than null.
@tobiasdiez
Copy link
Member

Welcome to JabRef and thanks for your contribution!
Can you please describe how your changes fix #6266? I couldn't find the place where the return value of the dialog was used.

@jcampbell11245
Copy link
Contributor Author

Hello, since this issue is a duplicate of #4841 I followed the comments on that issue and implemented your possible solution which resolved the issue. To be honest I do not know exactly how this fixed the issue.

@@ -76,14 +76,14 @@ public ImportEntriesDialog(BibDatabaseContext database, BackgroundTask<ParserRes
Button btn = (Button) this.getDialogPane().lookupButton(importButton);
btn.disableProperty().bind(booleanBind);

setResultConverter(button -> {
setResultConverter(button -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jcampbell11245, thanks for your contribution.
Tiny issue: Indentation is moved to the left. ;-)

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. I already forgot about this bug.

I went through all dialogs and found one further instance where this problem occurs:

setResultConverter(buttonPressed -> {
if (buttonPressed == buttonTypeImport) {
startImport();
} else {
if (findUnlinkedFilesTask != null) {
findUnlinkedFilesTask.cancel();
}
}
return null;
});

Would be nice if you could fix this as well.

…in FindUnlinkedFilesDialog

I have added back the proper indentation for line 79 of ImportEntriesDialog and changed the return value to Boolean and returned false in FindUnlinkedFilesDialog.
@jcampbell11245
Copy link
Contributor Author

I have pushed a commit fixing the indentation and fixing the problem in the FindUnlinkedFilesDialog.

@Siedlerchr
Copy link
Member

Thanks again for your contribution! 👍 We hope you are interested in contributing further ;)

@Siedlerchr Siedlerchr merged commit fe79e51 into JabRef:master Apr 13, 2020
@jcampbell11245
Copy link
Contributor Author

You're welcome! This was fun. I hope to contribute further as well.

@jcampbell11245 jcampbell11245 deleted the fix-for-issue-6266 branch April 13, 2020 15:58
koppor pushed a commit that referenced this pull request Nov 1, 2022
13fd98e Update journal-of-medical-internet-research.csl (#6217)
f7acad2 Updating file to maintain Abertay's Style guide (#6223)
0c4eaae Update physiotherapy-theory-and-practice.csl (#6210)
2d404f0 Hanging indent was missing in style (#6278)
a2fb539 Bump nokogiri from 1.13.6 to 1.13.9 (#6277)
5a40394 Create arcadia-science.csl  (#6078)
750495a Update ieee.csl (#6269)
e55930f Update and rename dependent/veterinary-record-open.csl to veterinary-record-open.csl (#6273)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 13fd98e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import into current libarary issues wrong message
4 participants