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

Type option for Bachelor's thesis #10029

Closed
claell opened this issue Jun 23, 2023 · 22 comments · Fixed by #10497
Closed

Type option for Bachelor's thesis #10029

claell opened this issue Jun 23, 2023 · 22 comments · Fixed by #10497

Comments

@claell
Copy link
Contributor

claell commented Jun 23, 2023

Is your suggestion for improvement related to a problem? Please describe.
A thesis can have different types, but right now, there is none for Bachelor's thesis.

Describe the solution you'd like
I want such a field, but not sure whether this also requires support for that in biblatex.

Do you know the best way to achieve this (or a good way, how to treat BA theses)?

@ThiloteE
Copy link
Member

You could create your own custom entry type, but obviously biblatex based citationstyles will not adapt their style based on your custom type. For this reason, your best choice would have been to contact the biblatex project. You can find it here: https://github.com/plk/biblatex, but this is not necessary, as a quick search let me find following bachelor thesis related issue: plk/biblatex#660

Looks like bathesis is a thing:

The following keys are typically used in the \bibfield{type} field of \bibtype{thesis}, \bibtype{report}, \bibtype{misc}, and other entries:

\begin{keymarglist}
\item[bathesis] An expression equivalent to the term <Bachelor's thesis>.
\item[mathesis] An expression equivalent to the term <Master's thesis>.
\item[phdthesis] The term , , , etc.
\item[candthesis] An expression equivalent to the term . Used for degrees that have no clear equivalent to the Master's or doctoral level.

But I am not sure what the \bibfield[type} field is about.

@claell
Copy link
Contributor Author

claell commented Jun 23, 2023

Thanks for looking it up 🙂

So it seems the ball is now back in JabRef's field, as this type needs to be added to the dropdown field.

@ThiloteE
Copy link
Member

ThiloteE commented Jun 23, 2023

  1. I looked it up and the type field already exists.
    image

  2. What could be better is for users to find out about these fixed acronyms
    image

    • there could be some examples.
    • add Bachelor's Thesis to the clickable dropdown list
  3. If you feel like pushing it, you also could request BachelorThesis to become a full type, just like MastersThesis or PhdThesis, but for this the ball is back in biblatex's garden.

@claell
Copy link
Contributor Author

claell commented Jun 23, 2023

Maybe, I was not clear enough, or also misunderstood the concept in JabRef a bit.

I am aware that the field already exists in JabRef. I was talking about the dropdown for it. There, no option for Bachelor's thesis is shown:

grafik

So my suggestion is to add this to the dropdown.

@claell
Copy link
Contributor Author

claell commented Jun 23, 2023

(I am not sure, where the data for the dropdown is currently coming from. Some options don't seem to make sense in that current scope (like Technical report or Audio CD. So maybe these dropdown suggestions are currently not dependent on the Entrytype.)

@cmgoodall
Copy link
Contributor

Hi, I am hoping this issue is still needing to be resolved. I would like to be assigned to the issue and work on it. Is someone able to please assign me the isuse?

My proposed solution is to create another Entry Type to accomodate the choice of Bachelors Thesis. I have had a look at the code and believe this will be a manageable issue for me. Please let me know if you would prefer a different implementation.

@ThiloteE
Copy link
Member

ThiloteE commented Oct 9, 2023

Thank you for your interest @cmgoodall

Please only add a "Type".
I know this is confusing, but a "type" is not the same as an "entry type".
Both, "types" and "entry types" should be compatible with either the Bibtex or the Biblatex standard, so if we introduce a new entry type, we should contact them. That said, BibTeX is dead and only the biblatex project is actively being worked on. We are lucky that the bathesis "type" already exists, so we do not need to contact them for it.

@ThiloteE ThiloteE added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Oct 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.

Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.

@cmgoodall
Copy link
Contributor

Hi @Siedlerchr, are you able to ellaborate by what you mean here? From my understanding, the issue was surrounding not having the appropriate Type to choose (Bachelor Thesis). If this is a documentation issue, that is fine, I'm just wanting to better understand what is required so I can have a positive impact on the repo.

@Siedlerchr
Copy link
Member

Sorry ignore my comment, I confused the types here.

@cmgoodall
Copy link
Contributor

Hi @ThiloteE, I've been looking through the code base to get a better understanding of where to add this 'Type'.

From what I can see, the file the 'Types' are held are in TypeEditorView.java. Are you able to confirm whether this is the correct place I need to edit? If it isn't I would very much appreicate some guidance.

@ThiloteE
Copy link
Member

I am not good at coding (there are others here that can do that way better than me), but to me it looks like you could have found it. I would suggest to try to modify it on your fork of JabRef and try to run this new version and check if your new modified type will show in the UI ;-)

@cmgoodall
Copy link
Contributor

cmgoodall commented Oct 14, 2023

I've implemented the new Type however, I'm now running into an issue when running the actual program. At first when JabRef[run] was executed, the app would open and I could see the changes I had made. However, now I get the following errors:

``
Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBibtexTypes/'

Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBiblatexTypes/'
``

From here, run continues to execute however, even after 10 minutes, the program doesn't open. I've tried rebuilding the project as well as undoing any of the changes I made however, this doesn't seem to have worked.

Does anyone know how to fix this?

@claell
Copy link
Contributor Author

claell commented Oct 14, 2023

@cmgoodall thanks for working on this issue!

Regarding your error: If you search for one of the node names, there is a result: https://github.com/search?q=repo%3AJabRef%2Fjabref%20customizedBiblatexTypes&type=code

Possibly that helps you to further investigate. Similarly, you can probably also search for other parts of the exception, like "Resetting customized entry types failed" etc. to find the place in code where the Exceptions happen.

@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 14, 2023

There's a command line argument for resetting your preferences. https://docs.jabref.org/advanced/commandline#reset-preferences--d-key

I gues there is something with serilaizing/deserilaizing the entry types as it now contains the value bathesis.

@cmgoodall
Copy link
Contributor

cmgoodall commented Oct 14, 2023

@claell @Siedlerchr

Thanks for helping me out with this one.

The weird bit is that I've commented out all of my code that I've implemented and I'm still getting the same errors. I believe when I was able to first run the program from IntelliJ, I was able to to see 'Bachelor's Thesis' as an option. In the process I also changed my preferred library mode to 'biblatx'. I believe this is where the issue lies for some reason.

Siedlerchr, I looked at the link you provided but cannot understand how to execute the commands. I am currently just trying to run the application through IntelliJ by executing JabRef[run] which is a gradle runner. If you know where I am going wrong with this step, please let me know!

The issue also happens on my main branch with no adjustments to the code whatsoever

@cmgoodall
Copy link
Contributor

cmgoodall commented Oct 14, 2023

I've just recloned the whole repo as well and it's still happening. Anyone got any ideas?

This is the output of run

> Task :run
Messages are not initialized before accessing key: Display help on command line options
LOGGER ERROR: Service implementation 'org.jabref.gui.logging.ApplicationInsightsWriter' not found
2023-10-15 10:33:50 [main] org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes()
INFO: Migrating old custom entry types.
2023-10-15 10:33:51 [main] org.jabref.preferences.JabRefPreferences.clearBibEntryTypes()
ERROR: Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBibtexTypes/'
	at java.prefs/java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:233)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.clearBibEntryTypes(JabRefPreferences.java:1232)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.clearAllBibEntryTypes(JabRefPreferences.java:1224)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeCustomEntryTypesRepository(JabRefPreferences.java:1240)
	at org.jabref@100.0.0/org.jabref.migrations.CustomEntryTypePreferenceMigration.upgradeStoredBibEntryTypes(CustomEntryTypePreferenceMigration.java:40)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes(PreferencesMigrations.java:180)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.runMigrations(PreferencesMigrations.java:55)
Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBibtexTypes/'

	at org.jabref@100.0.0/org.jabref.cli.Launcher.main(Launcher.java:77)
2023-10-15 10:33:51 [main] org.jabref.preferences.JabRefPreferences.clearBibEntryTypes()
ERROR: Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBiblatexTypes/'
	at java.prefs/java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:233)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.clearBibEntryTypes(JabRefPreferences.java:1232)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.clearAllBibEntryTypes(JabRefPreferences.java:1224)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeCustomEntryTypesRepository(JabRefPreferences.java:1240)
	at org.jabref@100.0.0/org.jabref.migrations.CustomEntryTypePreferenceMigration.upgradeStoredBibEntryTypes(CustomEntryTypePreferenceMigration.java:40)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes(PreferencesMigrations.java:180)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.runMigrations(PreferencesMigrations.java:55)
	at org.jabref@100.0.0/org.jabref.cli.Launcher.main(Launcher.java:77)
2023-10-15 10:33:51 [main] org.jabref.preferences.JabRefPreferences.clearBibEntryTypes()
ERROR: Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBibtexTypes/'
	at java.prefs/java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:233)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.clearBibEntryTypes(JabRefPreferences.java:1232)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeBibEntryTypes(JabRefPreferences.java:1250)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeCustomEntryTypesRepository(JabRefPreferences.java:1241)
	at org.jabref@100.0.0/org.jabref.migrations.CustomEntryTypePreferenceMigration.upgradeStoredBibEntryTypes(CustomEntryTypePreferenceMigration.java:40)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes(PreferencesMigrations.java:180)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.runMigrations(PreferencesMigrations.java:55)
	at org.jabref@100.0.0/org.jabref.cli.Launcher.main(Launcher.java:77)
