emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Remaining Work Report


From: Sebastien Vauban
Subject: Re: [O] Remaining Work Report
Date: Thu, 03 May 2012 16:38:12 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (windows-nt)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]