GoogleChrome / chromium-dashboard

Chrome Status Dashboard
https://www.chromestatus.com
Apache License 2.0
633 stars 363 forks source link

Users cannot resubmit OT creation form after submission #4121

Closed DanielRyanSmith closed 1 month ago

DanielRyanSmith commented 1 month ago

Addresses #4100

This change disables the button to navigate to the OT creation form when the form has already been submitted, and navigating directly to the creation form after submission will result in a redirect. This is to avoid users from changing data and the submissions status of the trial while creation is in progress, and will be required for automated OT creation process.

DanielRyanSmith commented 1 month ago
Screenshot 2024-07-17 at 11 25 53 AM

This change will disable the button that navigates to the OT creation request form if the user has already submitted the form once. When the user submits the form, the ot_setup_status for the stage is set to OT_READY_FOR_CREATION, which will flag the trial creation as ready to be processed. When the automated creation process is active, ot_setup_status will be set to OT_CREATED, OT_ACTIVATED, or OT_CREATION_FAILED, etc. during the creation process.

With this change, we check ot_setup_status and make sure the trial is not in already in the process of being created, or flagged for creation. If it is, the user has already submitted the OT creation form, and so we disable navigation to the form.