Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.
This repository was 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

Description

@Pasarus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions