Another idea that has come up while thinking about quantities with various people. The label is another common point of complexity/confusion and wondering if it could be improved by using a taxonomy instead. From our docs: “A Quantity may have a label assigned to it. This helps to distinguish multiple Quantities of the same measure within a Log.”: Quantities | farmOS
There are a few general reasons a taxonomy could be an improvement for the quantity label:
- One step towards consistent quantity labels, eg: prevent “gallons” vs “gallon” by referencing a common term
- Ability to see a list of all unique quantity labels (currently this is very hard to curate in the UI on a farmOS instance with 1000s of quantities)
- One step towards “machine readable” label, maybe a solution to what @Symbioquine described here: The fields in a quantity entity - #2 by Symbioquine (A term is not necessarily required for this, but may be an easy solution to provide some type of custom “ID” field for quantity labels if the term ID is not sufficient by itself)
- Potential ability for a quantity label term to define the default
unitsassociated with it. This could be single or multi-value if a given label is used in different contexts.
Another observation I had relates to the new quantity
test quantity types and how the
label it is (or isn’t) used to distinguish multiple quantities on a log. These types allow quantities to be distinguished by a
test_method taxonomy term reference in addition to the optional
- In practice I see that most
materialquantities do not use the label.
testquantity convention specifies they “MUST include a “Label” to represent the soil indicator that is being measured.” - however I wonder if this soil indicator could actually be specified by the
test_methodterm instead, and not require the element be a label? If this were the case…
- Could quantities be refactored to not need separate
testquantity types, and instead let the single quantity
labelfield reference a single term from any of these taxonomies: quantity label (better naming?), material type, or test method?