emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Setting taskjuggler project start date (ox-taskjuggler)
@ 2013-03-25  6:27 John Hendy
  2013-03-25  7:17 ` John Hendy
  0 siblings, 1 reply; 8+ messages in thread
From: John Hendy @ 2013-03-25  6:27 UTC (permalink / raw)
  To: emacs-orgmode

Having trouble setting the project start date, which results in a
build error since my project started before today, and the default
project start appears to be today's date. This was with no
customization to the top level headline. Intuitively, I added a
:start: property like so:

#+begin_src org

* Project						:taskjuggler_project:
  :start:    2013-03-01


This results in (no change from exporting with no :start: property:

#+begin_src TJ

project nil "Project" "1.0" 2013-03-25 +280d {


From digging around in ox-taskjuggler.el, it looks like the project
gets defined here:

#+begin_src ox-taskjuggler.el (line 607)

(defun org-taskjuggler--build-project (project info)
  "Return a project declaration.
PROJECT is a headline.  INFO is a plist used as a communication
channel.  If no start date is specified, start today.  If no end
date is specified, end `org-taskjuggler-default-project-duration'
days from now."
  (format "project %s \"%s\" \"%s\" %s %s {\n}\n"
          (org-taskjuggler-get-id project info)
          (org-taskjuggler-get-name project)
          ;; Version is obtained through :TASKJUGGLER_VERSION:
          ;; property or `org-taskjuggler-default-project-version'.
          (or (org-element-property :VERSION project)
          (or (org-taskjuggler-get-start project)
              (format-time-string "%Y-%m-%d"))
          (let ((end (org-taskjuggler-get-end project)))
            (or (and end (format "- %s" end))
                (format "+%sd" org-taskjuggler-default-project-duration)))))]


I'm no esliper, but I think I can track that the consecutive =%s=
arguments are replaced by the successive function calls. That, and
=org-taskjuggler-get-start project= looks like the ticket. That
function is here:

#+begin_src ox-taskjuggler.el (line 372)

(defun org-taskjuggler-get-start (item)
  "Return start date for task or resource ITEM.
ITEM is a headline.  Return value is a string or nil if ITEM
doesn't have any start date defined.."
  (let ((scheduled (org-element-property :scheduled item)))
    (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d"))))


So, that suggested that perhaps I needed to use :scheduled: instead of
:start:. I tried that with the same results. It appears that this
property /is/ applied at the task level for the top headline, however:

#+begin_src TJ

task project "Project" {
  purge allocate
  allocate jwhendy
  start 2013-03-01



So, it applies :start: to the top level project in the /task/
definition area, but doesn't apply it to the very top level project

Any suggestions?


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-04-24  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25  6:27 Setting taskjuggler project start date (ox-taskjuggler) John Hendy
2013-03-25  7:17 ` John Hendy
2013-03-25  7:30   ` John Hendy
2013-03-25 20:15     ` Nicolas Goaziou
2013-03-25 22:14       ` John Hendy
2013-03-27 14:37         ` Nicolas Goaziou
2013-03-27 22:00           ` John Hendy
2013-04-24  8:30             ` Christian Egli

Code repositories for project(s) associated with this inbox:


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).