diff options
author | 2013-07-13 21:09:40 +0200 | |
---|---|---|
committer | 2013-07-13 21:14:37 +0200 | |
commit | 84ae7a5fd4524cc06def467efd62019d810781f4 (patch) | |
tree | a46c26d2b90445d0d46021d47992ba1f97c72672 /pg-datastore.lisp | |
parent | bdd07b68ca1f70b53bfcc8e54fc7ec489e4b52e8 (diff) | |
download | scrumli-84ae7a5fd4524cc06def467efd62019d810781f4.tar.gz scrumli-84ae7a5fd4524cc06def467efd62019d810781f4.zip |
Handle task interaction like story interaction
When moving or adding tasks, instead of waiting for the user to
reselect the task reload the task each time.
Diffstat (limited to 'pg-datastore.lisp')
-rw-r--r-- | pg-datastore.lisp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pg-datastore.lisp b/pg-datastore.lisp index 0952ab0..805e748 100644 --- a/pg-datastore.lisp +++ b/pg-datastore.lisp @@ -46,11 +46,13 @@ (defmethod datastore-get-story ((datastore pg-datastore) id) (with-connection (connection-spec datastore) (append (query (:select :* :from 'story :where (:= 'id id)) :alist) - `((tasks . ,(query (:order-by - (:select :* :from 'task - :where (:= 'story-id id)) - 'priority) - :alists)))))) + `((tasks . ,(datastore-get-tasks-for-story datastore id)))))) + +(defmethod datastore-get-tasks-for-story ((datastore pg-datastore) id) + (with-connection (connection-spec datastore) + (query (:order-by (:select :* :from 'task :where (:= 'story-id id)) + 'priority) + :alists))) (defmethod datastore-post-story ((datastore pg-datastore) role necessity title content reporter) |