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

crossref resolution does not comply with biblatex specification #5045

Closed
1 task done
sfo opened this issue Jun 11, 2019 · 6 comments · Fixed by #5086
Closed
1 task done

crossref resolution does not comply with biblatex specification #5045

sfo opened this issue Jun 11, 2019 · 6 comments · Fixed by #5086
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. maintable

Comments

@sfo
Copy link
Contributor

sfo commented Jun 11, 2019

JabRef version

JabRef 5.0-dev--snapshot--2019-06-10--master--eb42850f7
Linux 4.4.0-150-generic amd64
Java 1.8.0_212

on

Ubuntu 16.04

Steps to reproduce the behavior

  1. create a Proceedings entry Foo2019
@Proceedings{Foo2019,
  title  = {Foo Conference},
  date   = {2019},
}
  1. create an InProceedings entry Bar2019 with crossref to Foo2019
@Proceedings{Bar2019,
  title  = {Bar Paper},
  crossref = {Foo2019},
}
  1. have a look at the Bar2019 row at the main table view

Observed behavior

The year field of the Bar2019 entry gets populated with the value from the Foo2019 entry.

Expected behavior

All fileds (esp. year and journal/booktitle) get populated with values obtained from the crossref'ed entry.

Explanation

According to the biblatex documentation (Appendix B), the booktitle field of an InProcessings entry inherits the value from the title field of the referenced Proceedings entry.

@tobiasdiez
Copy link
Member

As of now, JabRef simply takes the value of the same field from the referenced entry. These advanced mappings of biblatex are not yet taken into account.

The following code needs to be adapted:

// If this field is not set, and the entry has a crossref, try to look up the
// field in the referred entry: Do not do this for the bibtex key.
if (!result.isPresent() && (database != null)) {
Optional<BibEntry> referred = database.getReferencedEntry(this);
result = referred.flatMap(entry -> entry.getFieldOrAlias(field));
}

@tobiasdiez tobiasdiez added good first issue An issue intended for project-newcomers. Varies in difficulty. maintable labels Jun 14, 2019
@CyraxSector
Copy link
Contributor

@tobiasdiez I'll work on this issue

@CyraxSector
Copy link
Contributor

@tobiasdiez PR #5086 is open for review.

@Siedlerchr
Copy link
Member

Thanks to @CyraxSector this should be fixed now in the latest master.

@sfo
Copy link
Contributor Author

sfo commented Aug 26, 2019

Thanks for your effort. Unfortunately, this does not work for me in the latest master. See the attached MWE for testing.

JabRef 5.0-dev--snapshot--2019-08-26--master--b2e6e8383
Linux 4.4.0-159-generic amd64
Java 11.0.4

@Siedlerchr Siedlerchr reopened this Aug 26, 2019
sfo added a commit to sfo/jabref that referenced this issue Sep 5, 2019
* based on biblatex inheritance rules (c.f. doc appendix B)
* fixes JabRef#5045
@sfo sfo mentioned this issue Sep 5, 2019
6 tasks
@tobiasdiez
Copy link
Member

Thanks to you this should be fixed in the latest development version 😸 . Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. maintable
Projects
None yet
4 participants