[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Preparing a cost estimate with Org
From: |
Lele Gaifax |
Subject: |
[O] Preparing a cost estimate with Org |
Date: |
Thu, 24 Jan 2019 16:59:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
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.
address@hidden | -- Fortunato Depero, 1929.
- [O] Preparing a cost estimate with Org,
Lele Gaifax <=