GSA / Challenge_platform

The GSA Challenge.gov platform for managing challenges
Creative Commons Zero v1.0 Universal
4 stars 0 forks source link

Create EvaluationForm model #129

Open stepchud opened 1 month ago

stepchud commented 1 month ago

Description

This model will store the forms that challenge managers create, edit and publish for evaluation of their challenges.

Attributes

attribute type options
challenge_id :id belongs_to :challenge
title string null: false
instructions string null: false
challenge_phase small_int null: false
status enum(:draft, :ready, :published) default :draft
comments_required bool default: false
weighted_scoring bool default: false
publication_date date null: true
closing_date date null: true

add_index(:evaluation_forms, [:challenge_id, :challenge_phase], unique: true)

Validations

title, instruction, challenge_id, challenge_phase are required. The <challenge_id, challenge_phase> pairing is unique.

Tests

Add a factory helper for conveniently creating models in specs. Add specs for creating, updating, destroying, validating.

Out of Scope

The EvaluationForm class has_many :evaluation_form_criteria, however that will be added in another task.

r-bartlett-gsa commented 1 week ago

@stonefilipczak / @stepchud In order to align evaluation period to the challenge end date, and make the dates less confusing the challenge manager, we eliminated publication date for the evaluation forms. This makes the form editable up until the challenge ends, and not needing to set the evaluation form status. So two of the attributes (status and publication_date) detailed in this card are not needed.

stepchud commented 4 days ago

@r-bartlett-gsa there is no "Publish" button anymore?

r-bartlett-gsa commented 4 days ago

@r-bartlett-gsa there is no "Publish" button anymore?

@stepchud That's correct.