From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann Hodique Subject: [PATCH v2 08/11] org-taskjuggler: disambiguate "headline", as it's also a valid property Date: Wed, 15 Aug 2012 21:11:54 +0200 Message-ID: <1345057917-69300-10-git-send-email-yann.hodique@gmail.com> References: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j14-0004yT-Vi for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1j13-0002bz-7o for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:30 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:55156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1j13-0002an-1u for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 15:12:29 -0400 Received: by mail-wi0-f177.google.com with SMTP id hn17so1402754wib.12 for ; Wed, 15 Aug 2012 12:12:28 -0700 (PDT) In-Reply-To: <1345057917-69300-1-git-send-email-yann.hodique@gmail.com> In-Reply-To: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> References: <1344164044-15059-1-git-send-email-yann.hodique@gmail.com> 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@gnu.org Cc: Yann Hodique --- lisp/org-taskjuggler.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 3c97e03..33b111d 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -329,7 +329,7 @@ defined in `org-export-taskjuggler-default-reports'." (unless resources (setq resources `((("resource_id" . ,(user-login-name)) - ("headline" . ,user-full-name) + ("HEADLINE" . ,user-full-name) ("level" . 1))))) ;; add a default allocation to the first task if none was given (unless (assoc "allocate" (car tasks)) @@ -427,7 +427,7 @@ information, all the properties, etc." (when deadline (push (cons "end" (org-taskjuggler-date (cdr deadline))) props))) (push (cons "level" level) props) - (push (cons "headline" headline) props) + (push (cons "HEADLINE" headline) props) (push (cons "parent-ordered" parent-ordered) props))) (defun org-taskjuggler-assign-task-ids (tasks) @@ -601,7 +601,7 @@ The id is derived from the headline and made unique against UNIQUE-IDS. If the (downcased) first token of the headline is not unique try to add more (downcased) tokens of the headline or finally add more underscore characters (\"_\")." - (let* ((headline (cdr (assoc "headline" item))) + (let* ((headline (cdr (assoc "HEADLINE" item))) (parts (split-string headline)) (id (org-taskjuggler-clean-id (downcase (pop parts))))) ; try to add more parts of the headline to make it unique @@ -627,7 +627,7 @@ attributes from the PROJECT alist are inserted. If no end date is specified it is calculated `org-export-taskjuggler-default-project-duration' days from now." (let* ((unique-id (cdr (assoc "unique-id" project))) - (headline (cdr (assoc "headline" project))) + (headline (cdr (assoc "HEADLINE" project))) (version (cdr (assoc "version" project))) (start (cdr (assoc "start" project))) (end (cdr (assoc "end" project)))) @@ -678,7 +678,7 @@ is defined it will calculate a unique id for the resource using (or (cdr (assoc "resource_id" resource)) (cdr (assoc "ID" resource)) (cdr (assoc "unique-id" resource))))) - (headline (cdr (assoc "headline" resource))) + (headline (cdr (assoc "HEADLINE" resource))) (attributes org-export-taskjuggler-valid-resource-attributes)) (insert (concat @@ -703,7 +703,7 @@ org-mode priority string." (defun org-taskjuggler-open-task (task) (let* ((unique-id (cdr (assoc "unique-id" task))) - (headline (cdr (assoc "headline" task))) + (headline (cdr (assoc "HEADLINE" task))) (effort (org-taskjuggler-clean-effort (cdr (assoc org-effort-property task)))) (depends (cdr (assoc "depends" task))) (allocate (cdr (assoc "allocate" task))) -- 1.7.11.4