Selaa lähdekoodia

Make sure the unique id resolving works

Christian Egli 15 vuotta sitten
vanhempi
commit
e0e433f1d7
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 5 3
      lisp/org-taskjuggler.el

+ 5 - 3
lisp/org-taskjuggler.el

@@ -202,19 +202,21 @@
 	path
 	task resolved-tasks tmp)
     (dolist (task tasks resolved-tasks)
-      (let ((level (cdr (assoc "level" task)))
-	    (unique-id (org-taskjuggler-get-unique-id task (car unique-ids))))
+      (let ((level (cdr (assoc "level" task))))
 	(cond
 	 ((< previous-level level) 
+	  (setq unique-id (org-taskjuggler-get-unique-id task (car unique-ids)))
 	  (dotimes (tmp (- level previous-level))
 	    (push (list unique-id) unique-ids)
 	    (push unique-id path)))
 	 ((= previous-level level) 
+	  (setq unique-id (org-taskjuggler-get-unique-id task (car unique-ids)))
 	  (push unique-id (car unique-ids)))
 	 ((> previous-level level) 
 	  (dotimes (tmp (- previous-level level))
 	    (pop unique-ids)
-	    (pop path))))
+	    (pop path))
+	  (setq unique-id (org-taskjuggler-get-unique-id task (car unique-ids)))))
 	(push (cons "unique-id" unique-id) task)
 	(push (cons "path" (mapconcat 'identity (reverse path) ".")) task)
 	(setq previous-level level)