Skip to content

Validate that workspace ttl < template max_ttl in the WorkspaceScheduleForm #3216

Closed as not planned

Description

@johnstcn

Problem

(ref: #2960)

Root cause: the workspace template has a max_ttl of 12h set.
We do not allow setting the workspace TTL higher than the template TTL.
The problem is, the error message from the backend is not being surfaced properly in the UI.
The workspace schedule form should have a validation on the template max_ttl value.

We do not validate the max_ttl value in the WorkspaceScheduleForm.

Solution

Validate in WorkspaceScheduleForm that the TTL (hours) is strictly less than the template max_ttl.

Definition of Done

Given: a template with max_ttl of 12h0m, and a workspace from this template exists
When: a user attempts to update the TTL to a value greater than template max_ttl
Then: the TTL field should go red with a validation error and show the maximum value

When: a user attempts to update the TTL to a value less than template max_ttl
Then: the TTL field should validate successfully.

Activity

  1. changed the title [-]bug: WorkspaceScheduleForm: validate that workspace ttl < template max_ttl[/-] [+]Validate that workspace ttl < template max_ttl in the WorkspaceScheduleForm[/+] on Aug 24, 2022
  2. changed the title [-]Validate that workspace ttl < template max_ttl in the WorkspaceScheduleForm[/-] [+]Validate that `workspace ttl` < `template max_ttl` in the WorkspaceScheduleForm[/+] on Aug 24, 2022
  3. github-actions commented on Oct 26, 2022

    @github-actions
    Contributor

    This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    siteArea: frontend dashboardstaleThis issue is like stale bread.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions