emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Egli <christian.egli@sbs.ch>
To: emacs-orgmode@gnu.org
Subject: [PATCH 2/3] Taskjuggler export: Only create a milestone if node has no children
Date: Fri, 08 Mar 2013 17:24:57 +0100	[thread overview]
Message-ID: <878v5xg8py.fsf@sbs.ch> (raw)


* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task): Fix
  the check whether a node has no children

A milestone should only (automatically) be inserted if a node has no
children and no duration defined.
---
 contrib/lisp/ox-taskjuggler.el |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 88641b8..9146dfd 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -696,14 +696,14 @@ a unique id will be associated to it."
          (effort (org-element-property :EFFORT task))
          (milestone
           (or (org-element-property :MILESTONE task)
-              (and (org-element-map (org-element-contents task) 'headline
-                     'identity info t)  ; Has task any child?
-                   (not (or effort
-                            (org-element-property :LENGTH task)
-                            (org-element-property :DURATION task)
-                            (and (org-taskjuggler-get-start task)
-                                 (org-taskjuggler-get-end task))
-                            (org-element-property :PERIOD task))))))
+              (not (or (org-element-map (org-element-contents task) 'headline
+			 'identity info t)  ; Has task any child?
+		       effort
+		       (org-element-property :LENGTH task)
+		       (org-element-property :DURATION task)
+		       (and (org-taskjuggler-get-start task)
+			    (org-taskjuggler-get-end task))
+		       (org-element-property :PERIOD task)))))
          (priority
           (let ((pri (org-element-property :priority task)))
             (and pri
-- 
1.7.10.4


-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland

-----
Die neue Online-Bibliothek der SBS: Mit wenigen Klicks zum Buch unter http://online.sbs.ch

                 reply	other threads:[~2013-03-08 16:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=878v5xg8py.fsf@sbs.ch \
    --to=christian.egli@sbs.ch \
    --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).