emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Remaining Work Report
@ 2012-03-19 13:33 Sebastien Vauban
  2012-03-22 14:33 ` Myles English
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastien Vauban @ 2012-03-19 13:33 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

#+COLUMNS: %40ITEM(Task) %6Effort(Estim.){:}

* Context

The question I'm trying to give an answer to is: *what's the remaining number
of hours (or days) to finish my project*?

I don't see obvious solutions for that question. And trials I've done
hereunder did not lead yet to satisfactory results.

Am I passing next to some more obvious solution?

* Development tasks
  :PROPERTIES:
  :ID:       fc314ab6-5bdc-4a2d-9c2d-d9aece03a864
  :END:

** DONE Task 1                                                          :Fred:
   :PROPERTIES:
   :Effort:   1:00
   :END:

** TODO Task 2

*** DONE Task 2a                                                        :Fred:
    :PROPERTIES:
    :Effort:   2:00
    :END:

*** TODO Task 2b                                                        :Sara:
    :PROPERTIES:
    :Effort:   4:00
    :END:

** TODO Task 3                                                          :Sara:
   :PROPERTIES:
   :Effort:   8:00
   :END:

* Reporting

I'd like to report remaining work, among others.

** Columnview

From the columnview, we can't do that, as there is no way to exclude some
lines, and hence no way to get the right total.

#+BEGIN: columnview :hlines 1 :id "fc314ab6-5bdc-4a2d-9c2d-d9aece03a864" :maxlevel 2
| Task                  | Estim. |
|-----------------------+--------|
| * Development tasks   |  15:00 |
| ** DONE Task 1 :Fred: |   1:00 |
| ** TODO Task 2        |   6:00 |
| ** TODO Task 3 :Sara: |   8:00 |
#+END:

** Propview

After a =(require 'org-collector)=, we can get a table similar to this one:

#+BEGIN: propview :id "fc314ab6-5bdc-4a2d-9c2d-d9aece03a864" :conds ((string= TODO "TODO")) :cols (ITEM Effort)
| ITEM           | Effort |
|----------------+--------|
| "TODO Task 2"  | "6:00" |
| "TODO Task 2b" | "4:00" |
| "TODO Task 3"  | "8:00" |
|----------------+--------|
|                |        |
#+END:

There is a good step in the right direction, in that I don't have anymore
headlines with keyword DONE appearing.

Though,

1. There is no total available, and summing such a table give false results
   (due to the string nature of the values?):

       | ITEM           | Effort |
       |----------------+--------|
       | "TODO Task 2"  | "6:00" |
       | "TODO Task 2b" | "4:00" |
       | "TODO Task 3"  | "8:00" |
       |----------------+--------|
       |                | 624    |
       #+TBLFM: @5$2=vsum(@-I..-II)

2. Exclusion of lines can be tricky, as shown above:

   - "project 2" is task 2a (DONE, 2 hours) + task 2b (TODO, 4 hours)
   - total of "project 2" tasks is 6 hours, then
   - "project 2" is not DONE yet, as task 2b is still TODO
   - but remaining time of "project 2" is 4 hours, not 6

   The fact that org-collector shows 6 hours is due to a mix:

   - "project" is still in state TODO,
   - we show tasks (or projects) up to level 2, with sub-tasks being /summed up/

3. Not giving a status keyword to the "project 2" does not solve anything: in
   this case, nothing would show up in org-collector's view.

I understand I could be misusing org-collector.

But that's not what I'm after: if there is an alternative way to be able to
report remaining work to be done on a project, please let me know.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Remaining Work Report
  2012-03-19 13:33 Remaining Work Report Sebastien Vauban
@ 2012-03-22 14:33 ` Myles English
  2012-03-24 14:28   ` Manish
  2012-05-03 14:38   ` Sebastien Vauban
  0 siblings, 2 replies; 7+ messages in thread
From: Myles English @ 2012-03-22 14:33 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode Mode


Hi Sebastian,

>> On Mon, 19 Mar 2012 14:33:17 +0100, Sebastien Vauban said:

  > #+COLUMNS: %40ITEM(Task) %6Effort(Estim.){:} * Context

  > The question I'm trying to give an answer to is: *what's the
  > remaining number of hours (or days) to finish my project*?

I have just been through this myself so I hope I will be able to help.

To exclude DONE items from the columnview I moved the Effort property
out of the way to the Old_Effort property when the state changes to
DONE:

