emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Header/preface definitions in ox-taskjuggler?
Date: Tue, 4 Nov 2014 17:48:40 -0600	[thread overview]
Message-ID: <CA+M2ft9UgWPxOq1EMeF+vZONwp=jfi4F-DJkbP3v3hd-qiJLXw@mail.gmail.com> (raw)
In-Reply-To: <CA+M2ft-i4_wAiqRhFVkq1OdUh8Of=Ar+OhLCYEnBYUttRuVUTQ@mail.gmail.com>

On Sun, Nov 2, 2014 at 4:09 PM, John Hendy <jw.hendy@gmail.com> 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 <username>
> ...
> }
>

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

      reply	other threads:[~2014-11-04 23:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02 21:55 Header/preface definitions in ox-taskjuggler? John Hendy
2014-11-02 22:09 ` John Hendy
2014-11-04 23:48   ` John Hendy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+M2ft9UgWPxOq1EMeF+vZONwp=jfi4F-DJkbP3v3hd-qiJLXw@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).