From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lele Gaifax Subject: Preparing a cost estimate with Org Date: Thu, 24 Jan 2019 16:59:55 +0100 Message-ID: <87sgxi2ghw.fsf@metapensiero.it> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:41014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmhQL-0007Ry-2L for emacs-orgmode@gnu.org; Thu, 24 Jan 2019 11:00:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmhQF-0008P4-8Q for emacs-orgmode@gnu.org; Thu, 24 Jan 2019 11:00:13 -0500 Received: from [195.159.176.226] (port=50542 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmhQF-0008Mj-1M for emacs-orgmode@gnu.org; Thu, 24 Jan 2019 11:00:07 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gmhQC-000QMK-Ky for emacs-orgmode@gnu.org; Thu, 24 Jan 2019 17:00:04 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi all, I use Org to produce "cost estimate" documents: the goal is to keep in a single document a detailed log of what I'm asked to work on, the estimated effort, the estimated cost and the time I actually spend on each item. I'm already quite satisfied with the overall process and final result: I can quickly export it as an elegant PDF document and give it to my customer, who in turn accepts or rejects any single task, decisions that I bring back to the document as tags (or todo labels) on the headlines. For my current engagement, for several reasons I do not want to expose the actual timings to the customer. Given that I could not find a way to omit a particular column of a table, I opted to have two separated tables, one with the summary for my own pleasure inside a COMMENT section, and another with just the costs. This is a sample of what I came up: * COMMENT Efforts summary #+NAME: efforts #+BEGIN: columnview :id global :indent t :skip-empty-rows t :format "%40ITEM(Item) %13Effort(Effort){:} %CLOCKSUM(Work)" | Item | Effort | Work | |------------+--------+------| | Tasks | 3:00 | 0:47 | | \_ Task A | 1:00 | 0:19 | | \_ Task C | 2:00 | 0:28 | #+END: #+CONSTANTS: one_minute_cost=0.5 * Cost estimate | Item | Cost | |------------+------| | Tasks | 90 | | \_ Task A | 30 | | \_ Task C | 60 | #+TBLFM: $1='(identity remote(efforts, @@#$1))::$2='(round (* (org-duration-to-minutes (identity remote(efforts, @@#$2))) $one_minute_cost)) * Tasks ** Task A :PROPERTIES: :Effort: 1:00 :END: :LOGBOOK: CLOCK: [2019-01-24 gio 15:51]--[2019-01-24 gio 16:10] => 0:19 :END: ** Task B :REJ: :PROPERTIES: :Rejected-Effort: 2:00 :END: ** Task C :PROPERTIES: :Effort: 2:00 :END: :LOGBOOK: CLOCK: [2019-01-24 gio 15:11]--[2019-01-24 gio 15:39] => 0:28 :END: The only problem with this approach is that it requires a manual intervention to build the "cost estimate" table: first I recompute the "efforts" one with C-c C-c, then I copy its body to the other table, delete the third column and eventually do a C-c C-c on its TBLFM to recompute the costs. As you can see, "Task B" has been rejected by the customer, so I had to rename the associated effort property to remove it from the table. Is there a more efficient/automatic way to achieve a similar result? I mean, is there a way to a) keep a single table, but omit a particular column at export time or have the second table properly populated from the actual tasks tree as it happens for the first one b) filter out entries with a particular tag/property, so that I can keep the original estimate ? Thanks in advance for any hints, ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.