Skip to content

Fix import into current library issuing wrong message#6269

Merged
Siedlerchr merged 3 commits into
JabRef:masterfrom
jcampbell11245:fix-for-issue-6266
Apr 13, 2020
Merged

Fix import into current library issuing wrong message#6269
Siedlerchr merged 3 commits into
JabRef:masterfrom
jcampbell11245:fix-for-issue-6266

Conversation

@jcampbell11245

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

btn.disableProperty().bind(booleanBind);

setResultConverter(button -> {
setResultConverter(button -> {

Copy link
Copy Markdown
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. ;-)

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

@Siedlerchr

Copy link
Copy Markdown
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
Copy Markdown
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