Closed karlcz closed 7 years ago
@karlcz The change is live on synapse-dev now; could you review it when you have a chance? This record has a null timestamp column.
You can test it by attempting to enter a date and time, toggling the AM/PM button, and then submitting.
For a timestamp column that isn't required (nullok
is true), if a user enters either a date or time (but not both), should the user see an error or warning? Right now the app just submits an incomplete timestamp as null
, which might be confusing to users who didn't know/forgot to fully fill in a timestamp.
I would think that the form-validation logic would flag an incomplete field as an error and give an error message, similar to how we would flag any other errors such as missing required fields or invalid numbers.
In addition to the need for validation and error signalling, I see one problem with this version.
Clicking into the date or time field changes it from gray (disabled) text to black (enabled) text even though the control is still acting like it is unset. I.e. I got it to a state showing:
2017-12-31 12:00:00
but it silently treated that as incomplete/null because the 12:00:00
was not digits I typed but the result of entering and leaving the time field.
Timestamp input validation and gray vs. black text issues have been resolved in PR #934, closing this issue now.
Start with a record that has a null timestamptz column, e.g.
https://synapse-staging.isrd.isi.edu/chaise/recordedit/#1/Zebrafish:Behavior/ID=BhvZfDsy20160616A1@sort(ID::desc::)
If I try to edit the null
Room Date
column, theAM
button does not work when trying to enter a new date, and submission fails too.If I click the
Now
button first to reinitialize the field, I can then edit the value and submit succeeds.This is repeatable on Firefox and Chrome