emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Taskjuggler export deals badly with first parent match
@ 2013-04-19  8:54 Baptiste
  2013-04-19  9:32 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Baptiste @ 2013-04-19  8:54 UTC (permalink / raw)
  To: Org-mode


Hi,

first of all, thanks for the hard work to make 8.0 get out.

I found ox-taskjuggler broken in /task_id/ identification when it is non trivial.

here is an example this is not fine at my side

: Org-mode version 8.0 (release_8.0-1-g5ef07d @ …)

#+BEGIN_EXAMPLE
* Project                                               :taskjuggler_project:

** Training material
   :PROPERTIES:
   :task_id:  training_material
   :END:
*** Markup Guidelines
    :PROPERTIES:
    :Effort:   2d
    :task_id:  markup
    :END:
*** Workflow Guidelines
    :PROPERTIES:
    :Effort:   2d
    :END:
** Presentation
   :PROPERTIES:
   :Effort:   2d
   :BLOCKER:   markup
   :END:
#+END_EXAMPLE

At export, it gives

#+BEGIN_EXAMPLE
task project "Project" {
  purge allocate
  allocate cancelled
  task training_material "Training material" {
    task markup "Markup Guidelines" {
      effort 16.0h
    }
    task workflow "Workflow Guidelines" {
      effort 16.0h
    }
  }
  task presentation "Presentation" {
    depends !!training_material.markup
    effort 16.0h
  }
}
#+END_EXAMPLE

which fails compiling (for good reasons) with
:  Error in scenario plan: Task project.presentation has unknown depends training_material.markup

actually, the line
:     depends !!training_material.markup
should be
:     depends !training_material.markup

– this is an easy fix is this baby example, but on my whole project, I have tons of false references :'( –

again, thanks :)

--

: ~^v^~ Bat

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

* Re: Taskjuggler export deals badly with first parent match
  2013-04-19  8:54 Taskjuggler export deals badly with first parent match Baptiste
@ 2013-04-19  9:32 ` Nicolas Goaziou
  2013-04-19 11:20   ` Baptiste
  2013-04-19 11:21   ` Baptiste
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2013-04-19  9:32 UTC (permalink / raw)
  To: Baptiste; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hello,

Baptiste <bateast@bat.fr.eu.org> writes:

> I found ox-taskjuggler broken in /task_id/ identification when it is
> non trivial.

Oops. It looks like I made a typo. Thank you for reporting it.

Would the following patch solve the problem?


Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-taskjuggler.el-Fix-dependecies-string.patch --]
[-- Type: text/x-patch, Size: 1491 bytes --]

From 0b0b9ab98657145cddb20fc6ffd45414a7f23d83 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Fri, 19 Apr 2013 11:30:49 +0200
Subject: [PATCH] ox-taskjuggler.el: Fix dependecies string

* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-format-dependencies):
  Fix dependecies string.
---
 contrib/lisp/ox-taskjuggler.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 16f0e8d..76e0182 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -544,7 +544,7 @@ doesn't include leading \"depends\"."
         (get-path
          (lambda (dep)
            ;; Return path to DEP relatively to TASK.
-           (let ((parent (org-export-get-parent dep))
+           (let ((parent (org-export-get-parent task))
                  (exclamations 1)
                  (option
                   (let ((id (org-element-property :TASK_ID dep)))
@@ -555,7 +555,7 @@ doesn't include leading \"depends\"."
              ;; Compute number of exclamation marks by looking for the
 	     ;; common ancestor between TASK and DEP.
              (while (not (org-element-map parent 'headline
-                           (lambda (hl) (eq hl task))))
+                           (lambda (hl) (eq hl dep))))
                (incf exclamations)
                (setq parent (org-export-get-parent parent)))
              ;; Build path from DEP to PARENT.
-- 
1.8.2.1


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

* Re: Taskjuggler export deals badly with first parent match
  2013-04-19  9:32 ` Nicolas Goaziou
@ 2013-04-19 11:20   ` Baptiste
  2013-04-19 11:21   ` Baptiste
  1 sibling, 0 replies; 4+ messages in thread
From: Baptiste @ 2013-04-19 11:20 UTC (permalink / raw)
  To: Org-mode

This patch works fine for me. Thanks

I still  have other  issues in  my move to  the new  exporter, but  I am
moving forward (then I am sorry if I report problems one after another).

Regards,

----------
*Le ven., avril 19 2013, Nicolas Goaziou a écrit*

        Hello,

        Baptiste <bateast@bat.fr.eu.org> writes:

  > I found ox-taskjuggler broken in /task_id/ identification when it is
  > non trivial.

        Oops. It looks like I made a typo. Thank you for reporting it.

        Would the following patch solve the problem?

        Regards,
-- 

: ~^v^~ Bat

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

* Re: Taskjuggler export deals badly with first parent match
  2013-04-19  9:32 ` Nicolas Goaziou
  2013-04-19 11:20   ` Baptiste
@ 2013-04-19 11:21   ` Baptiste
  1 sibling, 0 replies; 4+ messages in thread
From: Baptiste @ 2013-04-19 11:21 UTC (permalink / raw)
  To: Org-mode

This patch works fine for me. Thanks

I still  have other  issues in  my move to  the new  exporter, but  I am
moving forward (then I am sorry if I report problems one after another).

Regards,

----------
*Le ven., avril 19 2013, Nicolas Goaziou a écrit*

        Hello,

        Baptiste <bateast@bat.fr.eu.org> writes:

  > I found ox-taskjuggler broken in /task_id/ identification when it is
  > non trivial.

        Oops. It looks like I made a typo. Thank you for reporting it.

        Would the following patch solve the problem?

        Regards,
--

: ~^v^~ Bat
--text follows this line--

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

end of thread, other threads:[~2013-04-19 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-19  8:54 Taskjuggler export deals badly with first parent match Baptiste
2013-04-19  9:32 ` Nicolas Goaziou
2013-04-19 11:20   ` Baptiste
2013-04-19 11:21   ` Baptiste

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