* [bug] ox-taskjuggler
@ 2015-01-20 12:44 Søren Mikkelsen
2015-01-20 21:00 ` Nicolas Goaziou
0 siblings, 1 reply; 10+ messages in thread
From: Søren Mikkelsen @ 2015-01-20 12:44 UTC (permalink / raw)
To: emacs-orgmode
I'm trying to use the taskjuggler exporter for getting an overview of my
project, and it seems to be straight forward if you know a bit about
Taskjuggler.
However, tasks that are scheduled org-mode like, i.e.,
*** TODO My task
SCHEDULED: <2015-01-27 Tue>
don't appear in the report. But, if I add a START property it will appear.
*** TODO My task 2
:PROPERTIES:
:start: 2015-03-01
:END:
I suspect it has something to do with l462-470:
(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)))
(or
(and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d"))
(and (memq 'start org-taskjuggler-valid-task-attributes)
(org-element-property :START item)))))
I'm not that experienced in elisp, so I hope someone can help me.
Best regards,
Søren
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-20 12:44 [bug] ox-taskjuggler Søren Mikkelsen
@ 2015-01-20 21:00 ` Nicolas Goaziou
2015-01-21 13:08 ` Søren Mikkelsen
0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Goaziou @ 2015-01-20 21:00 UTC (permalink / raw)
To: Søren Mikkelsen; +Cc: emacs-orgmode
Hello,
Søren Mikkelsen <smik@iha.dk> writes:
> I'm trying to use the taskjuggler exporter for getting an overview of my
> project, and it seems to be straight forward if you know a bit about
> Taskjuggler.
>
> However, tasks that are scheduled org-mode like, i.e.,
>
> *** TODO My task
> SCHEDULED: <2015-01-27 Tue>
>
> don't appear in the report. But, if I add a START property it will appear.
>
> *** TODO My task 2
> :PROPERTIES:
> :start: 2015-03-01
> :END:
>
> I suspect it has something to do with l462-470:
>
> (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)))
> (or
> (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d"))
> (and (memq 'start org-taskjuggler-valid-task-attributes)
> (org-element-property :START item)))))
>
>
> I'm not that experienced in elisp, so I hope someone can help me.
There is no bug in the snippet shown.
"ox-taskjuggler" just doesn't use SCHEDULED to set start property for
tasks. However, it will use SCHEDULED to set the start date for the
project.
Note that I don't use Taskjuggler, so I don't know if this is the right
behaviour or not.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-20 21:00 ` Nicolas Goaziou
@ 2015-01-21 13:08 ` Søren Mikkelsen
2015-01-21 13:31 ` John Hendy
0 siblings, 1 reply; 10+ messages in thread
From: Søren Mikkelsen @ 2015-01-21 13:08 UTC (permalink / raw)
To: emacs-orgmode
On 2015-01-20 22:00, Nicolas Goaziou wrote:
> Hello,
>
> Søren Mikkelsen <smik@iha.dk> writes:
>
>> I'm trying to use the taskjuggler exporter for getting an overview of my
>> project, and it seems to be straight forward if you know a bit about
>> Taskjuggler.
>>
>> However, tasks that are scheduled org-mode like, i.e.,
>>
>> *** TODO My task
>> SCHEDULED: <2015-01-27 Tue>
>>
>> don't appear in the report. But, if I add a START property it will appear.
>>
>> *** TODO My task 2
>> :PROPERTIES:
>> :start: 2015-03-01
>> :END:
>>
>> I suspect it has something to do with l462-470:
>>
>> (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)))
>> (or
>> (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d"))
>> (and (memq 'start org-taskjuggler-valid-task-attributes)
>> (org-element-property :START item)))))
>>
>>
>> I'm not that experienced in elisp, so I hope someone can help me.
>
> There is no bug in the snippet shown.
>
> "ox-taskjuggler" just doesn't use SCHEDULED to set start property for
> tasks. However, it will use SCHEDULED to set the start date for the
> project.
>
> Note that I don't use Taskjuggler, so I don't know if this is the right
> behaviour or not.
>
>
> Regards,
>
According to the org mode docs, assigning the start of a task should be
possible both ways:
http://orgmode.org/worg/exporters/taskjuggler/ox-taskjuggler.html#sec-5
Or am I misinterpreting the docs?
--
Best regards,
Søren Mikkelsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-21 13:08 ` Søren Mikkelsen
@ 2015-01-21 13:31 ` John Hendy
2015-01-22 7:26 ` Søren Mikkelsen
0 siblings, 1 reply; 10+ messages in thread
From: John Hendy @ 2015-01-21 13:31 UTC (permalink / raw)
To: Søren Aagaard Mikkelsen; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]
On Jan 21, 2015 7:09 AM, "Søren Mikkelsen" <soren@aamikkelsen.dk> wrote:
>
> On 2015-01-20 22:00, Nicolas Goaziou wrote:
> > Hello,
> >
> > Søren Mikkelsen <smik@iha.dk> writes:
> >
> >> I'm trying to use the taskjuggler exporter for getting an overview of
my
> >> project, and it seems to be straight forward if you know a bit about
> >> Taskjuggler.
> >>
> >> However, tasks that are scheduled org-mode like, i.e.,
> >>
> >> *** TODO My task
> >> SCHEDULED: <2015-01-27 Tue>
> >>
> >> don't appear in the report. But, if I add a START property it will
appear.
> >>
> >> *** TODO My task 2
> >> :PROPERTIES:
> >> :start: 2015-03-01
> >> :END:
> >>
> >> I suspect it has something to do with l462-470:
> >>
> >> (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)))
> >> (or
> >> (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d"))
> >> (and (memq 'start org-taskjuggler-valid-task-attributes)
> >> (org-element-property :START item)))))
> >>
> >>
> >> I'm not that experienced in elisp, so I hope someone can help me.
> >
> > There is no bug in the snippet shown.
> >
> > "ox-taskjuggler" just doesn't use SCHEDULED to set start property for
> > tasks. However, it will use SCHEDULED to set the start date for the
> > project.
> >
> > Note that I don't use Taskjuggler, so I don't know if this is the right
> > behaviour or not.
> >
> >
> > Regards,
> >
> According to the org mode docs, assigning the start of a task should be
> possible both ways:
>
> http://orgmode.org/worg/exporters/taskjuggler/ox-taskjuggler.html#sec-5
>
> Or am I misinterpreting the docs?
>
Well, I wrote that , so you may be correctly interpreting docs written by
someone who misunderstood!
Perhaps the SCHUDULED property is just for the main project container. I
don't see it actually used in any examples?
Sorry if the confusion was my fault!
John
> --
> Best regards,
> Søren Mikkelsen
>
>
[-- Attachment #2: Type: text/html, Size: 3236 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-21 13:31 ` John Hendy
@ 2015-01-22 7:26 ` Søren Mikkelsen
2015-01-22 10:21 ` Christian Egli
0 siblings, 1 reply; 10+ messages in thread
From: Søren Mikkelsen @ 2015-01-22 7:26 UTC (permalink / raw)
To: emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2015-01-21 14:31, John Hendy wrote:
>
> On Jan 21, 2015 7:09 AM, "Søren Mikkelsen" <soren@aamikkelsen.dk
> <mailto:soren@aamikkelsen.dk>> wrote:
>>
>> On 2015-01-20 22:00, Nicolas Goaziou wrote:
>>> Hello,
>>>
>>> Søren Mikkelsen <smik@iha.dk <mailto:smik@iha.dk>> writes:
>>>
>>>> I'm trying to use the taskjuggler exporter for getting an
>>>> overview
> of my
>>>> project, and it seems to be straight forward if you know a
>>>> bit about Taskjuggler.
>>>>
>>>> However, tasks that are scheduled org-mode like, i.e.,
>>>>
>>>> *** TODO My task SCHEDULED: <2015-01-27 Tue>
>>>>
>>>> don't appear in the report. But, if I add a START property it
>>>> will
> appear.
>>>>
>>>> *** TODO My task 2 :PROPERTIES: :start: 2015-03-01 :END:
>>>>
>>>> I suspect it has something to do with l462-470:
>>>>
>>>> (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))) (or (and scheduled (org-timestamp-format scheduled
>>>> "%Y-%02m-%02d")) (and (memq 'start
>>>> org-taskjuggler-valid-task-attributes) (org-element-property
>>>> :START item)))))
>>>>
>>>>
>>>> I'm not that experienced in elisp, so I hope someone can help
>>>> me.
>>>
>>> There is no bug in the snippet shown.
>>>
>>> "ox-taskjuggler" just doesn't use SCHEDULED to set start
>>> property for tasks. However, it will use SCHEDULED to set the
>>> start date for the project.
>>>
>>> Note that I don't use Taskjuggler, so I don't know if this is
>>> the right behaviour or not.
>>>
>>>
>>> Regards,
>>>
>> According to the org mode docs, assigning the start of a task
>> should be possible both ways:
>>
>> http://orgmode.org/worg/exporters/taskjuggler/ox-taskjuggler.html#sec-5
>>
>>
>>
Or am I misinterpreting the docs?
>>
>
> Well, I wrote that , so you may be correctly interpreting docs
> written by someone who misunderstood!
>
> Perhaps the SCHUDULED property is just for the main project
> container. I don't see it actually used in any examples?
No, not other than the task example I was referring to.
>
> Sorry if the confusion was my fault! John
>> -- Best regards, Søren Mikkelsen
>>
>>
>
It would, however, make sense to be able to scheduled tasks where
interpreted as the start time, if the org-file is used for more than
just generating the report.
- --
Best regards,
Søren Mikkelsen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJUwKYOAAoJECUE7rt2jWDwZisH/RgMvuzGu8gef7Yw3474yjkV
CIVf1D+DNXQKPv0R596hYhf8GrvSWw87+OvYtsDdcXJ+ueDxycPgrNy+rQbnGBvO
UUjla1QMNtIXMHvRB232cZ91hL50CCI5Mgx5k67PRU9shvfJIA/b0KouZmrmyMna
uUm16IaH3vWVNm/BrQJJi86jhz6uBqF9NBmaefoZxIYd8HAJLg1iQGMaDCxvhwLq
xzQtfQAlUxkVi+rzOwOuYk9U11ixMPzm8h8XFTNo+Uvj8GyVMIs4+ZFRqwQJG7nk
PC/9K4SXcOuBprZZTXX4Y4YKJiSJ6qRH+omjB7TXKtDYK6Atlh4egkw33hyxoak=
=qAfS
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-22 7:26 ` Søren Mikkelsen
@ 2015-01-22 10:21 ` Christian Egli
2015-01-22 11:55 ` Søren Mikkelsen
0 siblings, 1 reply; 10+ messages in thread
From: Christian Egli @ 2015-01-22 10:21 UTC (permalink / raw)
To: emacs-orgmode
Søren Mikkelsen <soren@aamikkelsen.dk> writes:
> It would, however, make sense to be able to scheduled tasks where
> interpreted as the start time, if the org-file is used for more than
> just generating the report.
I agree that it would make sense to use the scheduled date as the start
time. The same is probably true for DEADLINES as well. IIRC there was a
patch once for deadlines which I never managed to integrate.
Anyway what you would like doesn't seem very hard to implement: Just add
another statement to the (let*) of org-taskjuggler--build-task where you
get the start time using the org-taskjuggler-get-start function. Then
just insert the start time in the (concat) statement maybe right after
(and priority (format " priority %s\n" priority))
Let me know if you need any help
Thanks
Christian
--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-22 10:21 ` Christian Egli
@ 2015-01-22 11:55 ` Søren Mikkelsen
2015-01-23 8:59 ` Christian Egli
0 siblings, 1 reply; 10+ messages in thread
From: Søren Mikkelsen @ 2015-01-22 11:55 UTC (permalink / raw)
To: emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2015-01-22 11:21, Christian Egli wrote:
> Søren Mikkelsen <soren@aamikkelsen.dk> writes:
>
>> It would, however, make sense to be able to scheduled tasks
>> where interpreted as the start time, if the org-file is used for
>> more than just generating the report.
>
> I agree that it would make sense to use the scheduled date as the
> start time. The same is probably true for DEADLINES as well. IIRC
> there was a patch once for deadlines which I never managed to
> integrate.
>
> Anyway what you would like doesn't seem very hard to implement:
> Just add another statement to the (let*) of
> org-taskjuggler--build-task where you get the start time using the
> org-taskjuggler-get-start function. Then just insert the start time
> in the (concat) statement maybe right after (and priority (format "
> priority %s\n" priority))
>
> Let me know if you need any help
>
> Thanks Christian
>
Thanks for suggestions. Well, even though I used emacs for quite some
time my elisp programmering skills are on a very basic level, so I'll
need some help.
I've added
(starttime (org-taskjuggler-get-start task)) in the let*
and
(and starttime (format " start %s\n" starttime)) after priority.
It works, but only for tasks that aren't having a start attribute. It
is possible to give a warning if the start attribute already exists
and make the default one, the one specified in the attributes (drawer)?
- --
Best regards,
Søren Mikkelsen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJUwOVBAAoJECUE7rt2jWDwmKIH/RxqtwTf3WyMelI6BonAIraf
BMF+Y7l+BBXbHDrYiKSW2SDCLuGFrbTaZn95tmom3YXfXAruJQlfe6orOeqPqiBM
0bt1ryvKq5ZdOzeHHFxyJilgHcuCeEtN6LTs1+URvTS4+8N5mnplnzCIGDbTKjiX
M43spWsVWg39vrqQAqQUADQBHiNR/wq5WjRUiFW9cDpAOiDRkz1kwWb/QFkpjjjl
KCa7EP5nQOySBpLjuPwPFUXuKWs7jP3NIxD4Wmsc3huQnCqJcCuTZKTcuLwPa+Co
PGsYwIyoNQM5k/pctCw5XVTkQrK8eFEW/YtEPAqqRp8jmkIaZYXLevLceIWMOqo=
=xdd0
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-22 11:55 ` Søren Mikkelsen
@ 2015-01-23 8:59 ` Christian Egli
2015-01-23 11:31 ` Søren Mikkelsen
0 siblings, 1 reply; 10+ messages in thread
From: Christian Egli @ 2015-01-23 8:59 UTC (permalink / raw)
To: emacs-orgmode
Søren Mikkelsen <soren@aamikkelsen.dk> writes:
> It works, but only for tasks that aren't having a start attribute. It
> is possible to give a warning if the start attribute already exists
> and make the default one, the one specified in the attributes (drawer)?
What exactly doesn't work? Are there two start entries in the task? One
because of the SCHEDULED property and one because of the the start
property?
Then you might have to remove the start property from
org-taskjuggler-valid-task-attributes before adding the other valid
attributes i.e.
;; Add other valid attributes.
(org-taskjuggler--indent-string
(org-taskjuggler--build-attributes
task org-taskjuggler-valid-task-attributes))
Might have to become (untested)
;; Add other valid attributes.
(org-taskjuggler--indent-string
(org-taskjuggler--build-attributes
task
(remq 'start org-taskjuggler-valid-task-attributes)))
HTH
Christian
--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-23 8:59 ` Christian Egli
@ 2015-01-23 11:31 ` Søren Mikkelsen
2015-01-26 12:30 ` Christian Egli
0 siblings, 1 reply; 10+ messages in thread
From: Søren Mikkelsen @ 2015-01-23 11:31 UTC (permalink / raw)
To: emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2015-01-23 09:59, Christian Egli wrote:
> Søren Mikkelsen <soren@aamikkelsen.dk> writes:
>
>> It works, but only for tasks that aren't having a start
>> attribute. It is possible to give a warning if the start
>> attribute already exists and make the default one, the one
>> specified in the attributes (drawer)?
>
> What exactly doesn't work? Are there two start entries in the task?
> One because of the SCHEDULED property and one because of the the
> start property?
>
> Then you might have to remove the start property from
> org-taskjuggler-valid-task-attributes before adding the other
> valid attributes i.e.
>
> ;; Add other valid attributes. (org-taskjuggler--indent-string
> (org-taskjuggler--build-attributes task
> org-taskjuggler-valid-task-attributes))
>
> Might have to become (untested)
>
> ;; Add other valid attributes. (org-taskjuggler--indent-string
> (org-taskjuggler--build-attributes task (remq 'start
> org-taskjuggler-valid-task-attributes)))
>
> HTH Christian
>
The problem by removing the start attribute is that it destroys the
backward compatibility. I want ox-taskjuggler to accept both methods,
where the start property attribute overrules the scheduled attribute,
if this is present.
- --
Best regards,
Søren Mikkelsen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJUwjEEAAoJECUE7rt2jWDw5WQH/AhkKBjfWZLryYG+Zqj1D5Re
+JXahe52HYf5oBXeSJHF250wKxF4KSme6JXHBfO5lfT5IZY+YwZTeUxm0a2KXod3
y9bxrWKqNglkqLLHxpwsZMpTGfcy4LOGJwxqL+brcRSJzftf17bpKnD1pcj62/uT
UxLQlWbmmj0WqP4f0xLMtyvkRc5OWDz6T/mylxM0/26cK2xIhdigV42dTXvwFu13
NZdfhL5lUgORHOYseSfV23e/89pnw3V9PIO/4QA/6HEBP7icsSlMb4qiAOMf6wdE
JbPVf4hkYfDmBKcFuWeWKAdz94I/Xcov2/0XoCc/qOFEhhlAvxrFm+KzI/Xjr30=
=EpK7
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [bug] ox-taskjuggler
2015-01-23 11:31 ` Søren Mikkelsen
@ 2015-01-26 12:30 ` Christian Egli
0 siblings, 0 replies; 10+ messages in thread
From: Christian Egli @ 2015-01-26 12:30 UTC (permalink / raw)
To: emacs-orgmode
Søren Mikkelsen <soren@aamikkelsen.dk> writes:
> On 2015-01-23 09:59, Christian Egli wrote:
>> Søren Mikkelsen <soren@aamikkelsen.dk> writes:
>>
>>> It works, but only for tasks that aren't having a start
>>> attribute. It is possible to give a warning if the start
>>> attribute already exists and make the default one, the one
>>> specified in the attributes (drawer)?
>>
>> What exactly doesn't work? Are there two start entries in the task?
>> One because of the SCHEDULED property and one because of the the
>> start property?
>>
>> Then you might have to remove the start property from
>> org-taskjuggler-valid-task-attributes before adding the other
>> valid attributes i.e.
>>
>> ;; Add other valid attributes. (org-taskjuggler--indent-string
>> (org-taskjuggler--build-attributes task
>> org-taskjuggler-valid-task-attributes))
>>
>> Might have to become (untested)
>>
>> ;; Add other valid attributes. (org-taskjuggler--indent-string
>> (org-taskjuggler--build-attributes task (remq 'start
>> org-taskjuggler-valid-task-attributes)))
>>
>> HTH Christian
>>
> The problem by removing the start attribute is that it destroys the
> backward compatibility. I want ox-taskjuggler to accept both methods,
> where the start property attribute overrules the scheduled attribute,
> if this is present.
I don't understand. You get the start of a task using
org-taskjuggler-get-start. This can be either the start attribute or the
SCHEDULED attribute. Then you insert this in the task if it is non-nil.
Since you have dealt with this attribute already you don't need to
handle it in org-taskjuggler--build-attributes. Hence you remove it
(just for this call) from the list of task attributes that need to be
handled.
HTH
Christian
--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-01-26 12:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 12:44 [bug] ox-taskjuggler Søren Mikkelsen
2015-01-20 21:00 ` Nicolas Goaziou
2015-01-21 13:08 ` Søren Mikkelsen
2015-01-21 13:31 ` John Hendy
2015-01-22 7:26 ` Søren Mikkelsen
2015-01-22 10:21 ` Christian Egli
2015-01-22 11:55 ` Søren Mikkelsen
2015-01-23 8:59 ` Christian Egli
2015-01-23 11:31 ` Søren Mikkelsen
2015-01-26 12:30 ` Christian Egli
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).