all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 4/8] ox-taskjuggler.el:  :PROJECT-{END, DURATION} project attribute
@ 2015-11-08 10:18 Kosyrev Serge
  0 siblings, 0 replies; only message in thread
From: Kosyrev Serge @ 2015-11-08 10:18 UTC (permalink / raw)
  To: emacs-orgmode


* ox-taskjuggler.el (org-taskjuggler--build-project): Allow the project
end and duration to be specified via properties of the root node.
---
 contrib/lisp/ox-taskjuggler.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 427fb6e..82aaa7e 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -765,10 +765,13 @@ days from now."
               org-taskjuggler-default-project-version)
           (or (org-taskjuggler-get-start project)
               (format-time-string "%Y-%m-%d"))
-          (let ((end (org-taskjuggler-get-end project)))
+          ;; The 'project-end' and 'project-duration' root node properties allow
+          ;; the project end date / duration to be specified directly in the Org file.
+          (let ((end      (org-element-property :PROJECT-END project))
+                (duration (org-element-property :PROJECT-DURATION project)))
             (or (and end (format "- %s" end))
-                (format "+%sd"
-                        org-taskjuggler-default-project-duration))))
+                (and duration (format "+%s" duration))
+                (format "+%sd" org-taskjuggler-default-project-duration))))
    ;; Add attributes.
    (org-taskjuggler--indent-string
     (org-taskjuggler--build-attributes
-- 
2.5.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-09 22:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-08 10:18 [PATCH 4/8] ox-taskjuggler.el: :PROJECT-{END, DURATION} project attribute Kosyrev Serge

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.