emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Remaining Work Report
Date: Thu, 03 May 2012 16:38:12 +0200	[thread overview]
Message-ID: <80zk9ppbxn.fsf@somewhere.org> (raw)
In-Reply-To: 87limshfif.fsf@gmail.com

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

  parent reply	other threads:[~2012-05-03 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [not found]     ` <87havhk5qn.fsf@gmail.com>
2012-05-15 14:39       ` Myles English

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80zk9ppbxn.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).