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 field must not contain multiple entries #5284

Closed
sfo opened this issue Sep 5, 2019 · 12 comments
Closed

crossref field must not contain multiple entries #5284

sfo opened this issue Sep 5, 2019 · 12 comments
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. integrity-checker type: enhancement

Comments

@sfo
Copy link
Contributor

sfo commented Sep 5, 2019

JabRef 5.0-dev
Linux 4.4.0-159-generic amd64
Java 11.0.4

Build from latest master at 99a0a7a


The entry editor allows to specify a comma separated list for the crossref field. However, this is not allowed, an entry can have only one "parent" entry.

@tobiasdiez
Copy link
Member

I think this would be best implemented as an integrity check (as we usually don't restrict input in the fields).

@tobiasdiez tobiasdiez added type: enhancement good first issue An issue intended for project-newcomers. Varies in difficulty. integrity-checker labels Sep 8, 2019
@sfo
Copy link
Contributor Author

sfo commented Sep 9, 2019

Actually, the GUI needs refinement as well, I think. The crossref field explicitly allows to set multiple values, which is not correct (see screenshot). This might be changed to allow only one entry or change to a simple text field combined with some integrity checks.

jabref_crossref

@ajsaraujo
Copy link

Can I take this one? In which classes I should work? Which integrity checks should the program perform?

@lberetti
Copy link

Hello,

We are a team of three students from France and we would be glad to try to help solving this issue.
It will be our first contribution to an OpenSource project.

@Siedlerchr
Copy link
Member

@LucasB98 Bonjour et merci de l'intérêt que vous portez à JabRef 😸

Please follow our contribution guide for getting started and for setting up the workspace ( I would suggest you use Intellij as there are currently some difficulties with eclipse has some problems atm).
If you have all setup, the relevant classes for this behaviour are FieldEditor and LinkedEntriesEditor.
They are located under org.jabref.gui.fieldeditors
It seems that at the moment both FieldProperty.SINGLE_ENTRY_LINK and FieldProperty.MULTIPLE_ENTRY_LINK are handled in the same way.
A possible solution would be to separate the handling of multiple entry links (allowing multiple values) and single entry links (allowing only one link).

@lberetti
Copy link

lberetti commented Dec 4, 2019

We noticed that in crossref field, you can enter your own bibtexkey in crossef.
An exemple: if I create an entry in a library with John as Author and John2019 as bibtexkey, I noticed we can put John2019 as crossref. But i think that's not normal. What do you think about it ?

@tobiasdiez
Copy link
Member

That's a good observation. I think, we shouldn't prevent people from entering the same key (maybe he wants to change the key immediately after), but there should indeed be a warning (realized using an integrity check).

Julien29121998 added a commit to Julien29121998/jabref that referenced this issue Dec 9, 2019
Fixed issue JabRef#5284 where multiple entries were allowed in crossref field, whereas only one should be allowed. JabRef#5284
@Vencesdab
Copy link

About the warning you propose, should it be made a new issue ?

@tobiasdiez
Copy link
Member

I think it would be best to directly implement it as part of your PR, if that is possible.

@lberetti
Copy link

We searched a way to compare the crossref field to the bibtexkey of the current entry. Do you know in which file this can be done?
We found the class BidirectionalListBinding that seems to be related to this task. But we are not quite sure, and it's really far in terms of function calls from EntryLinkList.
Can you help us please :)

@Siedlerchr
Copy link
Member

What Tobias means is you should use the integrity checker logic (Quality-> Check integrity)
The integrity check is located under org.jabref.logic.integrity .Take a look at the FieldChecker implementations. Both Crossref (Standard field) and the Key field (internal fields) fields of the class BibEntry.
The ListBIndings are only for the gui to provide helper functions for dealing with javafx

koppor pushed a commit that referenced this issue Dec 15, 2019
Co-authored-by: Julien Bénard
Co-authored-by: Lucas Beretti
Co-authored-by: Venceslas Roullier
@tobiasdiez
Copy link
Member

Thanks to @Julien29121998 and collaborators 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.

