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

Exception when pasting an entry with a publication date-range of the form 1910/1917 #7864

Closed
1 task done
wujastyk opened this issue Jul 1, 2021 · 7 comments · Fixed by #8247
Closed
1 task done

Comments

@wujastyk
Copy link

wujastyk commented Jul 1, 2021

JabRef version:

JabRef 5.3--2021-06-28--9fe7617
Linux 5.4.0-77-generic amd64
Java 16.0.1
JavaFX 16+8

Steps to reproduce the behavior:

  1. Created the following entry in one database:
@Book{bhat-1917,
  date      = {1910/1917},
  editor    = {Candrakānta Bhaṭṭācārya},
  location  = {Kalikātā},
  publisher = {Satya Press},
  title     = {\dev{suśrutasaṃhitā prathamakhaṇḍam sūtrasthānātmakam\ldots hārāṇacandracakravartikavirāja-viracita-suśrutārthasandīpanabhāṣya-sametam\ldots candrakānta bhaṭṭācāryya-pramukhaiḥ saṃśodhitam} = [The Suśrutasaṃhitā with the Commentary Suśrutārthasandīpanabhāṣya by Hārāṇacandra Cakravarti]},
  note      = {Edition "t" in \cite[IB, 312]{meul-hist}},
  volumes   = {3},
}

  1. Copied it (right click, copy)
  2. Moved to the other database window
  3. Right click, paste ... Exception!

image

Log File
java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 1910
  at java.base/java.time.temporal.TemporalAccessor.get(Unknown Source)
  at org.jabref@5.3.420/org.jabref.model.entry.Date.get(Unknown Source)
  at org.jabref@5.3.420/org.jabref.model.entry.Date.getMonth(Unknown Source)
  at org.jabref@5.3.420/org.jabref.model.entry.BibEntry.genericGetFieldOrAlias(Unknown Source)
  at org.jabref@5.3.420/org.jabref.model.entry.BibEntry.getFieldOrAlias(Unknown Source)
  at org.jabref@5.3.420/org.jabref.logic.cleanup.ConvertToBiblatexCleanup.lambda$cleanup$2(Unknown Source)
  at java.base/java.util.Optional.ifPresent(Unknown Source)
  at org.jabref@5.3.420/org.jabref.logic.cleanup.ConvertToBiblatexCleanup.cleanup(Unknown Source)
  at org.jabref@5.3.420/org.jabref.logic.importer.ImportCleanup.doPostCleanup(Unknown Source)
  at java.base/java.lang.Iterable.forEach(Unknown Source)
  at org.jabref@5.3.420/org.jabref.logic.importer.ImportCleanup.doPostCleanup(Unknown Source)
  at org.jabref@5.3.420/org.jabref.gui.maintable.MainTable.paste(Unknown Source)
  at org.jabref@5.3.420/org.jabref.gui.LibraryTab.paste(Unknown Source)
  at org.jabref@5.3.420/org.jabref.gui.edit.EditAction.lambda$execute$0(Unknown Source)
  at java.base/java.util.Optional.ifPresent(Unknown Source)
  at org.jabref@5.3.420/org.jabref.gui.edit.EditAction.execute(Unknown Source)
  at org.jabref@5.3.420/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
  at org.jabref.merged.module@5.3.420/org.controlsfx.control.action.Action.handle(Unknown Source)
  at org.jabref.merged.module@5.3.420/org.controlsfx.control.action.Action.handle(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/javafx.event.Event.fireEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/javafx.scene.control.MenuItem.fire(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/javafx.event.Event.fireEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/javafx.scene.Scene$MouseHandler.process(Unknown Source)
  at org.jabref.merged.module@5.3.420/javafx.scene.Scene.processMouseEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
  at java.base/java.security.AccessController.doPrivileged(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.glass.ui.View.notifyMouse(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
  at org.jabref.merged.module@5.3.420/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source)
  at java.base/java.lang.Thread.run(Unknown Source)

@k3KAW8Pnf7mkmdSMPHz27

This comment has been minimized.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

Oops, I misread.

@wujastyk
Copy link
Author

wujastyk commented Jul 2, 2021

It's Biblatex syntax for a range of dates or the two dates of a two-volume MVbook.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

@wujastyk, yup, I just saw :P
The biblatex package 2.3.7 (page 38) has some more information, and

List<String> formatStrings = Arrays.asList(
"uuuu-M-d", // covers 2009-1-15
"uuuu-M", // covers 2009-11
"d-M-uuuu", // covers 15-1-2012
"M-uuuu", // covers 1-2012
"M/uuuu", // covers 9/2015 and 09/2015
"M/uu", // covers 9/15
"MMMM d, uuuu", // covers September 1, 2015
"MMMM, uuuu", // covers September, 2015
"d.M.uuuu", // covers 15.1.2015
"uuuu.M.d", // covers 2015.1.15
"uuuu", // covers 2015
"MMM, uuuu"); // covers Jan, 2020

is likely part of the issue

@Siedlerchr
Copy link
Member

Refs #2753

@jiezheng5
Copy link
Contributor

Hi,

I am a CS student and I would like to work on this issue.

  1. Can I work on this issue or do I have to work on the referenced issue Support all BibLaTeX date formats for parsing #2753 mentioned above?
  2. Can I have some suggestions on where to start? Any input is greatly appreciated.

thanks very much

@ThiloteE
Copy link
Member

ThiloteE commented Jun 17, 2022

Might be related to #8902

Edit: Ups, I did not see this issue was already solved! Nice! :)

#8902 rather seems to be a follow up issue, which would extend the parsing and conversion of date ranges to field formatters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants