emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [taskjuggler] small edits to org-taskjuggler.el for tj3
@ 2011-04-04 19:58 Sullivan, Gregory (US SSA)
  2011-04-05  7:43 ` Christian Egli
  0 siblings, 1 reply; 3+ messages in thread
From: Sullivan, Gregory (US SSA) @ 2011-04-04 19:58 UTC (permalink / raw)
  To: Emacs-orgmode@gnu.org

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          gregory.sullivan@baesystems.com
(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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-05  8:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 19:58 [taskjuggler] small edits to org-taskjuggler.el for tj3 Sullivan, Gregory (US SSA)
2011-04-05  7:43 ` Christian Egli
2011-04-05  8:58   ` Christian Egli

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).