From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Francesco Pizzolante" Subject: Re: Record extra info for each time block Date: Tue, 07 Apr 2009 11:54:08 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Matthew Lundin's message of "Mon, 06 Apr 2009 14:50:34 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: mailing-list-org-mode Hi Matthew, First of all, thanks for your quick answer. >> But sometimes, you also need to record some other information related >> to that time block, for example, the distance you had to drive to go >> to the meeting or some costs (like parking costs) that you had to pay >> for it. >> >> Example: >> >> * Project1 >> ** Meetings >> :LOGBOOK: >> CLOCK: [2009-03-02 mon. 10:00]--[2009-03-02 mon. 12:30] => 2:30 >> ----> 15 kilometers >> CLOCK: [2009-03-03 tue. 09:30]--[2009-03-03 tue. 12:30] => 3:00 >> ----> 15 kilometers + 12,00 EUR >> :END: >> >> Is there a way to record this information? If not, what is your >> advice? >> > > You could also record this information as properties. E.g., > > ,---- > | * Meetings > | :PROPERTIES: > | :COLUMNS: %30ITEM %CLOCKSUM %10distance{+} %10expenses{$} > | :END: > | ** Meeting One > | :LOGBOOK: > | CLOCK: [2009-04-06 Mon 13:25]--[2009-04-06 Mon 14:37] => 1:12 > | :END: > | :PROPERTIES: > | :distance: 15 > | :expenses: 13.45 > | :END: > | > | ** Meeting Two > | :LOGBOOK: > | CLOCK: [2009-04-06 Mon 16:41]--[2009-04-06 Mon 18:41] => 2:00 > | :END: > | :PROPERTIES: > | :distance: 28 > | :expenses: 22.31 > | :END: > | > `---- > >> Of course, it would be nice to get a final table with everything >> summed up: total work, total kilometers, total fees. > > If you add a column line (as in the example above) you can use column > view (C-c C-x C-c) to get a nice overview with everything summed up in the top > heading. Or you could capture the data in a table (C-x C-c i). E.g., > > ,---- > | ** Summary > | #+BEGIN: columnview :hlines 1 :id local > | | ITEM | CLOCKSUM | distance | expenses | > | |----------------+----------+----------+----------| > | | * Meetings | 3:12 | 43 | 35.76 | > | | ** Meeting One | 1:12 | 15 | 13.45 | > | | ** Meeting Two | 2:00 | 28 | 22.31 | > | #+END: > `---- Your solution is nice and works but it doesn't fit all my needs: the distance and expense information are recorded for a headline but it is not related to a specific "time block". When I think a little further, I realize that it would be great to attach information to "time blocks". Here's, in more details, what I'd like to have. The idea is to generate 2 views from the same set of information: the first view would be a "per project" view and a second one, a "per day" view. Let's take an example. Let's assume that we have the following headline view (with new attributes associated to each time block, in an imaginary syntax): --8<---------------cut here---------------start------------->8--- * Work for April 2009 *** Project 1 This is project 1. ***** Task 11 This is task 11. :LOGBOOK: CLOCK: [2009-04-06 mon. 10:00]--[2009-04-06 mon. 12:30] => 2:30 + expense 10.00 CLOCK: [2009-04-06 mon. 13:00]--[2009-04-06 mon. 14:00] => 1:00 + distance 15 :END: ***** Task 12 This is task 12. :LOGBOOK: CLOCK: [2009-04-06 mon. 08:00]--[2009-04-06 mon. 10:00] => 2:00 + distance 5 :END: *** Project 2 This is project 2. ***** Task 21 This is task 21. :LOGBOOK: CLOCK: [2009-04-06 mon. 15:00]--[2009-04-06 mon. 17:00] => 2:00 :END: ***** Task 22 This is task 22. :LOGBOOK: CLOCK: [2009-04-06 mon. 14:00]--[2009-04-06 mon. 15:00] => 1:00 :END: *** Project3 This is project 3. ***** Task 31 This is task 31. :LOGBOOK: CLOCK: [2009-04-07 tue. 08:00]--[2009-04-07 tue. 11:30] => 3:30 + expense 10.00 + distance 5 :END: --8<---------------cut here---------------end--------------->8--- This project view is very important as it is the main view for time clocking on a per project basis. >From this single view, I would like to be able to generate 2 kinds of exportable tables (in LaTex or other documents -- not an overlay solution like column view). The first one would be a summary per project for April 2009 and would be mainly used by project managers. --8<---------------cut here---------------start------------->8--- |-----------------------+-------+----------+----------| | Description | Work | Distance | Expenses | |-----------------------+-------+----------+----------| | * Work for April 2009 | 12:00 | 25 | 20.00 | |-----------------------+-------+----------+----------| | *** Project 1 | 5:30 | 20 | 10.00 | | ***** Task 11 | 3:30 | 15 | 10.00 | | ***** Task 12 | 2:00 | 5 | | | *** Project 2 | 3:00 | | | | ***** Task 21 | 2:00 | | | | ***** Task 22 | 1:00 | | | | *** Project 3 | 3:30 | 5 | 10.00 | | ***** Task 31 | 3:30 | 5 | 10.00 | | | | | | |-----------------------+-------+----------+----------| --8<---------------cut here---------------end--------------->8--- The second one would be a summary per day for the same month and would be mainly used by a HR manager: --8<---------------cut here---------------start------------->8--- |------------+-------+-------+----------+----------| | Date | Work | Extra | Distance | Expenses | |------------+-------+-------+----------+----------| | Total | 12:00 | -4:00 | 25 | 20.00 | |------------+-------+-------+----------+----------| | 2009-04-06 | 8:30 | 0:30 | 20 | 10.00 | | 2009-04-07 | 3:30 | -4:30 | 5 | 10.00 | |------------+-------+-------+----------+----------| --8<---------------cut here---------------end--------------->8--- Note, in this view, the "Extra" column where we would record the extra (or work per day. For the moment, I'm able to generate the first kind of table thanks to a dynamic block which captures a column view. But I'm not able to generate the second one. Do you have any suggestions on how to achieve that? Thanks, Francesco _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode