Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Configure new runs add validation for run numbers and experiment references #202

Open
Pasarus opened this issue Aug 18, 2022 · 0 comments
Open

Comments

@Pasarus
Copy link
Member

Pasarus commented Aug 18, 2022

Expected behaviour

Trying to submit an invalid run number (i.e. a range 123-130) should show a front-end warning. It seems the input field blocks some characters from being entered, but - is still allowed (perhaps for negative numbers). The minimum run number value (the run number of the ReductionRun.objects.last().run_number) is also not respected when typing, only when clicking the up/down arrows on the right side of the field. This validation should be done in JavaScript.

If it is submitted anyway, the configure_new_runs_post should show the error message in a nicer way - as a message on the configure_new_runs.html, with the fields filled with the user’s submission values. This validation should be done in the Python view.

Actual behaviour

There’s no form validation, and a crude “Invalid” message is shown.

Suggested verification/testing steps

e.g.

  1. Run webapp

  2. Go to instrument page and click Configure New Runs

  3. Enter 123-345 in run number field and click submit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant