jabref icon indicating copy to clipboard operation
jabref copied to clipboard

"Crossref" field should also work if Autocomplete is disabled

Open nicolahinssen opened this issue 3 years ago • 5 comments

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 11 Pro (build 22471) | JabRef 5.4--2021-10-11--2e71d5f

Checked with the latest development build

  • [X] I made a backup of my libraries before testing the latest development version.
  • [X] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Enter a citekey (in my case an "mvBook") of the parent entry in the crossref field
  2. The BibLaTeX source doesn't show the crossref line.
  3. After closing JabRef and reopening, the crossref input field is also empty again.

Appendix

...

Log File `It seems nothing is being logged `

nicolahinssen avatar Oct 13 '21 15:10 nicolahinssen

You need to have Autcompletion enable for crossref: I guess this is disabled In the preferences -> Entry Editor -> Use autcompletion grafik

Siedlerchr avatar Oct 13 '21 16:10 Siedlerchr

Thank you for you quick reply. Autocomplete solved the problem, just like you said!

However, I think it's weird that the crossref feature doesn't work out of the box. Furthermore it would be nice if the preview layout was also updated according to the merged parent/child entries.

nicolahinssen avatar Oct 14 '21 07:10 nicolahinssen

I changed the title and marked it as feature. Regarding the entry preview see #7378

Siedlerchr avatar Oct 16 '21 07:10 Siedlerchr

I would suggest a separate preference to enable crossref because of severe performance issues of autocompletion when it comes to large databases. See #6967. And of course, it should work if autocomplete is enabled.

ThiloteE avatar May 12 '22 18:05 ThiloteE

For anyone wanting so solve this, have a look at FieldEditors in combination with SuggestionProviders

Siedlerchr avatar May 12 '22 18:05 Siedlerchr

Hi @Siedlerchr I need some brainstorming about this issue. I am requesting some suggestions for it.

pal-anish avatar Jan 24 '24 12:01 pal-anish

StandardField.Crossref has a Field property called SINGLE_ENTRY_LINK, in FieldEditors the getSuggestionProvider is called and the value (the thing which handles the autocomplete) is then passed down to the field type editor If you follow the trail where the suggestion Provider originally comes from FieldsEditor > FieldsEditorTab > Entry Editor -> LIbraryTab -> setupAutocomplete

Inside SuggestionProvider class there is this isEmpty check. Here you would need to add a check for the SingleLink or MultipleLink property or CrossRef field I would suggest just checking the field type to allow all possible link fields to work.

Autocompletion is controlled by AutocompletePreferences

Siedlerchr avatar Jan 24 '24 19:01 Siedlerchr

@Siedlerchr Can you please review my changes? I have created a PR to resolve this issue.

pal-anish avatar Jan 29 '24 10:01 pal-anish