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

Custom Special Fields #9203

Open
ghost opened this issue Oct 2, 2022 · 6 comments
Open

Custom Special Fields #9203

ghost opened this issue Oct 2, 2022 · 6 comments

Comments

@ghost
Copy link

ghost commented Oct 2, 2022

The special fields of JabRef are a very important feature in my opinion since they offer the ability to classify your literature. This is also possible by using the groups feature but special fields have the advantage to have custom icons and multiple "modes" like "read", "skimmed" and "to be read".

Is your suggestion for improvement related to a problem? Please describe.
I'm always a bit frustrated that the existing special fields don't have any option for customization. For example an option like "skimmed and needed parts read" would be nice or not only the "quality assured" option but rather something like "low quality", "medium quality", "high quality" and "quality unchecked".

Describe the solution you'd like
My suggestion is that

  • the existing special fields are extended, similar to what I suggested
  • or, as a more flexible approach, adding an option for custom special fields. I would limit this to the ability to have the option "not set" and for every mode a icon with a color, similar to how it is already done with the other special fields, except the stars.

Some Notes on the Code

I only had a rough look on the code for this, but as far as I can see so far, the three files

  • src/main/java/org/jabref/model/entry/field/SpecialField.java
  • src/main/java/org/jabref/model/entry/field/SpecialFieldValue.java
  • src/test/java/org/jabref/gui/util/comparator/SpecialFieldComparatorTest.java

would require more or less major changes, additionally a dialog window and the saving would have to be implemented (maybe the saving is already automated?!)


What do you think about this suggestion?

@Boolunt
Copy link

Boolunt commented Nov 1, 2022

Hey, is it alright if I could be assigned to this?

@ThiloteE
Copy link
Member

ThiloteE commented Nov 1, 2022

  1. It is possible to create custom fields already.

    JabRef is Bibtex/Biblatex native and if you go to the {} biblatex source tab in the entry editor, you can see the raw data of your entry:

    Just an example:

    grafik

    You can add any type of custom field by simply typing in your custom field manually, e.g. like this:

    @Article{fox,
    ThisIsACustomField = {just an example for field content},
    }
    
  2. How to show your custom fields in the entry editor or in the main table?

    2.1 How to let them show in the main table:
    Simply type in your custom field and add them in the preferences as shown in the screenshot below:
    grafik

    2.2 How to let them show in the entry editor:
    A) Do nothing and they simply will show in the "Other fields" tab:
    grafik

    B) Do something and go to Options > Customize entry types
    There you can add them to customized tailored entry types.
    grafik

  3. So what do we need for custom special fields?

    • A) Add feature that allows users to add colours and symbols to custom fields somewhere.
    • B) Add a few more hard coded custom special fields that developers of JabRef choose to be part of JabRef by default.

    I think option A is preferred, but I have no clue how to implement this.

@ThiloteE ThiloteE added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Nov 1, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

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.

@ThiloteE
Copy link
Member

ThiloteE commented Nov 1, 2022

@Boolunt I just realized you are pretty new to open source programming. If you cannot make it work and you feel this is more difficult than you initially thought, please have a look at our projects page with "good first issues". If you are a student, the "candidates for university projects" page offers some issues of varying difficulty and scope and that have been estimated to be compatible with university courses as well and often bring a larger feature to JabRef.

@ThiloteE
Copy link
Member

ThiloteE commented Nov 6, 2022

Refs #8739
Because we do not have a proper tags, keyords or labels implementation, we now have people asking to add more "special fields" to JabRef, but it will never be enough. Developers can choose to give people some fish everyday, or create a fishing rod that is customizable and upon setup fishes on its own...

@koppor
Copy link
Member

koppor commented Mar 17, 2023

Some notes on the design choices of "special fields" are noted down at https://github.com/JabRef/jabref/blob/main/docs/decisions/0019-implement-special-fields-as-separate-fields.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Normal priority
Development

No branches or pull requests

4 participants