From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sullivan, Gregory (US SSA)" Subject: [taskjuggler] small edits to org-taskjuggler.el for tj3 Date: Mon, 4 Apr 2011 15:58:24 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=57461 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6puo-00035E-MR for Emacs-orgmode@gnu.org; Mon, 04 Apr 2011 15:58:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6pun-00039Y-Cf for Emacs-orgmode@gnu.org; Mon, 04 Apr 2011 15:58:22 -0400 Received: from dmzms99902.na.baesystems.com ([149.32.200.66]:27720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6pun-00039P-AP for Emacs-orgmode@gnu.org; Mon, 04 Apr 2011 15:58:21 -0400 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Emacs-orgmode@gnu.org" Appended is a patch with a couple of small changes to org-taskjuggler.el, a= ddressing the following issues: General: * in org-taskjuggler-open-project, the duration is never calculated (defaul= t is always used). Specific to tj3: * the reports need a "formats" attribute * tj3 does not support the "utilization" and "freeload" columns in reports.= =20 * the "sorttasks startup" attribute in the default resourcereport does not = make sense anymore.=20 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".=20 Org-mode version 7.5 (release_7.5.134.gb869b.dirty) TaskJuggler III v0.0.11 -- Greg --=20 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 1= 3: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, ch= art 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)))) =20 (defun org-taskjuggler-filter-and-join (items) "Filter all nil elements from ITEMS and join the remaining ones