Work completed should allow blank values

Issue #293 resolved
Randle Taylor created an issue

Work completed needs to be blank on page load otherwise it is set to the current time. This means that the user has to manually update the work_completed time before they submit. Allowing it to be blank lets the server automatically set it correctly if the user submits it blank.

Comments (9)

  1. Randle Taylor reporter
    • changed status to open

    @ryanbottema I think in order for consistency editing a test list should allow blank work completed values as well.

  2. Ryan Bottema

    Yeah I guess refreshing to the initial value was needlessly complicated. Just to clarify, if no work_completed is provided when submitting the edit form, the server resets to the initial value anyways. Is this the desired behaviour?

  3. Randle Taylor reporter

    When editing an existing test list, the work_completed field should initially be set to the existing value and that value should be retained if it is not changed. If the user blanks out the work_completed value and submits, it should be set to the current time. Does that make sense?

  4. Randle Taylor reporter

    Also, somewhat related, I just noticed that the changes in 64b211ad71570a90744f49 (I think that's it) no longer allow users without can_override_date permissions (e.g. therapists) to submit results because work_started is null. No error is shown either.

  5. Ryan Bottema

    Okay. The reason I ask is because of this line in master. Am I wrong in thinking 0.2.9 sets work_completed to its initial value if the user blanks the field? If not, is setting it to the current time a change you and the general user base would be okay with.

    I'll fix that second issue. Strange that no error is shown.

  6. Randle Taylor reporter

    No you're right actually. It does set it back to the initial value if it's blanked. Sorry for the confusion. I guess we should stick with that behaviour, although I think we could make an argument for setting it to the current date/time if it was blanked out.

  7. Log in to comment