emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Niels Giesen <niels.giesen@gmail.com>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: lisp/org-clock.el: Add param :properties to list properties in clocktable
Date: Sun, 27 Mar 2011 12:13:41 +0200	[thread overview]
Message-ID: <87bp0w6fca.fsf@gmail.com> (raw)
In-Reply-To: <87y641ehep.fsf@norang.ca> (Bernt Hansen's message of "Sat, 26 Mar 2011 16:49:34 -0400")

Bernt Hansen <bernt@norang.ca> writes:

[...]

> Could you provide a sample clock report using this patch to get a
> better idea of why you find this useful?

Yes, here you are, along with the contents of a sample file, so that you
may get a gist of my need for inheritance.

* Clocktables
  #+BEGIN: clocktable :maxlevel 2 :scope file :properties ("Costcenter" "Billable") :inherit-props t
  Clock summary at [2011-03-27 Sun 12:04]
  
  | Costcenter                        | Billable | Headline                        |   Time |      |
  |-----------------------------------+----------+---------------------------------+--------+------|
  |                                   |          | *Total time*                    | *3:08* |      |
  |-----------------------------------+----------+---------------------------------+--------+------|
  | A-102: General Administration     |          | TODO Travel cost declaration    |   0:42 |      |
  | A-102: General Administration     |          | TODO December 2007-2009         |        | 0:37 |
  | O-100: General overhead           |          | Making coffee for the lot of us |   0:06 |      |
  | C-100: Customer relations general |          | Helpdesk                        |   1:10 |      |
  | C-100: Customer relations general |          | Categorize our helpdesk e-mails |        | 0:20 |
  | C-101: Customer A                 | [X]      | Help out customer a             |        | 0:10 |
  | C-102: Customer B                 | [?]      | Help out customer b on issue x  |        | 0:20 |
  | C-100: Customer relations general |          | Help out potential customer c   |        | 0:20 |
  | W-100: Web Development            |          | Develop our main web app        |   1:10 |      |
  | W-100: Web Development            |          | that                            |        | 0:41 |
  | C-102: Customer B                 | [?]      | something only customer b wants |        | 0:29 |
  #+END:

Actually, my boss needs something more like the table below, which I
can export to something that Outlook Times also spits out (some
clocking plugin for MS Outlook that the rest of us uses, and I was
supposed to use too, you may understand that that is just a silly idea
for someone used to org-mode).

Patches 1 and 3 allowed me to get this specific output using a custom
formatter and a #+TBLFM: line, which I may post to Worg if people are
interested.

#+BEGIN: clocktable :formatter org-clocktable-write-outlook-times-style :maxlevel 2 :scope file :inherit-props t :properties ("Costcenter" "Billable") :date t :block day
Clock summary at [2011-03-27 Sun 12:04], for Sunday, March 27, 2011.

|       Date | Headline                                                  |   Time | Costcenter                        | Billable |
|------------+-----------------------------------------------------------+--------+-----------------------------------+----------|
|            | *Total time*                                              | *3.05* |                                   |          |
|------------+-----------------------------------------------------------+--------+-----------------------------------+----------|
| 27-03-2011 | TODO Travel cost declaration                              |   0.00 | A-102: General Administration     |          |
| 27-03-2011 | TODO Travel cost declaration, TODO December 2007-2009     |   0.62 | A-102: General Administration     |          |
|------------+-----------------------------------------------------------+--------+-----------------------------------+----------|
| 27-03-2011 | Making coffee for the lot of us                           |   0.10 | O-100: General overhead           |          |
|------------+-----------------------------------------------------------+--------+-----------------------------------+----------|
| 27-03-2011 | Helpdesk                                                  |   0.00 | C-100: Customer relations general |          |
| 27-03-2011 | Helpdesk, Categorize our helpdesk e-mails                 |   0.33 | C-100: Customer relations general |          |
| 27-03-2011 | Helpdesk, Help out customer a                             |   0.17 | C-101: Customer A                 | [X]      |
| 27-03-2011 | Helpdesk, Help out customer b on issue x                  |   0.33 | C-102: Customer B                 | [?]      |
| 27-03-2011 | Helpdesk, Help out potential customer c                   |   0.33 | C-100: Customer relations general |          |
|------------+-----------------------------------------------------------+--------+-----------------------------------+----------|
| 27-03-2011 | Develop our main web app                                  |   0.00 | W-100: Web Development            |          |
| 27-03-2011 | Develop our main web app, that                            |   0.68 | W-100: Web Development            |          |
| 27-03-2011 | Develop our main web app, something only customer b wants |   0.48 | C-102: Customer B                 | [?]      |
#+TBLFM: $2='(if (string= "$0" "@-I") "$0" (concat "@-I" ", " "$0"));L::$4='(if (string= "$0" "") "@-I" "$0");L
#+END:
* TODO Travel cost declaration
  DEADLINE: <2011-04-01 vr .+1m>
  - State "DONE"       from "TESTING"    [2011-02-01 di 10:02]
  :LOGBOOK:
  CLOCK: [2011-03-02 wo 09:17]--[2011-03-02 wo 09:22] =>  0:05
  :END:
  - State "DONE"       from "TESTING"    [2011-01-04 di 09:40]
  :PROPERTIES:
  :COSTCENTER: A-102: General Administration
  :END:
** TODO December 2007-2009
   :CLOCK:
   CLOCK: [2011-03-27 Sun 09:28]--[2011-03-27 Sun 10:05] =>  0:37
   :END:
   Find out what were my costs during this hazy period of my life.
   
   
* Dishes                                                              :daily:
  :PROPERTIES:
  :COSTCENTER: O-100: General overhead
  :END:
* Making coffee for the lot of us                                     :daily:
  :CLOCK:
  CLOCK: [2011-03-27 Sun 09:22]--[2011-03-27 Sun 09:28] =>  0:06
  :END:
  :PROPERTIES:
  :COSTCENTER: O-100: General overhead
  :END:
* Helpdesk  
  :PROPERTIES:
  :COSTCENTER: C-100: Customer relations general
  :END:
** Categorize our helpdesk e-mails                                    :daily:
   :CLOCK:
   CLOCK: [2011-03-27 Sun 10:05]--[2011-03-27 Sun 10:25] =>  0:20
   :END:
** Help out customer a
   :CLOCK:
   CLOCK: [2011-03-27 Sun 10:25]--[2011-03-27 Sun 10:35] =>  0:10
   :END:
  :PROPERTIES:
  :COSTCENTER: C-101: Customer A
  :BILLABLE: [X]
  :END:
** Help out customer b on issue x
   :CLOCK:
   CLOCK: [2011-03-27 Sun 10:35]--[2011-03-27 Sun 10:55] =>  0:20
   :END:
  :PROPERTIES:
  :COSTCENTER: C-102: Customer B
  :BILLABLE: [?]
  :END:
** Help out potential customer c
   :CLOCK:
   CLOCK: [2011-03-27 Sun 10:55]--[2011-03-27 Sun 11:15] =>  0:20
   :END:
   Does not yet have a cost center
* Develop our main web app
   :PROPERTIES:
   :COSTCENTER: W-100: Web Development
   :END:
** this

** that
   :CLOCK:
   CLOCK: [2011-03-27 Sun 11:44]--[2011-03-27 Sun 12:25] =>  0:45
   :END:
   
** something only customer b wants
   :CLOCK:
   CLOCK: [2011-03-27 Sun 11:15]--[2011-03-27 Sun 11:44] =>  0:29
   :END:
  :PROPERTIES:
  :COSTCENTER: C-102: Customer B
  :BILLABLE: [?]
  :END:
   


>
> Thanks,

-- 
http://pft.github.com/

  reply	other threads:[~2011-03-27 10:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 20:29 lisp/org-clock.el: Add param :properties to list properties in clocktable Niels Giesen
2011-03-26 20:49 ` Bernt Hansen
2011-03-27 10:13   ` Niels Giesen [this message]
2011-03-27 12:13     ` Bernt Hansen
2011-03-28 18:24       ` Niels Giesen
2011-05-02  9:33 ` Carsten Dominik
2011-05-13  8:00   ` Niels Giesen
2011-05-13  8:03     ` Carsten Dominik
2011-05-13 12:19     ` [Accepted] " Carsten Dominik
2011-06-08 19:41       ` [PATCH] Fix reported file time for clock reports Bernt Hansen
2011-05-13 12:20     ` lisp/org-clock.el: Add param :properties to list properties in clocktable Carsten Dominik
2011-05-13 12:35       ` Giovanni Ridolfi
2011-05-18  7:08       ` Niels Giesen
2011-05-18  8:43         ` Giovanni Ridolfi

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=87bp0w6fca.fsf@gmail.com \
    --to=niels.giesen@gmail.com \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.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).