Tasks creation (mostly)

This commit is contained in:
2026-03-21 14:48:27 +02:00
parent dbd849589b
commit fb9d884313
15 changed files with 81 additions and 37 deletions
+3 -2
View File
@@ -6,8 +6,9 @@ module Tasks
attribute :title, :string
attribute :description, :string
attribute :status_id, :integer
attribute :workflow_id, :integer
validates :project_id, :title, :status_id, presence: true
validates :project_id, :title, :status_id, :workflow_id, presence: true
delegate :model_name, to: Task
@@ -18,7 +19,7 @@ module Tasks
end
def perform
@task = project.tasks.build(title:, description:, status_id:, number: @project.next_task_number)
@task = project.tasks.build(title:, description:, status_id:, workflow_id:, number: @project.next_task_number)
save @task
end
end