From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Header/preface definitions in ox-taskjuggler? Date: Tue, 4 Nov 2014 17:48:40 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlnq7-0002Nk-DD for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 18:48:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlnq6-0008Vn-Dk for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 18:48:43 -0500 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:60215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlnq6-0008V9-1z for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 18:48:42 -0500 Received: by mail-la0-f45.google.com with SMTP id pn19so1866108lab.18 for ; Tue, 04 Nov 2014 15:48:40 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode On Sun, Nov 2, 2014 at 4:09 PM, John Hendy wrote: > Edit: sorry about the premature send. Bad accidental tab + enter from > gmail! Here's the intended email: > === > > I note that the defaults for a taskjuggler export in Org are as > follows, with taskjuggler syntax and related org variable definitions > listed. [snip] > In any case, this is the one that's goofing me up. The first task gets > the following lines prepended to it: > > task task1 "task1" { > purge allocate > allocate > ... > } > This is defined in org.git/contrib/ox-taskjuggler.el: #+begin_src ;; If no resource is allocated among tasks, allocate one to ;; the first task. (unless (org-element-map main-tasks 'headline (lambda (task) (org-element-property :ALLOCATE task)) info t) (org-element-put-property (car main-tasks) :ALLOCATE (or (org-taskjuggler-get-id (car main-resources) info) (user-login-name)))) (mapconcat (lambda (task) (org-taskjuggler--build-task task info)) main-tasks "")) #+end_src Any reason we need to force an allocated resource to the first task? >From my experience, taskjuggler fails in the following scenarios: - You use the =effort= attribute and don't assign a resource (effort is based on available manpower and thus requires a defined resource with some set availability/output defined) - You assign a resource but *don't* use =effort= or =length=, which are allocation-using vs. =duration=, which is not. In my case, I tend *not* to use =effort= since I'm simply planning out processes for myself and thus just use =duration=. I've had to create a dummy first headline to get the allocation so that my actual task tree doesn't fail due to not using =effort=/=length=. Either that or I have to edit the generated .tjp file and remove the lines: #+begin_src purge allocate allocate username #+end_src Could this be updated to check for both no resources *and* the use of =effort= to specify a task attribute? If it doesn't have both, there's no effect in the output of allocating a resource. Best regards, John > If one doesn't use the effort attribute (but duration or length > instead), you get a warning regarding resources having been requested > but none being assigned (because effort is the only time-related > attribute that calls for a person to translate effort into calendar > length). Is there a reason ox-taskjuggler defaults to > creating/assigning resources? > > > John