From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: Re: [taskjuggler] small edits to org-taskjuggler.el for tj3 Date: Tue, 05 Apr 2011 10:58:00 +0200 Message-ID: <8762qtnkh3.fsf@sbs.ch> References: <87fwpxnnx8.fsf@sbs.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=39112 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q725a-0007lz-A3 for emacs-orgmode@gnu.org; Tue, 05 Apr 2011 04:58:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q725X-0006xc-JT for emacs-orgmode@gnu.org; Tue, 05 Apr 2011 04:58:18 -0400 Received: from lo.gmane.org ([80.91.229.12]:46265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q725X-0006xB-8E for emacs-orgmode@gnu.org; Tue, 05 Apr 2011 04:58:15 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q725V-0007sL-CY for emacs-orgmode@gnu.org; Tue, 05 Apr 2011 10:58:13 +0200 Received: from gateway01.sbszh.ch ([217.162.18.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Apr 2011 10:58:13 +0200 Received: from christian.egli by gateway01.sbszh.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Apr 2011 10:58:13 +0200 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 Christian Egli 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