open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 27 forks source link

Web editor assumes that ENUMs will be listed in reaction.proto in order #433

Closed connorcoley closed 4 years ago

connorcoley commented 4 years ago

After trying to expand the workup steps to include ALIQUOT, I noticed a validation error relating to missing information for a TEMPERATURE step. The web editor's selectors will list options in the order they appear in the proto, but does not pay attention to the actual field ID assigned in the proto definition.

i.e., the workup type list

UNSPECIFIED = 0;
CUSTOM = 1;
ADDITION = 2;
ALIQUOT = 18;
TEMPERATURE = 3;

will result in a selector showing UNSPECIFIED, CUSTOM, ADDITION, ALIQUOT, TEMPERATURE, but selecting ALIQUOT is treated as a value of 3 and resolved to TEMPERATURE in the back end.

This is likely already causing bugs because the volume enum is not in order.