feat: Add migration functionality to update template-based tasks and set custom_max_wait_days to NULL
This commit is contained in:
@@ -60,10 +60,10 @@ export function getProjectTasks(projectId) {
|
||||
// Create a new project task
|
||||
export function createProjectTask(data) {
|
||||
if (data.task_template_id) {
|
||||
// Creating from template
|
||||
// Creating from template - explicitly set custom_max_wait_days to NULL so COALESCE uses template value
|
||||
const stmt = db.prepare(`
|
||||
INSERT INTO project_tasks (project_id, task_template_id, status, priority)
|
||||
VALUES (?, ?, ?, ?)
|
||||
INSERT INTO project_tasks (project_id, task_template_id, custom_max_wait_days, status, priority)
|
||||
VALUES (?, ?, NULL, ?, ?)
|
||||
`);
|
||||
return stmt.run(
|
||||
data.project_id,
|
||||
|
||||
Reference in New Issue
Block a user