Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed taskvariable create filter and select_all_field from mapper table #1977

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""Removed select_all_field from mapper table

Revision ID: fdfe787a197c
Revises: 78e2529b7c39
Create Date: 2024-03-27 09:48:57.957044

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'fdfe787a197c'
down_revision = '78e2529b7c39'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('form_process_mapper', 'selected_all_field')
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('form_process_mapper', sa.Column('selected_all_field', sa.BOOLEAN(), autoincrement=False, nullable=True))
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ class FormProcessMapper(AuditDateTimeMixin, AuditUserMixin, BaseModel, db.Model)
task_variable = db.Column(JSON, nullable=True)
version = db.Column(db.Integer, nullable=False, default=1)
description = db.Column(db.String, nullable=True)
selected_all_field = db.Column(
db.Boolean, nullable=True, default=False
) # if it is true, automatically select all fields as task variables from a form.

__table_args__ = (
UniqueConstraint("form_id", "version", "tenant", name="_form_version_uc"),
Expand All @@ -81,7 +78,6 @@ def create_from_dict(cls, mapper_info: dict) -> FormProcessMapper:
mapper.task_variable = mapper_info.get("task_variable")
mapper.version = mapper_info.get("version")
mapper.description = mapper_info.get("description")
mapper.selected_all_field = mapper_info.get("selected_all_field")
mapper.save()
return mapper
except Exception as err: # pylint: disable=broad-except
Expand Down Expand Up @@ -109,7 +105,6 @@ def update(self, mapper_info: dict):
"task_variable",
"process_tenant",
"description",
"selected_all_field",
],
mapper_info,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Meta: # pylint: disable=too-few-public-methods
process_tenant = fields.Str(data_key="processTenant")
deleted = fields.Boolean(data_key="deleted")
description = fields.Str(data_key="description")
selected_all_field = fields.Bool(data_key="selectedAllField")


class FormProcessMapperListReqSchema(Schema):
Expand Down
84 changes: 0 additions & 84 deletions forms-flow-web/src/components/Form/Steps/TaskvariableCreate.js

This file was deleted.

Loading