add request name
This commit is contained in:
parent
e34b1b55d0
commit
ec5c3e8ce8
@ -0,0 +1,28 @@
|
||||
"""add name to request revision
|
||||
|
||||
Revision ID: a496111da617
|
||||
Revises: 4f4defb7b440
|
||||
Create Date: 2018-09-18 16:45:59.297289
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a496111da617'
|
||||
down_revision = '4f4defb7b440'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('request_revisions', sa.Column('name', sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('request_revisions', 'name')
|
||||
# ### end Alembic commands ###
|
@ -147,6 +147,12 @@ class DetailsOfUseForm(ValidatedForm):
|
||||
format="%m/%d/%Y",
|
||||
)
|
||||
|
||||
name = StringField(
|
||||
"Name your Request",
|
||||
description="This name serves as a reference for your initial request and the associated workspace that will be created once this request is approved. You may edit this name later.",
|
||||
validators=[Required(), Length(min=4, max=100, message="Request names must be at least 4 and not more than 100 characters")]
|
||||
)
|
||||
|
||||
|
||||
class InformationAboutYouForm(ValidatedForm):
|
||||
fname_request = StringField("First Name", validators=[Required(), Alphabet()])
|
||||
|
@ -75,6 +75,7 @@ class Request(Base):
|
||||
"average_daily_traffic_gb",
|
||||
"rationalization_software_systems",
|
||||
"organization_providing_assistance",
|
||||
"name",
|
||||
]
|
||||
INFORMATION_ABOUT_YOU_FIELDS = [
|
||||
"citizenship",
|
||||
|
@ -51,6 +51,7 @@ class RequestRevision(Base, TimestampsMixin):
|
||||
average_daily_traffic_gb = Column(Integer)
|
||||
rationalization_software_systems = Column(String)
|
||||
organization_providing_assistance = Column(String)
|
||||
name = Column(String)
|
||||
|
||||
# information_about_you
|
||||
citizenship = Column(String)
|
||||
|
@ -83,6 +83,6 @@ export default {
|
||||
mask: false,
|
||||
match: /^.{4,50}$/,
|
||||
unmask: [],
|
||||
validationError: 'Workspace names must be at least 4 and not more than 50 characters'
|
||||
validationError: 'Workspace and request names must be at least 4 and not more than 50 characters'
|
||||
},
|
||||
}
|
||||
|
@ -78,6 +78,7 @@
|
||||
|
||||
{{ TextInput(f.dollar_value, validation='dollars', placeholder='$0', tooltip='You may specify a different Total Spend amount to cover other JEDI Cloud services that the JEDI Cloud cost calculator was not able to estimate. Examples may include support packages from the cloud service provider.') }}
|
||||
{{ DateInput(f.start_date, placeholder='MM / DD / YYYY', validation='date') }}
|
||||
{{ TextInput(f.name, placeholder='Request Name', validation='workspaceName') }}
|
||||
|
||||
</div>
|
||||
</details-of-use>
|
||||
|
@ -108,6 +108,7 @@ class RequestFactory(Base):
|
||||
def create_initial_revision(cls, request, dollar_value=1000000):
|
||||
user = request.creator
|
||||
default_data = dict(
|
||||
name=factory.Faker("domain_word"),
|
||||
am_poc=False,
|
||||
dodid_poc=user.dod_id,
|
||||
email_poc=user.email,
|
||||
|
@ -14,6 +14,7 @@ class TestDetailsOfUseForm:
|
||||
"number_user_sessions": "6",
|
||||
"average_daily_traffic": "0",
|
||||
"start_date": "12/12/2050",
|
||||
"name": "blue-beluga",
|
||||
}
|
||||
migration_data = {
|
||||
"jedi_migration": "yes",
|
||||
|
Loading…
x
Reference in New Issue
Block a user