From 68cb44ccd47e66143bfe8372ee6799be5b6d9c59 Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Tue, 23 Mar 2010 15:40:02 +0100 Subject: [PATCH] Simplify the calculation of the project end --- lisp/org-taskjuggler.el | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index e1ed12b1e..4884e4271 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -367,17 +367,11 @@ specified it is calculated (headline (cdr (assoc "headline" project))) (version (cdr (assoc "version" project))) (start (cdr (assoc "start" project))) - (end (cdr (assoc "end" project))) - (now (current-time)) - (duration - (days-to-time org-export-taskjuggler-default-project-duration)) - (time-string - (format-time-string "%Y-%m-%d" (time-add now duration)))) + (end (cdr (assoc "end" project)))) (insert - (concat - "project " unique-id - " \"" headline "\" \"" version "\" " start " - " - (or end time-string)" {\n }\n")))) + (format "project %s \"%s\" \"%s\" %s +%sd {\n }\n" + unique-id headline version start + org-export-taskjuggler-default-project-duration)))) (defun org-taskjuggler-get-attributes (item attributes) "Return all attribute as a single formated string. ITEM is an alist