[O] Re: lisp/org-clock.el: Add param :properties to list properties in clocktable
> Bernt Hansen writes: > Thanks for the example. That helps a lot. I think posting this to Worg > would be very useful. Hi Bernt, I will do so if/when these patches get accepted ;) -- http://pft.github.com/
[O] Re: lisp/org-clock.el: Add param :properties to list properties in clocktable
Niels Giesen writes: > Bernt Hansen 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,
[O] Re: lisp/org-clock.el: Add param :properties to list properties in clocktable
Bernt Hansen 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
[O] Re: lisp/org-clock.el: Add param :properties to list properties in clocktable
Niels Giesen writes: > Here are a few patches to add property columns in clocktables. These > allow me e.g. to freely set different cost centers which is wanted @ > my work, and also possibly small descriptions. It is generically set > up so I reckon other people may find use in this too. > > The patches together add two parameters to the dynamic block line: > > : :properties ("prop-this" "prop-other") :inherit-props t > > The property columns will be added at the left side of the existing > columns; I did experiment with adding them to the right, but because > of the variable number of levels (being defined both by :maxlevel and > the actual number of found levels), that did not work out well. > > I used the parameter =:inherit-props= to set inheritance for > properties, as I have learned in the past that > =org-use-property-inheritance= should be used very sparingly. > Hi Niels, Could you provide a sample clock report using this patch to get a better idea of why you find this useful? Thanks, -- Bernt