emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Re: [taskjuggler] small edits to org-taskjuggler.el for tj3


From: Christian Egli
Subject: [O] Re: [taskjuggler] small edits to org-taskjuggler.el for tj3
Date: Tue, 05 Apr 2011 10:58:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Christian Egli <address@hidden> writes:

>> * in org-taskjuggler-open-project, the duration is never calculated
>> (default is always used).
>
> Good catch and thanks for your patch. Unfortunately the patch causes
> problems with my export. The duration is now correctly calculated,
> however the root task now also has an end attribute which causes
> problems down the road and TJ2 tells me that "End of task foo does not
> fit into the project time frame. Try using a later project end date".
> But no matter how much I put the end date into the future the issue
> remains. If I remove the end attribute from the root task it seems to
> work. 

The following patch seems to work. If you're OK with it I will commit.

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index f891634..20bd91f 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -553,11 +553,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))))
+       (period (or (cdr (assoc "period" project))
+                   (format "%s +%sd" start 
org-export-taskjuggler-default-project-duration))))
     (insert
-     (format "project %s \"%s\" \"%s\" %s +%sd {\n }\n"
-            unique-id headline version start
-            org-export-taskjuggler-default-project-duration))))
+     (format "project %s \"%s\" \"%s\" %s {\n }\n"
+            unique-id headline version period))))
 
 (defun org-taskjuggler-filter-and-join (items)
   "Filter all nil elements from ITEMS and join the remaining ones

Thanks
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland





reply via email to

[Prev in Thread] Current Thread [Next in Thread]