Re: [O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional
Hi Christian, Christian Egli christian.e...@sbs.ch writes: OK this clears it up. So basically all the patches are fine from my pov. Thanks again. Thanks for confirming. I'll commit the patches when the FSF papers arrive. Best, -- Bastien
Re: [O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional
Yann Hodique yann.hodi...@gmail.com writes: Christian == Christian Egli christian.e...@sbs.ch writes: I'm trying to understand the use case here. If I understand correctly the container headline will no longer unconditionally generate a root task. So you could have multiple root tasks? Does this work in both versions of tj? Yes, basically the use case is the following. [snip] AFAICT it seems to work fine with either tj2 or tj3. OK this clears it up. So basically all the patches are fine from my pov. Thanks again. Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland
Re: [O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional
Christian == Christian Egli christian.e...@sbs.ch writes: Yann Hodique yann.hodi...@gmail.com writes: +(defcustom org-export-taskjuggler-keep-project-as-task t + Whether to keep the project headline as an umbrella task for + all declared tasks. Setting this to nil will allow maintaining + completely separated task buckets, while still sharing the same + resources pool. I'm trying to understand the use case here. If I understand correctly the container headline will no longer unconditionally generate a root task. So you could have multiple root tasks? Does this work in both versions of tj? Yes, basically the use case is the following. From an org code like: --8---cut here---start-8--- * Main :taskjuggler_project: ** Task1 ** Task2 --8---cut here---end---8--- the default behavior is to generate something like --8---cut here---start-8--- project main Main (} task main Main { task task1 Task1 {} task task2 Task2 {} } --8---cut here---end---8--- leading to a report like --8---cut here---start-8--- 1. Main 1.1 Task1 1.2 Taks2 --8---cut here---end---8--- while the new (non-default) one would generate --8---cut here---start-8--- project main Main {} task task1 Task1 {} task task2 Task2 {} --8---cut here---end---8--- leading to a report like --8---cut here---start-8--- 1 Task1 2 Task2 --8---cut here---end---8--- I must confess this is mostly a way to avoid questions from people looking at the report, asking why my task numbers are all 1.x :) AFAICT it seems to work fine with either tj2 or tj3. I'm using tj3 only myself, but the UI of tj2 doesn't complain at all about those multiple root tasks. Thanks, Yann -- When faced with necessary actions, there are always choices. So long as the job gets done. -- COUNT HASIMIR FENRING, Dispatches from Arrakis
Re: [O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional
On 08/12/2012 10:03 AM, Yann Hodique wrote: Christian == Christian Eglichristian.e...@sbs.ch writes: ... while the new (non-default) one would generate --8---cut here---start-8--- project main Main {} task task1 Task1 {} task task2 Task2 {} --8---cut here---end---8--- leading to a report like --8---cut here---start-8--- 1 Task1 2 Task2 --8---cut here---end---8--- I must confess this is mostly a way to avoid questions from people looking at the report, asking why my task numbers are all 1.x :) Yeah that sucks. If there would be a way to make the numbers configurable in org that'd be even better. I am responsible for parts of a project, so there is an externally defined numbering in some cases. Bit I might go at this myself if your patches land, which look excellent BTW. Cheers, Simon AFAICT it seems to work fine with either tj2 or tj3. I'm using tj3 only myself, but the UI of tj2 doesn't complain at all about those multiple root tasks. Thanks, Yann
Re: [O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional
Simon Thum simon.t...@gmx.de writes: Bit I might go at this myself if your patches land, which look excellent BTW. The patches will land as soon as we the copyright assignment is processed. Chances are that this will be after Org 7.9 though, but equal chances are that 7.9.1 will closely follow 7.9, so please go ahead and hack. :) -- Bastien
Re: [O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional
Yann Hodique yann.hodi...@gmail.com writes: +(defcustom org-export-taskjuggler-keep-project-as-task t + Whether to keep the project headline as an umbrella task for + all declared tasks. Setting this to nil will allow maintaining + completely separated task buckets, while still sharing the same + resources pool. I'm trying to understand the use case here. If I understand correctly the container headline will no longer unconditionally generate a root task. So you could have multiple root tasks? Does this work in both versions of tj? Thanks Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland
[O] [PATCH 07/10] org-taskjuggler: make project umbrella task optional
introduce `org-export-taskjuggler-keep-project-as-task' as a flag to toggle the behavior. Keep old behavior as default. * org-taskjuggler.el (org-export-taskjuggler-keep-project-as-task): new custom variable (org-export-as-taskjuggler): optionally drop the topmost task (project) (org-taskjuggler-assign-task-ids): adapt path computation by optionally dropping the topmost component (project) --- lisp/org-taskjuggler.el | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el index 92ba79c..996665d 100644 --- a/lisp/org-taskjuggler.el +++ b/lisp/org-taskjuggler.el @@ -263,6 +263,14 @@ but before any resource and task declarations. the corresponding resource. :group 'org-export-taskjuggler) +(defcustom org-export-taskjuggler-keep-project-as-task t + Whether to keep the project headline as an umbrella task for + all declared tasks. Setting this to nil will allow maintaining + completely separated task buckets, while still sharing the same + resources pool. + :group 'org-export-taskjuggler + :type 'boolean) + ;;; Hooks (defvar org-export-taskjuggler-final-hook nil @@ -349,7 +357,10 @@ defined in `org-export-taskjuggler-default-reports'. (org-clone-local-variables old-buffer ^org-) (insert org-export-taskjuggler-default-global-header) - (org-taskjuggler-open-project (car tasks)) + (org-taskjuggler-open-project + (if org-export-taskjuggler-keep-project-as-task + (car tasks) +(pop tasks))) (insert org-export-taskjuggler-default-global-properties) (insert \n) (dolist (resource resources) @@ -364,7 +375,9 @@ defined in `org-export-taskjuggler-default-reports'. (org-taskjuggler-close-maybe level) (org-taskjuggler-open-task task) (setq org-export-taskjuggler-old-level level))) - (org-taskjuggler-close-maybe 1) + (org-taskjuggler-close-maybe + (if org-export-taskjuggler-keep-project-as-task + 1 2)) (org-taskjuggler-insert-reports) (save-buffer) (or (org-export-push-to-kill-ring TaskJuggler) @@ -445,7 +458,11 @@ a path to the current task. (push unique-id (car unique-ids)) (setcar path unique-id))) (push (cons unique-id unique-id) task) - (push (cons path (mapconcat 'identity (reverse path) .)) task) + (push (cons path + (mapconcat 'identity + (if org-export-taskjuggler-keep-project-as-task + (reverse path) +(cdr (reverse path))) .)) task) (setq previous-level level) (setq resolved-tasks (append resolved-tasks (list task))) -- 1.7.11.3