,-----------------------------------------------------------------------------------------------
| (require 'org)                                                                                
| (defun my-move-effort-if-done ()                                                              
|     "For TOC style columnview table.  Don't want to include DONE                              
|   items in the TODO Effort column so copy Effort to Old_Effort                                
|   property"                                                                                   
|     (interactive)                                                                             
|     ( when (string= (org-get-todo-state) "DONE")                                              
|       (member (org-get-todo-state) org-done-keywords)                                         
|       ;; check if changing to DONE                                                            
|       (org-entry-put nil "Old_Effort" (org-get-effort))                                       
|       ;; get the :Effort: property                                                            
|       ;(message (format "Got: %s when changin to %s" ( org-get-effort ) (org-get-todo-state)))
|       (setq org-clock-effort (org-get-effort))                                                
|       (org-entry-delete nil "Effort")))                                                       
|                                                                                               
| (setq org-after-todo-state-change-hook nil)                                                   
|                                                                                               
| (add-hook 'org-after-todo-state-change-hook                                                   
|           'my-move-effort-if-done)                                                            
`-----------------------------------------------------------------------------------------------

Unlike your example I made heavy use of inline tasks and also wanted
heading numbers instead of asterisks, so that the final table looks like
a table of contents with estimated times remaining.  I had to do some
more things to achieve this and can elaborate if you like.

Myles

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

* Re: Remaining Work Report
  2012-03-22 14:33 ` Myles English
@ 2012-03-24 14:28   ` Manish
  2012-03-26 10:49     ` Myles English
  2012-05-03 14:38   ` Sebastien Vauban
  1 sibling, 1 reply; 7+ messages in thread
From: Manish @ 2012-03-24 14:28 UTC (permalink / raw)
  To: emacs-orgmode, Myles English; +Cc: Sebastien Vauban

> On Thu, Mar 22, 2012 at 8:03 PM, Myles English wrote:
>
> Hi Sebastian,
>
> >> On Mon, 19 Mar 2012 14:33:17 +0100, Sebastien Vauban said:
>
>  > #+COLUMNS: %40ITEM(Task) %6Effort(Estim.){:} * Context
>
>  > The question I'm trying to give an answer to is: *what's the
>  > remaining number of hours (or days) to finish my project*?
>
> I have just been through this myself so I hope I will be able to
> help.
>
> To exclude DONE items from the columnview I moved the Effort
> property out of the way to the Old_Effort property when the state
> changes to DONE:
>
> ,-----------------------------------------------------------------------------------------------
> | (require 'org)
> | (defun my-move-effort-if-done ()
> |     "For TOC style columnview table.  Don't want to include DONE
> |   items in the TODO Effort column so copy Effort to Old_Effort
> |   property"
> |     (interactive)
> |     ( when (string= (org-get-todo-state) "DONE")
> |       (member (org-get-todo-state) org-done-keywords)
> |       ;; check if changing to DONE
> |       (org-entry-put nil "Old_Effort" (org-get-effort))
> |       ;; get the :Effort: property
> |       ;(message (format "Got: %s when changin to %s" ( org-get-effort ) (org-get-todo-state)))
> |       (setq org-clock-effort (org-get-effort))
> |       (org-entry-delete nil "Effort")))
> |
> | (setq org-after-todo-state-change-hook nil)
> |
> | (add-hook 'org-after-todo-state-change-hook
> |           'my-move-effort-if-done)
> `-----------------------------------------------------------------------------------------------
>
> Unlike your example I made heavy use of inline tasks and also wanted
> heading numbers instead of asterisks, so that the final table looks
> like a table of contents with estimated times remaining.  I had to
> do some more things to achieve this and can elaborate if you like.
>

This is a very nice solution.  Please do elaborate on the other steps
when you have time.

Cheers!
-- 
Manish

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

* Re: Remaining Work Report
  2012-03-24 14:28   ` Manish
@ 2012-03-26 10:49     ` Myles English
  2012-03-26 13:03       ` Sebastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Myles English @ 2012-03-26 10:49 UTC (permalink / raw)
  To: Manish, emacs-orgmode Mode

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

>> On Sat, 24 Mar 2012 19:58:46 +0530, Manish  said:

  >> Unlike your example I made heavy use of inline tasks and also
  >> wanted heading numbers instead of asterisks, so that the final
  >> table looks like a table of contents with estimated times
  >> remaining.  I had to do some more things to achieve this and can
  >> elaborate if you like.
  >> 

  > This is a very nice solution.  Please do elaborate on the other
  > steps when you have time.

  > Cheers!  -- Manish

I hope this is not too OT for the OP.  The functions I used are in the
attached file and used like this:

#+BEGIN: columnview-toc :id file:myfile.org
#+END:

And that gives you a TOC plus inline tasks and times.  The accumulation
of inline task times didn't work until a patch was applied by Bastian at
the weekend.

The solution uses the older org-export-as-ascii which is why I had not
shared it until now, but if someone has the time...

Myles


[-- Attachment #2: myfuncs.el --]
[-- Type: application/emacs-lisp, Size: 23694 bytes --]

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

* Re: Remaining Work Report
  2012-03-26 10:49     ` Myles English
@ 2012-03-26 13:03       ` Sebastien Vauban
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastien Vauban @ 2012-03-26 13:03 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Myles,

Myles English wrote:
>>> On Sat, 24 Mar 2012 19:58:46 +0530, Manish  said:
>
>   >> Unlike your example I made heavy use of inline tasks and also
>   >> wanted heading numbers instead of asterisks, so that the final
>   >> table looks like a table of contents with estimated times
>   >> remaining.  I had to do some more things to achieve this and can
>   >> elaborate if you like.
>   >> 
>
>   > This is a very nice solution.  Please do elaborate on the other
>   > steps when you have time.
>
>   > Cheers!  -- Manish
>
> I hope this is not too OT for the OP.  The functions I used are in the
> attached file and used like this:
>
> #+BEGIN: columnview-toc :id file:myfile.org
> #+END:
>
> And that gives you a TOC plus inline tasks and times.  The accumulation
> of inline task times didn't work until a patch was applied by Bastian at
> the weekend.
>
> The solution uses the older org-export-as-ascii which is why I had not
> shared it until now, but if someone has the time...

Thanks for all the information you've sent. I've not had the time yet to dig
into it. I'll clearly do, and report any trouble.

Thanks a lot.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Remaining Work Report
  2012-03-22 14:33 ` Myles English
  2012-03-24 14:28   ` Manish
@ 2012-05-03 14:38   ` Sebastien Vauban
       [not found]     ` <87havhk5qn.fsf@gmail.com>
  1 sibling, 1 reply; 7+ messages in thread
From: Sebastien Vauban @ 2012-05-03 14:38 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Myles,

Myles English wrote:
>>> On Mon, 19 Mar 2012 14:33:17 +0100, Sebastien Vauban said:
>
>   > #+COLUMNS: %40ITEM(Task) %6Effort(Estim.){:}
>
>   > The question I'm trying to give an answer to is: *what's the
>   > remaining number of hours (or days) to finish my project*?
>
> I have just been through this myself so I hope I will be able to help.
>
> To exclude DONE items from the columnview I moved the Effort property out of
> the way to the Old_Effort property when the state changes to DONE:
>
> ,-----------------------------------------------------------------------------------------------
> | (require 'org)                                                                                
> | (defun my-move-effort-if-done ()                                                              
> |     "For TOC style columnview table.  Don't want to include DONE                              
> |   items in the TODO Effort column so copy Effort to Old_Effort                                
> |   property"                                                                                   
> |     (interactive)                                                                             
> |     ( when (string= (org-get-todo-state) "DONE")                                              
> |       (member (org-get-todo-state) org-done-keywords)                                         
> |       ;; check if changing to DONE                                                            
> |       (org-entry-put nil "Old_Effort" (org-get-effort))                                       
> |       ;; get the :Effort: property                                                            
> |       ;(message (format "Got: %s when changin to %s" ( org-get-effort ) (org-get-todo-state)))
> |       (setq org-clock-effort (org-get-effort))                                                
> |       (org-entry-delete nil "Effort")))                                                       
> |                                                                                               
> | (setq org-after-todo-state-change-hook nil)                                                   
> |                                                                                               
> | (add-hook 'org-after-todo-state-change-hook                                                   
> |           'my-move-effort-if-done)                                                            
> `-----------------------------------------------------------------------------------------------
>
> Unlike your example I made heavy use of inline tasks and also wanted heading
> numbers instead of asterisks, so that the final table looks like a table of
> contents with estimated times remaining. I had to do some more things to
> achieve this and can elaborate if you like.

I finally spend some time to look at your answer, and give a feedback.

First, I really thank you for your answer. It really is interesting to see how
others tackle with the same (kind of) problem.

Second, about your "workaround". It does not satisfy me (renaming the property
Effort to Old_Effort upon transition change to DONE)[1] because:

- What happens if you reopen the task, clock some time on it, and close it?
  A new move of the property will occur, with a nil (hence, null?) value?
  Your Old_Effort will be overwritten?

- My goal is to show, in a table, the progress made on all tasks (TODO, STRT,
  DONE), and moreover to compare "spent time" (CLOCK) vs "estimated time"
  (Effort). Hence, I need to have the effort property at all times[2].

Do you have, maybe, an alternative way for those?

Best regards,
  Seb

[1] Though, it's a nice idea...

[2] Or I would need to complexify the table report, and search for Old_Effort,
then (if not found) search for Effort. I'm scared of having as well entries
with the 2 different properties, because of a mistake when quickly editing
(via C-c C-x e, for example).

-- 
Sebastien Vauban

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

* Re: Remaining Work Report
       [not found]     ` <87havhk5qn.fsf@gmail.com>
@ 2012-05-15 14:39       ` Myles English
  0 siblings, 0 replies; 7+ messages in thread
From: Myles English @ 2012-05-15 14:39 UTC (permalink / raw)
  To: emacs-orgmode Mode; +Cc: Sebastien Vauban


Forgot to copying this to the list:

>> On Tue, 15 May 2012 13:07:12 +0100, Myles English said:

  > Hi Sebastian,

I mean 'Sebastien'.

  > Sorry it has taken a long time to reply; I have been customising my
  > emacs, or has it been customising me...?

>> On Thu, 03 May 2012 16:38:12 +0200, Sebastien Vauban said:

  >> Hi Myles,
  >> Myles English wrote:
  >>>>> On Mon, 19 Mar 2012 14:33:17 +0100, Sebastien Vauban said:
  
  >>> > The question I'm trying to give an answer to is: *what's the
  >>> > remaining number of hours (or days) to finish my project*?

  > So that is your goal.
 
  >>> To exclude DONE items from the columnview I moved the Effort property out of
  >>> the way to the Old_Effort property when the state changes to DONE:

  > [function snipped]

  >>> Unlike your example I made heavy use of inline tasks and also wanted heading
  >>> numbers instead of asterisks, so that the final table looks like a table of
  >>> contents with estimated times remaining. I had to do some more things to
  >>> achieve this and can elaborate if you like.

  >> I finally spend some time to look at your answer, and give a feedback.

  >> First, I really thank you for your answer. It really is interesting to see how
  >> others tackle with the same (kind of) problem.

  > You're welcome.  It helps to justify the amount of time I spent on it if
  > I can share it with someone else.

  >> Second, about your "workaround". It does not satisfy me (renaming the property
  >> Effort to Old_Effort upon transition change to DONE)[1] because:

  >> - What happens if you reopen the task, clock some time on it, and close it?
  >> A new move of the property will occur, with a nil (hence, null?) value?
  >> Your Old_Effort will be overwritten?

  > Yes something like that, the function I posted is not consistent or
  > even reliable really.  It was intended as a starting point.

  >> - My goal is to show, in a table, the progress made on all tasks (TODO, STRT,
  >> DONE), and moreover to compare "spent time" (CLOCK) vs "estimated time"
  >> (Effort). Hence, I need to have the effort property at all times[2].

  > Okay so your goal has changed and looks like it would be approximately
  > double the work of what I needed.  When you reopen a task presumably you
  > would re-estimate the effort too which could lead to complications.  You
  > could may be consider never reopening a task and always starting a new
  > one?

  >> Do you have, maybe, an alternative way for those?

  > No, but if you look at the functions I sent originally and diff them
  > against the org- functions mentioned in their descriptions then you will
  > see what I had to change, which was not that much really, and maybe you
  > can build on it.

  > I would be interested to hear if you make something great with this.

  > -- 
  >   `--[ Myles ]

-- 
  `--[ Myles ]

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

end of thread, other threads:[~2012-05-15 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 13:33 Remaining Work Report Sebastien Vauban
2012-03-22 14:33 ` Myles English
2012-03-24 14:28   ` Manish
2012-03-26 10:49     ` Myles English
2012-03-26 13:03       ` Sebastien Vauban
2012-05-03 14:38   ` Sebastien Vauban
     [not found]     ` <87havhk5qn.fsf@gmail.com>
2012-05-15 14:39       ` Myles English

Code repositories for project(s) associated with this 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).