AAFC-BICoE / dina-planning

AAFC-DINA planning repository
3 stars 2 forks source link

Error when entering Determining Date as only a year #290

Open michellelocke opened 2 years ago

michellelocke commented 2 years ago

When entering the Determining Date only as a year (ex: 1980), I get an error.

I typed 1980 in the Determining Date field. When I hit Enter, I get the following error:

Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7BdeterminedOn%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

This kicks me out of the record and I lose the unsaved Material Sample I had been working on.

My Verbatim (Determination) Date is 1980, therefore I should be able to have the Determining Date as a partial date of 1980 as well. We almost always have only a year for determination dates. Therefore requiring a full date won't work.

cgendreau commented 2 years ago

Can't we only use verbatim for legacy records and the structured date for new records ?

michellelocke commented 2 years ago

This is not how I interpreted this field as working. I presumed that Verbatim is verbatim, exactly as on the label and that the Determination is an interpreted version of the verbatim data. If we have new data, then we may not use the verbatim side and only use the Determination side, as there is no verbatim to use.

If in DINA, I want to search for all specimens determined by C.D. Dondale in 1983 how would I do that? Do I have to make the choice to search either the Verbatim Determiner/Verbatim Date or the Determining Agents/Determining Date?

What we want for all fields is to have one field where all the data goes, and a second verbatim field where can can add data if it is being interpreted by the transcriber.

If I have a legacy determination by M.M. Locke, Sept. 24, 2019, I should not have to enter that only in verbatim because it is legacy data. I would probably choose to only enter it in the Determination as there is nothing that needs interpretation. I know for certain that I made that determination on that date.

We should never have to separate legacy data from new data. Of course there are some cases where we can't make heads or tails of legacy data and will only use verbatim fields but most often we will want them interpreted too.

cgendreau commented 2 years ago

I presumed that Verbatim is verbatim, exactly as on the label and that the Determination is an interpreted version of the verbatim data

yes, that is correct

M.M. Locke, Sept. 24, 2019 would go in verbatim AND structured. But, if you add a new Determination today in digital only (that's the new record I was talking about), you should not add it to verbatim since there is nothing to transcribed.

So at the end the only thing I'm saying is that a year or a year-month could stay in verbatim. If you need to do queries like I want to search for all specimens determined by C.D. Dondale in 1983 sure then it might be easier but I have not seen that use case until now.

For the record to say that all fields need to be searchable is not precise enough. Here is a good example where you could easily search on 1983, in verbatim or on the complete date. Then if you need it on a timeline (with support for partial dates) so you can do between 1981 and 1984 that's completely different.

michellelocke commented 2 years ago

I'm with you at the beginning of this. However, determinations, as they typically work and will continue to work in the future usually only use a year. It is actually quite rare to have a full date.

Often, when someone is identifying specimens, they will work under a microscope and identify many specimens. Then they will put labels on these specimens (typically with their name and a year). The last step is to go and update the determination in the database. This work of entering the determination data in the database is typically saved up and done by students in the summer. This means, that still into the future we will not be able to use the interpreted date field because we will very rarely be entering a determination into the database on the date it was made (or have a full date on a label). This renders Determining Date a field that we cannot use.

If I wanted to search for material that C. Dondale identified in 1983 but his label was written as det. C.D.D. '83. How would I search for that? I would have to interpret both the identifier and the date. Verbatim is exactly as on the label. This is not the main data field but a secondary source to help clear up any misinterpretation.

Additionally, If I want to search for a record that was determined in 1983, it sounds like you are saying that I could search the entire dataset for 1983. Does this mean every field of every record in the database? I can see practical uses for searching the entire dataset once in awhile but generally, I don't want to do that. If I want a determination from 1983 but search 1983 in the entire database I will be overwhelmed with records collected in 1983 (of which there are currently 33,771 in our database). It is imperative that we ba able to actually search for the data we need within the field that we need to.

cgendreau commented 2 years ago

yes, that makes sense