Skip to content

Set BibEntry to "changed" state before setting a new entry type#5966

Merged
Siedlerchr merged 2 commits into
JabRef:masterfrom
dawidm:fix-for-issue-5905
Feb 21, 2020
Merged

Set BibEntry to "changed" state before setting a new entry type#5966
Siedlerchr merged 2 commits into
JabRef:masterfrom
dawidm:fix-for-issue-5905

Conversation

@dawidm

@dawidm dawidm commented Feb 20, 2020

Copy link
Copy Markdown
Contributor

fixes #5905

The issue happens because changed property in BibEntry is set after updating entry type, so property listeners get entry object with new entry type but changed value set to false. Because of that wrong bibtex code is generated by:
entry.typeProperty().addListener(listener -> updateCodeArea()); (SourceTab.java).

  • 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 bigger UI changes)
  • Checked documentation: Is the information available and up to date? If not: Issue created at https://github.com/JabRef/user-documentation/issues.

@calixtus

Copy link
Copy Markdown
Member

Cool, you found the problem. Thanks! LGTM

@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.

Nice! That also explains why the error only occurs the first time.

Could you please add a changelog entry, then we can merge!

@koppor koppor added this to the v5.0 milestone Feb 20, 2020
@dawidm dawidm requested a review from tobiasdiez February 21, 2020 10:46
@Siedlerchr Siedlerchr merged commit 258dcef into JabRef:master Feb 21, 2020
@Siedlerchr

Copy link
Copy Markdown
Member

Thanks again for your contribution! 👍

Siedlerchr added a commit that referenced this pull request Mar 6, 2020
* upstream/master: (21 commits)
  Update module description (#5999)
  New Crowdin translations (#5990)
  Fix NPE in OpenAccessDoi (#5994)
  Move generate BibTeX keys to Edit menu (#5987)
  Fixed display of groups and links column in MainTable (#5985)
  Fixed loosing group if the most bottom one in list is dragged on itself (#5983)
  Dividers (#5975)
  Add initial section on code quality (#5991)
  Create .sonarcloud.properties
  Add new IntelliJ video tutorial to docs. (#5984)
  Fix checkstyle
  Optimize stream() code
  Use application/x-bibtex for Grobid instance
  New Crowdin translations (#5971)
  Set BibEntry to "changed" state before setting a new entry type (#5966)
  Rework tools menu (#5979)
  Help menu (#5976)
  Fixed formatting
  Refactored subtile changes to optics of library properties (#5969)
  Change grobid URL to jabref subdomain (#5972)
  ...
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.

Changing entry type does not work when biblatex source is shown

5 participants