-
Notifications
You must be signed in to change notification settings - Fork 132
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
[Feature Request] New Custom Field Type Enum #1029
Comments
Hi @seijikun thank you for your kind words and your input! Regarding your use cases, I could imagine other ways of organizing it. For the tax case: there is already a date field. so you could use one tag There have been some thoughts about something similar in #979 (somewhere in the comments) and #528. I think your proposal is similar to these - I think it goes in the same direction? I think something like this is a good idea. An enum is interesting idea, the user is then required to provide all possible values. But this also requires a bit more clicks when adding a new value/changing values - and as you said maybe even validation. It would be simpler if the field was just like the text field, but the ui would then give a list of existing values. But the user could always just enter a new one. This is more convenient but has no validation etc. But I think it would work well in most cases - wdyt? My current preferred way would be to have the fields more flexible in use, since there are already more strict variants (like correspondent, equipment etc). But I'm not sure yet :). |
@eikek Thanks for your response!
Mh, I think an Enumeration field type is quite different than the document relationships that were discussed in the two issues you linked.
Whereas the Enumeration (or Equipment, and Folders, for that matter) feel more like "bringing a large set of documents under one roof" by a common property:
I think the custom fields are an extremely powerful feature of docspell, because you are basically unlimited in their amount and flexibility in general. Like that, I could imagine a custom Enumeration field replacing/emulating the very specific Equipment, Direction(Incoming / Outgoing), or even the correspondence features/notations. And while there is only one equipment field per document, you can have an unlimited amount of custom fields - this leads to a lot of flexibility for custom grouping and notation. A Text field that suggests already used values is very close in its usability, to Enumerations. I'd already be quite happy with that - because my main concern was consistency (Having typos and stuff). However, I think that with the Custom Fields feature many great things could be implemented, and having an Enumeration type in the long run would be good. For me, custom fields are the most versatile feature in Docspell, because they do not impose any notation (like Equipment) or restrictions on their amount. And I still see a lot of potential left, to be gained (mostly with more supported field types). I hope that makes sense and not too much detail was lost on the translation barrier. |
Hi @seijikun thanks and no worries about your draftmanship :-) I think I understand now better, what you want to achieve. I already thought about to remove the equipment and replace it with something more generic or have custom fields of type "person" etc. There is also a request to allow multiple equipments/person to be associated. The thing is, while the ideas are nice, it is a lot of effort. So I'm not sure when or if I can consider this. I'm still thinking about some major refactoring, also wrt #585 - but only time will tell, if it is possible for me to undertake this adventure :) |
Absolutely no worries! Docspell is your project and already quite amazing the way it is! I've already decided to use it for my documents. As an idea: I think it could turn out to be most sustainable in the long run, if you had the built-in features like correspondences, organizations, equipment, from date, to date, due date, ...etc. based in the background on the same data structure you use for the custom fields. I don't understand too much about Scala (looks mostly like hiroglyphs to me to be honest 😅), but I could imagine this saving some code for the specific features. |
Yeah, this is a good idea and it is exactly where the effort is hidden currently :-). I think if I were to do docspell again, I would choose a more generic approach to "associating meta data". When I designed docspell, I wanted a simple system and choose to model correspondents/equipment etc directly in the database (because "that is enough, nothing more will ever be needed" ;)) Well, it went now a bit further than I thought it would …. Using the current way custom fields are implemented for everything else, would be too inefficient, I think. I think it requires a different data model, which means some effort. |
Hey! Thank you very much for docspell, it's an awesome piece of software!
I was thinking that it would be awesome if there was a Custom field Type
Enumeration
, which acts basically likeText
but only allows a limited set of values/variants.One use-case I am thinking about for this is tagging documents as: "relevant for tax ".
That way, I don't have to create a new Tag for each year (
Tax 2019
,Tax 2020
,Tax 2021
) which would clutter the Tag collection the long run, but could instead have aTax
enum metadata field, with the variants (2019
,2020
,2021
, ...).Another use-case I could think about is: When storing bank account statements ("Kontoauszug") in docspell. One could add a metadata field "Bank Account", with the account numbers as variants - since each statement relates to one specific bank account.
When changing the set of allowed variants, a validation would have to be run against the custom field's instances, to check that no in-use variant can be removed.
The text was updated successfully, but these errors were encountered: