emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Time computation errors
@ 2009-04-07 12:29 Francesco Pizzolante
  2009-04-07 13:24 ` Bernt Hansen
  2009-04-07 22:37 ` Daniel Clemente
  0 siblings, 2 replies; 7+ messages in thread
From: Francesco Pizzolante @ 2009-04-07 12:29 UTC (permalink / raw)
  To: mailing-list-org-mode

Hi,

Going on in discovering org-mode, I found 2 problems when trying
to make computations on times.

Consider the following example:

--8<---------------cut here---------------start------------->8---
* Test
#+COLUMNS: %25ITEM(Description)  %Time1{:} %Time2{:} %Time3{:}

#+BEGIN: columnview :hlines 1 :id local
| Description | Time1 | Time2 | Time3  |
|-------------+-------+-------+--------|
| * Test      |  3:30 |  3:00 | #ERROR |
| *** Item 1  | -1:30 |  1:00 | #ERROR |
| *** Item 2  |  4:00 |  2:00 | #ERROR |
#+TBLFM: $4=$2+$3
#+END:

*** Item 1
    :PROPERTIES:
    :Time1:    -1:30
    :Time2:    1:00
    :END:

*** Item 2
    :PROPERTIES:
    :Time1:    4:00
    :Time2:    2:00
    :END:
--8<---------------cut here---------------end--------------->8---


Problems:

1) The sum of Time1 for Test headline is wrong: 3:30 instead of
   2:30;

2) I'm unable to sum times through a formula (see Time3 column).
   The same formula works perfectly when you replace times with
   integers.

Any feedback is welcome.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time computation errors
  2009-04-07 12:29 Time computation errors Francesco Pizzolante
@ 2009-04-07 13:24 ` Bernt Hansen
       [not found]   ` <87skkktx4n.fsf-EZCVE/ZCkfKiJtKbxSCZYZ53EReGIhmS@public.gmane.org>
  2009-04-07 22:37 ` Daniel Clemente
  1 sibling, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2009-04-07 13:24 UTC (permalink / raw)
  To: Francesco Pizzolante; +Cc: mailing-list-org-mode



"Francesco Pizzolante"
<fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org> writes:

> Consider the following example:
>
> --8<---------------cut here---------------start------------->8---
> * Test
> #+COLUMNS: %25ITEM(Description)  %Time1{:} %Time2{:} %Time3{:}
>
> #+BEGIN: columnview :hlines 1 :id local
> | Description | Time1 | Time2 | Time3  |
> |-------------+-------+-------+--------|
> | * Test      |  3:30 |  3:00 | #ERROR |
> | *** Item 1  | -1:30 |  1:00 | #ERROR |
> | *** Item 2  |  4:00 |  2:00 | #ERROR |
> #+TBLFM: $4=$2+$3
> #+END:
>
> *** Item 1
>     :PROPERTIES:
>     :Time1:    -1:30
>     :Time2:    1:00
>     :END:
>
> *** Item 2
>     :PROPERTIES:
>     :Time1:    4:00
>     :Time2:    2:00
>     :END:
> --8<---------------cut here---------------end--------------->8---
>
>
> Problems:
>
> 1) The sum of Time1 for Test headline is wrong: 3:30 instead of
>    2:30;
>
> 2) I'm unable to sum times through a formula (see Time3 column).
>    The same formula works perfectly when you replace times with
>    integers.
>
> Any feedback is welcome.

I don't believe negative times are supported currently.

-Bernt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time computation errors
       [not found]   ` <87skkktx4n.fsf-EZCVE/ZCkfKiJtKbxSCZYZ53EReGIhmS@public.gmane.org>
@ 2009-04-07 14:12     ` Francesco Pizzolante
  2009-04-07 15:32       ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Francesco Pizzolante @ 2009-04-07 14:12 UTC (permalink / raw)
  To: mailing-list-org-mode

Hi Bernt,

Thanks for your answer.

>> Consider the following example:
>>
>> --8<---------------cut here---------------start------------->8---
>> * Test
>> #+COLUMNS: %25ITEM(Description)  %Time1{:} %Time2{:} %Time3{:}
>>
>> #+BEGIN: columnview :hlines 1 :id local
>> | Description | Time1 | Time2 | Time3  |
>> |-------------+-------+-------+--------|
>> | * Test      |  3:30 |  3:00 | #ERROR |
>> | *** Item 1  | -1:30 |  1:00 | #ERROR |
>> | *** Item 2  |  4:00 |  2:00 | #ERROR |
>> #+TBLFM: $4=$2+$3
>> #+END:
>>
>> *** Item 1
>>     :PROPERTIES:
>>     :Time1:    -1:30
>>     :Time2:    1:00
>>     :END:
>>
>> *** Item 2
>>     :PROPERTIES:
>>     :Time1:    4:00
>>     :Time2:    2:00
>>     :END:
>> --8<---------------cut here---------------end--------------->8---
>>
>>
>> Problems:
>>
>> 1) The sum of Time1 for Test headline is wrong: 3:30 instead of
>>    2:30;
>>
>> 2) I'm unable to sum times through a formula (see Time3 column).
>>    The same formula works perfectly when you replace times with
>>    integers.
>>
>> Any feedback is welcome.
>
> I don't believe negative times are supported currently.

You are probably right. The fact is that:

1) when you clock in and out, you can get negative durations (I
   know, it seems weird...) and then your clock table is wrong
   (negative duration are not taken into account when
   calculating the sums). Anyway, I think it should be good to
   support negative durations in order, for example, to compute
   differences between durations (which can lead to positive or
   negative times);

2) I'm still unable to sum positive times value in my table (see
   my problem 2) in my previous email). Is there a specific
   operator in order to sum times?

Thanks,
F.


_______________________________________________
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time computation errors
  2009-04-07 14:12     ` Francesco Pizzolante
@ 2009-04-07 15:32       ` Bernt Hansen
       [not found]         ` <87d4botr7v.fsf-EZCVE/ZCkfKiJtKbxSCZYZ53EReGIhmS@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2009-04-07 15:32 UTC (permalink / raw)
  To: Francesco Pizzolante; +Cc: mailing-list-org-mode



"Francesco Pizzolante"
<fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org> writes:

>>> Problems:
>>>
>>> 1) The sum of Time1 for Test headline is wrong: 3:30 instead of
>>>    2:30;
>>>
>>> 2) I'm unable to sum times through a formula (see Time3 column).
>>>    The same formula works perfectly when you replace times with
>>>    integers.
>>>
>>> Any feedback is welcome.
>>
>> I don't believe negative times are supported currently.
>
> You are probably right. The fact is that:
>
> 1) when you clock in and out, you can get negative durations (I
>    know, it seems weird...) and then your clock table is wrong
>    (negative duration are not taken into account when
>    calculating the sums). Anyway, I think it should be good to
>    support negative durations in order, for example, to compute
>    differences between durations (which can lead to positive or
>    negative times);

How do you get negative times by clocking in and out?  The only way I
can think of that you can get negative time is if you edit the clocked
values after they are created.  By definition you have to clock in
_before_ you clock out (right?) so everything clocked should be 0
minutes or positive.  Am I missing something?

> 2) I'm still unable to sum positive times value in my table (see
>    my problem 2) in my previous email). Is there a specific
>    operator in order to sum times?

I'm not sure what the answer to this is.  I use the clocking features to
summarize time spent working on tasks in clock reports only and I've
never had the need to deal with negative values or summing clocked
values manually in a table.

Maybe other users have experience with summing times in tables outside
of clock reports?

-Bernt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time computation errors
  2009-04-07 12:29 Time computation errors Francesco Pizzolante
  2009-04-07 13:24 ` Bernt Hansen
@ 2009-04-07 22:37 ` Daniel Clemente
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Clemente @ 2009-04-07 22:37 UTC (permalink / raw)
  To: Francesco Pizzolante; +Cc: mailing-list-org-mode

El mar, abr 07 2009, Francesco Pizzolante va escriure:
> Consider the following example:
>
> | Description | Time1 | Time2 | Time3  |
> |-------------+-------+-------+--------|
> | * Test      |  3:30 |  3:00 | #ERROR |
> | *** Item 1  | -1:30 |  1:00 | #ERROR |
> | *** Item 2  |  4:00 |  2:00 | #ERROR |
> #+TBLFM: $4=$2+$3

  The problem is that calc (the package used by org-mode to do math calculations) sees 3:30 as a fraction: three thirtieths = 3/30 = 1/10 = 0.1

>
> 1) The sum of Time1 for Test headline is wrong: 3:30 instead of
>    2:30;
>
  (-1/30) + (4/30) = (-1+4)/30 = -3/30 → -3:30


> 2) I'm unable to sum times through a formula (see Time3 column).
>    The same formula works perfectly when you replace times with
>    integers.
>
  3:00 is 3/0 and gives an error (as a fraction it is „bad format“ to calc, not infinite…).


  You can do more tests with: M-x calc RET


  According to the Calc manual:
The default format for HMS values is `hours@ mins' secs"'.


  So this makes calc happy:

| Description | Time1   | Time2  | Time3       |
|-------------+---------+--------+-------------|
| * Test      | 3@ 30'  | 3@ 00' | 6@ 30' 0"   |
| *** Item 1  | -1@ 30' | 1@ 00' | -1@ -30' 0" |
| *** Item 2  | 4@ 00'  | 2@ 00' | 6@ 0' 0"    |
#+TBLFM: $4=$2+$3


  (The negative time is however incorrect).

  I think it will be easier to use directly forms like 00:30 or the <2009-04-08 mié 00:33> from org-mode, and make your own functions from there.
  Anyway, org tracks more times and dates than fractions, so 00:30 could be also understood by org as a time.


-- Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time computation errors
       [not found]         ` <87d4botr7v.fsf-EZCVE/ZCkfKiJtKbxSCZYZ53EReGIhmS@public.gmane.org>
@ 2009-04-08  6:46           ` Francesco Pizzolante
  2009-04-08 14:48             ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Francesco Pizzolante @ 2009-04-08  6:46 UTC (permalink / raw)
  To: mailing-list-org-mode

Bernt Hansen,

Bernt Hansen wrote:
> "Francesco Pizzolante"
> <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org> writes:
>
>>>> Problems:
>>>>
>>>> 1) The sum of Time1 for Test headline is wrong: 3:30 instead of
>>>>    2:30;
>>>>
>>>> 2) I'm unable to sum times through a formula (see Time3 column).
>>>>    The same formula works perfectly when you replace times with
>>>>    integers.
>>>>
>>>> Any feedback is welcome.
>>>
>>> I don't believe negative times are supported currently.
>>
>> You are probably right. The fact is that:
>>
>> 1) when you clock in and out, you can get negative durations (I
>>    know, it seems weird...) and then your clock table is wrong
>>    (negative duration are not taken into account when
>>    calculating the sums). Anyway, I think it should be good to
>>    support negative durations in order, for example, to compute
>>    differences between durations (which can lead to positive or
>>    negative times);
>
> How do you get negative times by clocking in and out?  The only way I
> can think of that you can get negative time is if you edit the clocked
> values after they are created.  By definition you have to clock in
> _before_ you clock out (right?) so everything clocked should be 0
> minutes or positive.  Am I missing something?

Not at all, you're right: you only get negative times when you
manually edit your clocks.


>> 2) I'm still unable to sum positive times value in my table (see
>>    my problem 2) in my previous email). Is there a specific
>>    operator in order to sum times?
>
> I'm not sure what the answer to this is.  I use the clocking features to
> summarize time spent working on tasks in clock reports only and I've
> never had the need to deal with negative values or summing clocked
> values manually in a table.
>
> Maybe other users have experience with summing times in tables outside
> of clock reports?

On example could be to determine the difference between the
estimated effort and the time really spent. You would
necessarily end up with negative durations (supposing that some
asks took less time than the estimated effort).

Does it make sense?

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time computation errors
  2009-04-08  6:46           ` Francesco Pizzolante
@ 2009-04-08 14:48             ` Bernt Hansen
  0 siblings, 0 replies; 7+ messages in thread
From: Bernt Hansen @ 2009-04-08 14:48 UTC (permalink / raw)
  To: Francesco Pizzolante; +Cc: mailing-list-org-mode



"Francesco Pizzolante"
<fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org> writes:

> Bernt Hansen wrote:
>>
>> I'm not sure what the answer to this is.  I use the clocking features to
>> summarize time spent working on tasks in clock reports only and I've
>> never had the need to deal with negative values or summing clocked
>> values manually in a table.
>>
>> Maybe other users have experience with summing times in tables outside
>> of clock reports?
>
> On example could be to determine the difference between the
> estimated effort and the time really spent. You would
> necessarily end up with negative durations (supposing that some
> asks took less time than the estimated effort).
>
> Does it make sense?

I don't personally use the clocking information like that.  I just make
3 columns - one for the quoted time (estimated effort) I sent to the
customer, one for the estimated effort which may changed during work on
the project and one for clocked time side by side.

I also snapshot the estimate for the project before starting work with 
C-c C-x i.  This gives me a local subtree table that looks something
like this:

#+BEGIN: columnview :hlines 1 :id local
| Task                             | Quoted | Estimated | CLOCKSUM |
|----------------------------------+--------+-----------+----------|
| * PROJECT Some Project           |        |      0:40 |     1:40 |
| ** Details (not a todo item)     |        |           |          |
| *** More details                 |        |           |          |
| ** DONE Task to be done          |        |      0:10 |     0:27 |
| ** DONE Review project materials |        |      0:30 |     1:13 |
| *** DONE Review document         |        |           |     1:13 |

It's pretty obvious to me when they don't match.

The actual number of minutes they're off by isn't important to me since
the effort estimate is normally a rough guess anyway and clocking is
exact (to the minute).  Doing a difference on these two columns doesn't
really make sense to me.

When comparing clocked time to estimates I'm more interested in
  - this task was overestimated alot
  - this task was underestimated alot

-Bernt

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-08 14:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07 12:29 Time computation errors Francesco Pizzolante
2009-04-07 13:24 ` Bernt Hansen
     [not found]   ` <87skkktx4n.fsf-EZCVE/ZCkfKiJtKbxSCZYZ53EReGIhmS@public.gmane.org>
2009-04-07 14:12     ` Francesco Pizzolante
2009-04-07 15:32       ` Bernt Hansen
     [not found]         ` <87d4botr7v.fsf-EZCVE/ZCkfKiJtKbxSCZYZ53EReGIhmS@public.gmane.org>
2009-04-08  6:46           ` Francesco Pizzolante
2009-04-08 14:48             ` Bernt Hansen
2009-04-07 22:37 ` Daniel Clemente

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).