From 54de1c880d08077d2e3a127d3e12ca0101903ee9 Mon Sep 17 00:00:00 2001
From: Philippe PITTOLI
Date: Sun, 8 Dec 2019 02:54:07 +0100
Subject: [PATCH] task modal: right column selected on creation
---
client/project.ls | 1 +
client/task-creation-modal.ls | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/client/project.ls b/client/project.ls
index e52be38..fa9ffef 100644
--- a/client/project.ls
+++ b/client/project.ls
@@ -19,6 +19,7 @@ inexistant-column = (task, columns) ->
orphan-tasks = (tasks, columns) ->
tasks.filter (task) -> (! has-column) || inexistant-column task, columns
+
Project = (self, todod-ws) ->
self.todod-ws = todod-ws
self.tasks = []
diff --git a/client/task-creation-modal.ls b/client/task-creation-modal.ls
index 55870c4..2ca6058 100644
--- a/client/task-creation-modal.ls
+++ b/client/task-creation-modal.ls
@@ -5,11 +5,12 @@ Modal = require './modal.ls'
TaskCreationModal = (project, todod-ws, task) ->
task ||= {}
+ # copy not to override anything on cancel
self = {
title: task.title || ""
description: task.description || ""
extra_properties: {
- column: task.list || ""
+ column: task.extra_properties.column || ""
}
}