Skip to content

Fix for issue 2811: bibtexkey generator does not use crossref information#3248

Merged
lenhard merged 9 commits into
JabRef:masterfrom
125m125:fix-for-issue-2811
Oct 6, 2017
Merged

Fix for issue 2811: bibtexkey generator does not use crossref information#3248
lenhard merged 9 commits into
JabRef:masterfrom
125m125:fix-for-issue-2811

Conversation

@125m125

@125m125 125m125 commented Oct 2, 2017

Copy link
Copy Markdown
Contributor

see #2811
The BibTex key generator now uses crossreferenced entries if required fields are empty.

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@125m125 125m125 changed the title Fix for issue 2811 Fix for issue 2811: bibtexkey generator does not use crossref information Oct 2, 2017

@Siedlerchr Siedlerchr 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 your contribution! Very good!
Just remove the line with the sys out and it looks very good

database.insertEntry(entry1);
String bibtexString = "@ARTICLE{entry2, author={Mari D. Herland and Mona-Iren Hauge and Ingeborg M. Helgeland}}";
BibEntry entry2 = BibtexParser.singleFromString(bibtexString, importFormatPreferences).get();
database.insertEntry(entry2);

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.

Seems like you have forgotten to remove the system out print here

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

Thank you again for a great contribution! I only have a small remark concerning the tests and then this can be merged.

BibDatabase database = new BibDatabase();
BibEntry entry1 = new BibEntry();
entry1.setField(FieldName.CROSSREF, "entry2");
database.insertEntry(entry1);

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.

Please construct the entry by hand (as you did for entry1) instead of using the parser. I know, the other tests also work like that but this is bad design.

@lenhard

lenhard commented Oct 6, 2017

Copy link
Copy Markdown
Member

@125m125 That is really an impressive amount of tests, good job!

There are two merge conflicts. Could you resolve those? Once that's done this PR is ready to go into master.

@lenhard

lenhard commented Oct 6, 2017

Copy link
Copy Markdown
Member

And once again thanks!

@lenhard lenhard merged commit 0a7a718 into JabRef:master Oct 6, 2017
Siedlerchr added a commit that referenced this pull request Oct 7, 2017
* upstream/master: (113 commits)
  Open statistics dialog from correct thread (#3272)
  Fix for issue 2811: bibtexkey generator does not use crossref information (#3248)
  Fix for issue 3143: Import entry from clipboard in different formats (#3243)
  French translation correction (#3262)
  Wait to ask to collect anonymous statistics in JabRefExecutorService to allow jvm to terminate (#3266)
  Directory pattern bracketed expressions (#3238)
  Show development information
  Release v4.0
  add another author to mailmap
  moved changelog entry to the right category
  update new AUTHORS info
  Update log4j from 2.9.0 -> 2.9.1
  fix dblp fetcher
  Add missing Turkish translation
  Add "-console" parameter for Windows launcher (#3242)
  Path check converted to if statement
  Changelog updated
  Fixed renaming files which are not in main directory.
  Only use last name for auto completion in search bar. Fixes JabRef#253
  Implemented issue #3229 (#3233)
  ...
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.

4 participants