Custom Items and Custom Fields: Good Idea for a Plugin or Code Contribution?

Lately I have been wanting the ability to create both custom item types and custom item fields, but I've found no way to do this in Zotero. I am a software engineer with some time on my hands, so I wanted to see if these features would be useful to the community. If so, I am up for how I might contribute code or a plugin that adds this functionality.

If these features are already available somewhere and I've just missed them, any help with getting them going would be appreciated.
  • Custom items are not possible at the moment, the discussion about this feature took place a long time ago in the forums, you can search for it.

    Custom fields need to be written into extra and stored as one key-value pair per line. You can then extract the value of the custom field by getting the value of extra and doing text processing, or you can use the community-maintained toolkit to extract the data (https://github.com/windingwind/zotero-plugin-toolkit/blob/master/docs/zotero-plugin-toolkit.extrafieldtool.md).

    The value of the custom field can be displayed in the literature list (item tree): https://www.zotero.org/support/dev/zotero_7_for_developers#custom_item_tree_columns
  • I appreciate the reply. I wasn't aware of what you could do with the extra field, so I'll look into that.

    Largely though the purpose of my post was to try and see if others thought that custom items and and custom fields (without having to use key-value pairs in extra) would be a welcome and desired feature. If so, I'd be interested in trying to contribute either to Zotero source code or with a plugin since Zotero is open source.
  • I'm saying this at someone who isn't part of the core dev team, but it's pretty clear that this is not a good area to get involved in terms of the Zotero source code: the challenges in adding custom item types and fields are much more conceptual than technical and require significant discussion and design decisions that realistically an outside developer isn't going to be in a good position to make.

    You can try to work this into a plugin and I'm sure there'd be interest (people ask about custom item types and fields a fair amount, so there is demand), but even for basic things like syncing and citations anything that doesn't run through standard Zotero data (such as the Extra field) is going to open a whole can of worms.
  • Makes sense that getting involved with Zotero source code would probably be out of scope for an outside developer, so a plugin sounds like the best potential route. I'll experiment with that a bit and see if things look feasible.
  • Even a plugin would run into difficulties here - you can extend the UI, but if you're going to store the data behind those fields in anything but the extra field, it's going to either not sync, or it's likely going to mess with syncing; I've tried to add custom syncable data in the past and I wedged my then account pretty thoroughly.
Sign In or Register to comment.