2023-10-15 10:33:51 [main] org.jabref.preferences.JabRefPreferences.storeBibEntryTypes()
INFO: Updating stored custom entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBibtexTypes/'
	at java.prefs/java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:233)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeBibEntryTypes(JabRefPreferences.java:1255)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeCustomEntryTypesRepository(JabRefPreferences.java:1241)
	at org.jabref@100.0.0/org.jabref.migrations.CustomEntryTypePreferenceMigration.upgradeStoredBibEntryTypes(CustomEntryTypePreferenceMigration.java:40)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes(PreferencesMigrations.java:180)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.runMigrations(PreferencesMigrations.java:55)
	at org.jabref@100.0.0/org.jabref.cli.Launcher.main(Launcher.java:77)
2023-10-15 10:33:51 [main] org.jabref.preferences.JabRefPreferences.clearBibEntryTypes()
ERROR: Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBiblatexTypes/'
	at java.prefs/java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:233)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.clearBibEntryTypes(JabRefPreferences.java:1232)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeBibEntryTypes(JabRefPreferences.java:1250)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeCustomEntryTypesRepository(JabRefPreferences.java:1242)
	at org.jabref@100.0.0/org.jabref.migrations.CustomEntryTypePreferenceMigration.upgradeStoredBibEntryTypes(CustomEntryTypePreferenceMigration.java:40)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes(PreferencesMigrations.java:180)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.runMigrations(PreferencesMigrations.java:55)
	at org.jabref@100.0.0/org.jabref.cli.Launcher.main(Launcher.java:77)
2023-10-15 10:33:51 [main] org.jabref.preferences.JabRefPreferences.storeBibEntryTypes()
INFO: Updating stored custom entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBiblatexTypes/'
	at java.prefs/java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:233)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeBibEntryTypes(JabRefPreferences.java:1255)
	at org.jabref@100.0.0/org.jabref.preferences.JabRefPreferences.storeCustomEntryTypesRepository(JabRefPreferences.java:1242)
	at org.jabref@100.0.0/org.jabref.migrations.CustomEntryTypePreferenceMigration.upgradeStoredBibEntryTypes(CustomEntryTypePreferenceMigration.java:40)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes(PreferencesMigrations.java:180)
	at org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.runMigrations(PreferencesMigrations.java:55)
	at org.jabref@100.0.0/org.jabref.cli.Launcher.main(Launcher.java:77)
2023-10-15 10:33:52.127 java[73324:2200378] XType: Using static font registry.
Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBiblatexTypes/'

Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBibtexTypes/'

Resetting customized entry types failed.: java.util.prefs.BackingStoreException: Synchronization failed for node '/org/jabref/customizedBiblatexTypes/'

2023-10-15 10:33:57 [Thread-7] sun.util.logging.internal.LoggingProviderImpl$JULWrapper.log()
WARN: Timeout while waiting for app reactivation
RenderJob.run: internal exception
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4165)
	at java.base/java.util.Collections$UnmodifiableList.get(Collections.java:1347)
	at javafx.graphics@20.0.2/com.sun.glass.ui.Screen.getMainScreen(Screen.java:59)
	at javafx.graphics@20.0.2/com.sun.prism.es2.ES2Pipeline.getScreenForAdapter(ES2Pipeline.java:150)
	at javafx.graphics@20.0.2/com.sun.prism.es2.ES2Pipeline.findDefaultResourceFactory(ES2Pipeline.java:161)
	at javafx.graphics@20.0.2/com.sun.prism.es2.ES2Pipeline.getDefaultResourceFactory(ES2Pipeline.java:182)
	at javafx.graphics@20.0.2/com.sun.prism.GraphicsPipeline.getDefaultResourceFactory(GraphicsPipeline.java:151)
	at javafx.graphics@20.0.2/com.sun.javafx.tk.quantum.QuantumRenderer.lambda$createResourceFactory$2(QuantumRenderer.java:163)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
	at javafx.graphics@20.0.2/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at javafx.graphics@20.0.2/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
	at java.base/java.lang.Thread.run(Thread.java:1623)

@Siedlerchr
Copy link
Member

You need to modify the run configuration and under program arguments you add that -d all

The things are stored in the preferences, you would have to reset or delete them.
On mac They are stored in (~/Library/Preferences/). Look for jabref

@cmgoodall
Copy link
Contributor

Thanks for that @Siedlerchr! Fixed my issue. No idea what was going on, cannot replicate the issue at all which is quite strange. Anyway, just submitted a merge reqest for this issue.

@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 15, 2023

The erro could be mac related, but please also check the preferences migration

org.jabref@100.0.0/org.jabref.migrations.PreferencesMigrations.upgradeStoredBibEntryTypes(PreferencesMigrations.java:180)

@cmgoodall
Copy link
Contributor

Is it possible for my merge request to be reviewed?

@claell
Copy link
Contributor Author

claell commented Oct 24, 2023

Thanks for fixing my issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants