* Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes
@ 2014-11-02 22:26 John Hendy
2014-11-02 22:47 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: John Hendy @ 2014-11-02 22:26 UTC (permalink / raw)
To: emacs-orgmode
I ran into an error with a 30min task which used the :effort: property
to set this duration. Upon compilation, I noted the warning:
```
file.tjp:10: Warning: 400.0d of effort of task one does not fit into
the project time frame.
Warning: 1 tasks could not be scheduled
```
I looked at the .tjp file, and 30min had been converted to 4800.0
hours. I was able to reproduce with the following setup:
#+begin_src min-config
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp/")
(require 'ox-taskjuggler)
#+end_src
emacs -Q
M-x load-file ~/path/to/min-config
#+begin_src tj-time-test.org
* Project :taskjuggler_project:
** task1-effort-min
:PROPERTIES:
:start: 2014-11-01
:effort: 30min
:allocate: jwhendy
:END:
** task2-duration-min
:PROPERTIES:
:duration: 30min
:allocate: jwhendy
:blocker: previous-sibling
:END:
#+end_src
Exported this via =C-e J j=; report section omitted below.
#+begin_src tj-time-test.tjp
project nil "Project" "1.0" 2014-11-02 +280d {
}
shift s40 "Part time shift" {
workinghours wed, thu, fri off
}
resource jwhendy "" {
}
task project "Project" {
task task1_effort_min "task1-effort-min" {
purge allocate
allocate jwhendy
effort 4800.0h
start 2014-11-01
}
task task2_duration_min "task2-duration-min" {
depends !task1_effort_min
purge allocate
allocate jwhendy
duration 30min
}
}
#+end_src
Note the effort vs. duration time processing.
I tried the property :Effort: instead, as that's used in Worg and I
wondered if it was "built-in" (even though any tj attribute should be
able to be passed through a property) and got the same result.
From what I can tell, effort/duration/length all have the same
definition structure:
- http://www.taskjuggler.org/tj3/manual/effort.html
- http://www.taskjuggler.org/tj3/manual/duration.html
Thanks for any feedback or requests for more info.
John
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes
2014-11-02 22:26 Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes John Hendy
@ 2014-11-02 22:47 ` Nicolas Goaziou
2014-11-02 22:54 ` John Hendy
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-11-02 22:47 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
Hello,
John Hendy <jw.hendy@gmail.com> writes:
> I ran into an error with a 30min task which used the :effort: property
> to set this duration. Upon compilation, I noted the warning:
> ```
> file.tjp:10: Warning: 400.0d of effort of task one does not fit into
> the project time frame.
> Warning: 1 tasks could not be scheduled
> ```
>
> I looked at the .tjp file, and 30min had been converted to 4800.0
> hours. I was able to reproduce with the following setup:
>
> #+begin_src min-config
> (add-to-list 'load-path "~/.elisp/org.git/contrib/lisp/")
> (require 'ox-taskjuggler)
> #+end_src
>
> emacs -Q M-x load-file ~/path/to/min-config
>
> #+begin_src tj-time-test.org
>
> * Project :taskjuggler_project:
> ** task1-effort-min
> :PROPERTIES:
> :start: 2014-11-01
> :effort: 30min
> :allocate: jwhendy
> :END:
> ** task2-duration-min
> :PROPERTIES:
> :duration: 30min
> :allocate: jwhendy
> :blocker: previous-sibling
> :END:
>
> #+end_src
>
EFFORT is a special property in Org (i.e., it is not specific to
taskjuggler). It expects "HH:MM" format. So, you should set it to
:Effort: 00:30
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes
2014-11-02 22:47 ` Nicolas Goaziou
@ 2014-11-02 22:54 ` John Hendy
2014-11-02 23:01 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: John Hendy @ 2014-11-02 22:54 UTC (permalink / raw)
To: John Hendy, emacs-orgmode
On Sun, Nov 2, 2014 at 4:47 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
>> I ran into an error with a 30min task which used the :effort: property
>> to set this duration. Upon compilation, I noted the warning:
>> ```
>> file.tjp:10: Warning: 400.0d of effort of task one does not fit into
>> the project time frame.
>> Warning: 1 tasks could not be scheduled
>> ```
>>
>> I looked at the .tjp file, and 30min had been converted to 4800.0
>> hours. I was able to reproduce with the following setup:
>>
>> #+begin_src min-config
>> (add-to-list 'load-path "~/.elisp/org.git/contrib/lisp/")
>> (require 'ox-taskjuggler)
>> #+end_src
>>
>> emacs -Q M-x load-file ~/path/to/min-config
>>
>> #+begin_src tj-time-test.org
>>
>> * Project :taskjuggler_project:
>> ** task1-effort-min
>> :PROPERTIES:
>> :start: 2014-11-01
>> :effort: 30min
>> :allocate: jwhendy
>> :END:
>> ** task2-duration-min
>> :PROPERTIES:
>> :duration: 30min
>> :allocate: jwhendy
>> :blocker: previous-sibling
>> :END:
>>
>> #+end_src
>>
>
> EFFORT is a special property in Org (i.e., it is not specific to
> taskjuggler). It expects "HH:MM" format. So, you should set it to
>
> :Effort: 00:30
>
That mostly makes sense. Org's not case-sensitive, correct? I was
looking at the [granted, outdated] taskjuggler documentation and it
features estimates in days (i.e. 10d):
- http://orgmode.org/worg/org-tutorials/org-taskjuggler.html
Is this recent (as in post-writing of that worg page)? Or are there
other formats that could be accepted? It's unfortunate that org and
taskjuggler overlap on this, as ideally one could pass any tj
attribute as a property and it'd "do the right thing." I see why the
issue exists now.
So if I want to estimate a task taking 10 days, I need to input 80:00?
Best regards,
John
> Regards,
>
> --
> Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes
2014-11-02 22:54 ` John Hendy
@ 2014-11-02 23:01 ` Nicolas Goaziou
2014-11-02 23:07 ` John Hendy
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-11-02 23:01 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
John Hendy <jw.hendy@gmail.com> writes:
> That mostly makes sense. Org's not case-sensitive, correct?
Correct.
> I was looking at the [granted, outdated] taskjuggler documentation and
> it features estimates in days (i.e. 10d): -
> http://orgmode.org/worg/org-tutorials/org-taskjuggler.html
>
> Is this recent (as in post-writing of that worg page)?
I cannot remember.
> Or are there other formats that could be accepted?
Not at the moment, since ox-taskjuggler.el hardcodes
(org-duration-string-to-minutes effort)
> It's unfortunate that org and taskjuggler overlap on this, as ideally
> one could pass any tj attribute as a property and it'd "do the right
> thing." I see why the issue exists now.
>
> So if I want to estimate a task taking 10 days, I need to input 80:00?
For now yes.
The code could be improved, however. I.e, if effort matches
"\\`[0-9]+:[0-5][0-9]\\'"
use `org-duration-string-to-minutes', otherwise insert it as-is.
Regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes
2014-11-02 23:01 ` Nicolas Goaziou
@ 2014-11-02 23:07 ` John Hendy
2014-11-02 23:25 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: John Hendy @ 2014-11-02 23:07 UTC (permalink / raw)
To: John Hendy, emacs-orgmode
On Sun, Nov 2, 2014 at 5:01 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> John Hendy <jw.hendy@gmail.com> writes:
>
>> That mostly makes sense. Org's not case-sensitive, correct?
>
> Correct.
>
>> I was looking at the [granted, outdated] taskjuggler documentation and
>> it features estimates in days (i.e. 10d): -
>> http://orgmode.org/worg/org-tutorials/org-taskjuggler.html
>>
>> Is this recent (as in post-writing of that worg page)?
>
> I cannot remember.
>
>> Or are there other formats that could be accepted?
>
> Not at the moment, since ox-taskjuggler.el hardcodes
>
> (org-duration-string-to-minutes effort)
>
>> It's unfortunate that org and taskjuggler overlap on this, as ideally
>> one could pass any tj attribute as a property and it'd "do the right
>> thing." I see why the issue exists now.
>>
>> So if I want to estimate a task taking 10 days, I need to input 80:00?
>
> For now yes.
>
> The code could be improved, however. I.e, if effort matches
>
> "\\`[0-9]+:[0-5][0-9]\\'"
>
> use `org-duration-string-to-minutes', otherwise insert it as-is.
Thanks for the explanation. I pretty much only use duration, which has
never had an issue. As a fluke I used effort and noticed the big
difference. Thanks for illuminating the situation!
John
>
>
> Regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes
2014-11-02 23:07 ` John Hendy
@ 2014-11-02 23:25 ` Nicolas Goaziou
2014-11-03 21:53 ` John Hendy
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-11-02 23:25 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
John Hendy <jw.hendy@gmail.com> writes:
> Thanks for the explanation. I pretty much only use duration, which has
> never had an issue. As a fluke I used effort and noticed the big
> difference. Thanks for illuminating the situation!
Actually, I was slightly wrong. According to
`org-duration-string-to-minutes' and `org-effort-durations' docstrings,
Org accepts modifiers for numbers. IOW
:Effort: 3d
is a valid value in Org.
The real problem is that "min" is not recognized as a valid modifier,
since "30min" is basically the same as "30" or "0:30".
I changed `org-effort-durations' default value to include "min" as
a modifier, which will make your original example work.
Regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes
2014-11-02 23:25 ` Nicolas Goaziou
@ 2014-11-03 21:53 ` John Hendy
0 siblings, 0 replies; 7+ messages in thread
From: John Hendy @ 2014-11-03 21:53 UTC (permalink / raw)
To: John Hendy, emacs-orgmode
On Sun, Nov 2, 2014 at 5:25 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> John Hendy <jw.hendy@gmail.com> writes:
>
>> Thanks for the explanation. I pretty much only use duration, which has
>> never had an issue. As a fluke I used effort and noticed the big
>> difference. Thanks for illuminating the situation!
>
> Actually, I was slightly wrong. According to
> `org-duration-string-to-minutes' and `org-effort-durations' docstrings,
> Org accepts modifiers for numbers. IOW
>
> :Effort: 3d
>
> is a valid value in Org.
>
> The real problem is that "min" is not recognized as a valid modifier,
> since "30min" is basically the same as "30" or "0:30".
>
> I changed `org-effort-durations' default value to include "min" as
> a modifier, which will make your original example work.
Awesome -- thanks a ton!
John
>
>
> Regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-11-03 21:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-02 22:26 Bug: ox-taskjuggler :effort: property incorrectly converted when in minutes John Hendy
2014-11-02 22:47 ` Nicolas Goaziou
2014-11-02 22:54 ` John Hendy
2014-11-02 23:01 ` Nicolas Goaziou
2014-11-02 23:07 ` John Hendy
2014-11-02 23:25 ` Nicolas Goaziou
2014-11-03 21:53 ` John Hendy
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).