emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Sullivan, Gregory (US SSA)
Subject: [O] [taskjuggler] small edits to org-taskjuggler.el for tj3
Date: Mon, 4 Apr 2011 15:58:24 -0400

Appended is a patch with a couple of small changes to org-taskjuggler.el, 
addressing the following issues:

General:

* in org-taskjuggler-open-project, the duration is never calculated (default is 
always used).

Specific to tj3:

* the reports need a "formats" attribute

* tj3 does not support the "utilization" and "freeload" columns in reports. 

* the "sorttasks startup" attribute in the default resourcereport does not make 
sense anymore. 

Not addressed in the patch:

* I wasn't sure about how best to maintain backwards compatibility with the 
default report strings, as I override the taskjuggler version in the .org file 
(not in my .emacs file).

* for tj3, I found that I needed to put a "scheduling" property in the top 
level task, with value "asap". 

Org-mode version 7.5 (release_7.5.134.gb869b.dirty)
TaskJuggler III v0.0.11

-- Greg
-- 
Greg Sullivan          address@hidden
(781)262-4553 (office) (978)430-3461 (cell)



--- ../../../git-org-mode-new/org-mode/lisp/org-taskjuggler.el  2011-04-04 
13:12:56.758073400 -0400
+++ ./org-taskjuggler.el        2011-04-04 15:32:33.789346200 -0400
@@ -204,13 +204,14 @@
   columns hierarchindex, name, start, end, effort, duration, completed, chart
   timeformat \"%Y-%m-%d\"
   hideresource 1
+  formats html
   loadunit shortauto
 }"
 "resourcereport \"Resource Graph\" {
   headline \"Resource Allocation Graph\"
-  columns no, name, utilization, freeload, chart
+  columns no, name, effortleft, freetime, chart
   loadunit shortauto
-  sorttasks startup
+  formats html
   hidetask ~isleaf()
 }")
   "Default reports for the project."
@@ -553,11 +554,16 @@
        (headline (cdr (assoc "headline" project)))
        (version (cdr (assoc "version" project)))
        (start (cdr (assoc "start" project)))
-       (end (cdr (assoc "end" project))))
+       (end (cdr (assoc "end" project)))
+       (duration (if (and start end)
+                     (- (time-to-days
+                         (date-to-time (format "%s 00:01:00" end)))
+                        (time-to-days
+                         (date-to-time (format "%s 00:01:00" 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))))
+            unique-id headline version start duration))))
 
 (defun org-taskjuggler-filter-and-join (items)
   "Filter all nil elements from ITEMS and join the remaining ones




reply via email to

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