Siedlerchr added a commit that referenced this issue Dec 20, 2019
# By Tobias Diez (11) and others
# Via GitHub (1) and Tobias Diez (1)
* upstream/master: (29 commits)
  Improve things arround change detection (#5770)
  Revert "Update to most recent journal abbreviation list" (#5769)
  Various fixes to the dark theme (#5764)
  Bump mockito-core from 3.2.0 to 3.2.4 (#5760)
  Bump classgraph from 4.8.58 to 4.8.59 (#5761)
  Improve dependency update rules
  Update jpackage to build 27 (#5758)
  Persistent column sortorder (#5730)
  Fix medline fetcher/importer when using installer (#5752)
  New Crowdin translations (#5751)
  Bump byte-buddy-parent from 1.10.4 to 1.10.5 (#5750)
  Fix checkstyle
  Fix filename
  Update to most recent journal abbreviation list
  Remove obsolete string
  Revert "Switch back to development"
  Switch back to development
  Next development cycle
  Release 5.0-beta (#5684)
  Fix multiple entries allowed in crossref (issue #5284) (#5724)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/collab/ChangeDisplayDialog.java
#	src/main/java/org/jabref/gui/collab/EntryChangeViewModel.java
Siedlerchr added a commit that referenced this issue Mar 14, 2021
30fb68e Create BJEDIS-ABNT-Number (#5255)
aafb868 Update geochimica-et-cosmochimica-acta.csl (#5321)
60ba25f british-journal-of-anaesthesia.csl: add comma delimiter between non-sequential citations eg. 1 4 7-9 -> 1, 4, 7-9  (#5313)
67e6564 Reindent/reorder (#5318)
c0d2a39 Ruby 3.0.0 (#5309)
76d60ff Update harvard-anglia-ruskin-university.csl (#5310)
bc18ac9 Create journal-for-the-study-of-the-new-testament.csl (#5312)
aff602c Update journal-of-food-protection.csl (#5315)
4503826 Update muscle-and-nerve.csl (#5317)
3bed58e constant redefinition
4d718a0 update documentaiton link
fa99e2f add comma delimiter between succesive numbers
d396f8b Allow privileged testing of PRs (#5307)
43b22c7 Update masarykova-univerzita-pravnicka-fakulta.csl, pravnik.csl, iso690-full-note-cs.csl (#5308)
8a31c1e Update copernicus-publications.csl (#5303)
96760bb Update anabases.csl (#5304)
744de6d removed locale (#5300)
7eb0d60 Update aviation-space-and-environmental-medicine.csl (#5297)
2769970 Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5298)
51e3f4c Update harvard-university-of-bath.csl (#5299)
5fce84f Create cns-spectrums.csl (#5290)
bb8082c Create journal-of-surgical-oncology.csl (#5259)
90c13ae Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5288)
4bab1ad Update early-christianity.csl (#5289)
636ba78 Update tatup-zeitschrift-fur-technikfolgenabschatzung-in-theorie-und-… (#5291)
b7cc511 Create biotechnologia.csl (#5292)
5bab881 Update journal-of-orthopaedic-trauma.csl (#5287)
5943413 Fix locales (#5285)
302bd65 Update universite-du-quebec-a-montreal-departement-dhistoire.csl (#5286)
860ae48 Add Haaga-Helia University of Applied Sciences Harvard style (#5282)
c1c27de  Localize Metropolia style title (#5283)
508da89 Fix presentation for Methods of Information in Medicine (#5284)
53e1d0b Create geschichte-und-gesellschaft.csl (#5216)
d7ed0cb Create universite-de-geneve-departement-de-francais-moderne.csl (#5212)
80c404b Update journal-of-orthopaedic-trauma.csl (#5281)
20c143a Adding publishers' names (#5280)
6e5cd59 Update sodertorns-hogskola-oxford.csl (#5279)
52f2621 dollar-brace
a260294 Create journal-of-microbiology-and-biotechnology.csl (#5277)
1fc979e Create qeios.csl (#5261)
86347b7 GH does this for us -- again, sorry guys
b649589 Create experimental-biology-and-medicine.csl (#5276)
12ae0b1 Revert "tell sheldon about the job state"
bdcae89 tell sheldon about the job state
1240067 Add Vegetation classification and Survey (#5271)
6f398f0 Major update to Gallia.csl (#5269)
2a74b2c Update filters.yaml (#5273)
20046d2 Update spec_helper.rb (#5272)
2ee0dd8 Create the-sociological-review.csl (#5260)
5b8d09c move filters to inert file to pacify Sheldon (#5268)
e5f3315 Localize more language descriptors in style titles (#5270)
bfd2942 Localize more language descriptors in style titles (#5267)
35e276f Fix variable used for the label after indication of number of pages (#5240)
60f6371 Create Universidade-do-Estado-do-Rio-de-Janeiro.csl (#5247)
d8cc2ae Create the-journal-of-the-acoustical-society-of-america-numeric.csl (#5256)
92259c1 Create journal-of-financial-and-quantitative-analysis.csl (#5264)
6ba8aab Create journal-of-vestibular-research.csl (#5258)
0c88f41 Update european-journal-of-international-law.csl (#5265)
cff5abc Put language descriptor within parentheses
4a62709 Update monash-university-harvard.csl (#5253)
64fd1aa Localize more language descriptors in style titles (#5262)
f6519cb Localize more language descriptors in style titles (#5257)
170ccae tiny fixes for universitat-basel-iberoromanistik.csl (#5254)
b7284c9 Localize more language descriptors in style titles (#5252)
f4ef858 Add "Baishideng Publishing Group" dependents (#5251)
266e7c3 Make world-journal-of-hepatology.csl to bpg.csl parent (#5243)
9129098 fix small formatting issues for mclc.csl (#5229)
5d9560b Create crispr-journal.csl (#5249)
a217299 Change "Czech" to "Čeština" in titles (#5248)
4fef39a Create journal-of-open-research-software.csl (#5245)
2bff1a6 Change "Dutch" to "Nederlands" in titles (#5242)
f28da34 Update spec_helper.rb (#5246)
e0e977c Move content from wiki pages to markdown files (#5194)
018304c Update universite-de-montreal-apa.csl (#5239)
3b83e5c Create sodertorns-hogskola-oxford.csl (#5234)
1335378 Stop notifying 8827 port on Zotero servers (#5237)
f079b2a Update author-year disambiguation (#5238)
60bb0c9 Update technische-universitat-dresden-medizin.csl (#5236)
e374657 Create Leidraad voor juridische auteurs 2019 (Dutch) (#5223)
0450d89 Add new style for U of Mannheim, Germanistische Linguistik (#5228)
81f0689 Create health-sports-rehabilitation-medicine.csl (#5233)
c152a44 Update Gemfile.lock (#5235)
748e1eb Update geochimica-et-cosmochimica-acta.csl (#5231)
06b9ce8 Update zeitschrift-fur-theologie-und-philosophie.csl (#5230)
e747cb1 haute-ecole-de-gestion-de-geneve: Make polyglot & et al changes
4cfedb7 Create universite-de-sherbrooke-histoire.csl (#5210)
a96a61e Update journal-of-glaciology.csl (#5222)
c6a94c9 Add Journal of Human Rights (#5227)
c5c9c5f Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5214)
ffb7aa6 Create comparativ.csl (#5215)
e07329a Update lancaster-university-harvard.csl (#5220)
c075d41 Update mimesis-edizioni.csl (#5219)
502970a Removed space in year only citation (#5218)
13e8c6b Update acta-scientiae-veterinariae.csl (#5209)
0699da6 Remake mammallia.csl for Oct/2020 guidelines. (#5207)
b2dd3fd Update journal-of-international-business-studies.csl (#5217)
dd52bfe Update quaternaire.csl (#5199)
ccb1b0d rebuild webpage and article-journal citations in journal-of-forensic-sciences.csl (#5203)
f02f4fb Create pedosphere.csl (#5196)
70dd87a Create open-gender-journal.csl (#5198)
d272998 Create the-quarterly-journal-of-economics.csl (#5197)
d27cab3 fix locale issues, add cite-locator (#5206)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 30fb68e
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. integrity-checker type: enhancement
Projects
None yet
Development

No branches or pull requests

6 participants