emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)]
@ 2018-05-12  4:33 Bernt Hansen
  2018-05-13 21:36 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2018-05-12  4:33 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

I noticed maint (and master) has inconsistent handling for effort amounts

Below is an ECM to reproduce the behaviour.

Thanks for Org-Mode!

Regards,
Bernt

--- test.org -----------------------------------------------------------------------------
#+FILETAGS: TEST
#+STARTUP: content

*Keys To Reproduce*

1) Expand window to full screen so you can see the clock modeline total in step 4

2) Go to first headline
   C-c C-n

3) Go to do something
   C-c C-n

4) Clock in
   C-c C-x C-i

   Notice modeline total has [0:05/0:15]
   So 'do something' has an effort of 15 minutes.  It may be entered wrong but it is a bare 15 value
   instead of 15:00 or 00:15

   :EFFORT:   15

6) Go back to Test Parent
   C-c C-p

7) Enter column mode
   C-C C-x C-c

   Notice the total Effort is 15 hours and 30 minutes
   Column mode is using the 15 effort as hours not minutes while clocking uses it as minutes.
   When I run into this I change the effort value to either 15:00 or 00:15 but it would be better if it was handled consistently.
   
* TODO Test Parent                                          :PRODUCTION:MISC:
  :PROPERTIES:
  :EFFORT:   15:30
  :END:
** TODO do something
   :PROPERTIES:
   :EFFORT:   15
   :END:
   :LOGBOOK:
   CLOCK: [2018-05-12 Sat 00:23]--[2018-05-12 Sat 00:23] =>  0:00
   CLOCK: [2018-05-12 Sat 00:22]--[2018-05-12 Sat 00:22] =>  0:00
   CLOCK: [2018-05-12 Sat 00:22]--[2018-05-12 Sat 00:22] =>  0:00
   CLOCK: [2018-05-12 Sat 00:07]--[2018-05-12 Sat 00:08] =>  0:01
   CLOCK: [2018-05-12 Sat 00:00]--[2018-05-12 Sat 00:04] =>  0:04
   :END:
** TODO foo                                                             :BAR:
   :PROPERTIES:
   :EFFORT:   00:30
   :END:


--- test.el ------------------------------------------------------------------------------
; Set default column view headings: Task Effort Clock_Summary
(setq org-columns-default-format "%80ITEM(Task) %10Effort(Effort){:} %10CLOCKSUM")

(setq org-agenda-clockreport-parameter-plist
      (quote (:link t :maxlevel 9 :fileskip0 t :compact t :narrow 80)))


------------------------------------------------------------------------------------------

Emacs  : GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-09-17
Package: Org mode version 9.1.13 (release_9.1.13 @
 c:/D-Drive/bin/org-mode/lisp/)

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

* Re: Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)]
  2018-05-12  4:33 Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)] Bernt Hansen
@ 2018-05-13 21:36 ` Nicolas Goaziou
  2018-05-14  0:53   ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-05-13 21:36 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hello,

Bernt Hansen <bernt@norang.ca> writes:

>    Notice modeline total has [0:05/0:15]
>    So 'do something' has an effort of 15 minutes.  It may be entered wrong but it is a bare 15 value
>    instead of 15:00 or 00:15
>
>    :EFFORT:   15
>
> 6) Go back to Test Parent
>    C-c C-p
>
> 7) Enter column mode
>    C-C C-x C-c
>
>    Notice the total Effort is 15 hours and 30 minutes
>    Column mode is using the 15 effort as hours not minutes while clocking uses it as minutes.
>    When I run into this I change the effort value to either 15:00 or 00:15 but it would be better if it was handled consistently.

Unfortunately, this discrepancy has deep roots. For example, the manual
has this:

          {:}       Sum times, HH:MM, plain numbers are hours.

Changing {:} or effort behaviour could be annoying. We may add another
summary-type, e.g. {::}, with the following description:

          {::}       Sum times, HH:MM, plain numbers are minutes.

WDYT?

Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)]
  2018-05-13 21:36 ` Nicolas Goaziou
@ 2018-05-14  0:53   ` Bernt Hansen
  2018-05-14 12:46     ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2018-05-14  0:53 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Bernt Hansen <bernt@norang.ca> writes:
>
>>    Notice modeline total has [0:05/0:15]
>>    So 'do something' has an effort of 15 minutes.  It may be entered wrong but it is a bare 15 value
>>    instead of 15:00 or 00:15
>>
>>    :EFFORT:   15
>>
>> 6) Go back to Test Parent
>>    C-c C-p
>>
>> 7) Enter column mode
>>    C-C C-x C-c
>>
>>    Notice the total Effort is 15 hours and 30 minutes
>>    Column mode is using the 15 effort as hours not minutes while clocking uses it as minutes.
>>    When I run into this I change the effort value to either 15:00 or 00:15 but it would be better if it was handled consistently.
>
> Unfortunately, this discrepancy has deep roots. For example, the manual
> has this:
>
>           {:}       Sum times, HH:MM, plain numbers are hours.
>
> Changing {:} or effort behaviour could be annoying. We may add another
> summary-type, e.g. {::}, with the following description:
>
>           {::}       Sum times, HH:MM, plain numbers are minutes.
>
> WDYT?

I am fine with plain numbers being interpretted as hours.  I don't think
we need a second interpretation for it (as minutes).

Would it be possible to make the mode line total match whatever the
current column view totalling is?  Since the mode line total is using
plain numbers as minutes not hours.

I am just looking for consistency and existing setups with column view
shouldn't be broken by a change here -- but I doubt anyone depends on
the display on the mode line -- so if that changed from minutes to hours
I would be fine with that.

I don't think changing a bare 15 effort to mean minutes instead of the
hours is a good idea - in case existing users already have effort data
with plain numbers -- their estimates will change drastically.  But
making the effort total on the mode line change from 15 minutes to 15
hours will be consistent with the column view interpretation of plain
numbers and it will be more obvious when you clock in that it isn't what
you are expecting.

OTOH people that don't use column view at all (do we have users like
that?) that use clocking and the current behaviour on the mode line
might be surprised when their total value changes from minutes to
hours... but other than an 'alarm' indicator when you hit the limit it
doesn't really do anything else that is useful as far as I know.

My reason for using efforts is in estimating work on tasks and then
following through and clocking the work to see how good my estimate
really was.  Column view as is works great for that.  I find the mode
line timer showing progress towards my effort limit useful but it is
just a visual indication of how far along I am on the task currently
being clocked -- and it jumps out as being wrong when the effort is a
plain number.

Any existing effort estimates I have with plain numbers are already
hours in the existing column view code and I wouldn't want my estimates
to change all of a sudden because we changed the default plain numbers
from hours to minutes.

Ideally I think I just want the mode line total to behave the same as
the existing column view behaviour as far as plain numbers are concerned
if this is easy and not causing more problems than it fixes.

Otherwise I can live with it -- it's been this way for years I think --
and I will just change my effort values to always include both HH:MM and
avoid plain numbers.

Thanks,
Bernt

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

* Re: Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)]
  2018-05-14  0:53   ` Bernt Hansen
@ 2018-05-14 12:46     ` Nicolas Goaziou
  2018-05-14 15:52       ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-05-14 12:46 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hello,

Bernt Hansen <bernt@norang.ca> writes:

> I am fine with plain numbers being interpretted as hours. I don't
> think we need a second interpretation for it (as minutes).

The second interpretation already exists. "org-colview.el" is the sole
place where plain numbers are treated as hours. Everywhere else, plain
numbers are minutes, including in "org-clock.el".

> I don't think changing a bare 15 effort to mean minutes instead of the
> hours is a good idea - in case existing users already have effort data
> with plain numbers -- their estimates will change drastically.

I'm not proposing to change anything. I'm just suggesting a new way to
let users decide what should mean "15" when summing properties in
Columns View mode.

The issue here is you don't want to change Columns View mode, but
everything else. Or, more accurately, you want to add another exception
in plain numbers handling when displaying the mode line. This means
changing how `org-duration-to-minutes' interprets plain numbers, hence
the "everything else" part.

> Ideally I think I just want the mode line total to behave the same as
> the existing column view behaviour as far as plain numbers are concerned
> if this is easy and not causing more problems than it fixes.

We shot ourselves in the foot when we decided that one part of Org
should consider plain numbers as minutes and the other part as hours.
This is clearly sub-optimal.

I see no easy way to fix it painlessly. If we change anything, the
easier route to go is having Column View mode consider plain numbers as
minutes, because it only affects ... Column View mode itself.

We can also change nothing. I have the feeling this issue will bubble up
from time to time, though.

WDYT?

> Otherwise I can live with it -- it's been this way for years I think --
> and I will just change my effort values to always include both HH:MM and
> avoid plain numbers.

That's the most reasonable solution, IMO. Note that you can also use
"3h" instead of the ambiguous "3".

Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)]
  2018-05-14 12:46     ` Nicolas Goaziou
@ 2018-05-14 15:52       ` Bernt Hansen
  2018-06-19 14:35         ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2018-05-14 15:52 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> I am fine with plain numbers being interpretted as hours. I don't
>> think we need a second interpretation for it (as minutes).
>
> The second interpretation already exists. "org-colview.el" is the sole
> place where plain numbers are treated as hours. Everywhere else, plain
> numbers are minutes, including in "org-clock.el".
>

OK

I wasn't aware that column view is the only place in org-mode where
plain effort numbers mean hours.  So then if we change anything making
column view in line with the rest of org-mode would get my vote.

>> I don't think changing a bare 15 effort to mean minutes instead of the
>> hours is a good idea - in case existing users already have effort data
>> with plain numbers -- their estimates will change drastically.
>
> I'm not proposing to change anything. I'm just suggesting a new way to
> let users decide what should mean "15" when summing properties in
> Columns View mode.
>
> The issue here is you don't want to change Columns View mode, but
> everything else. Or, more accurately, you want to add another exception
> in plain numbers handling when displaying the mode line. This means
> changing how `org-duration-to-minutes' interprets plain numbers, hence
> the "everything else" part.
>
>> Ideally I think I just want the mode line total to behave the same as
>> the existing column view behaviour as far as plain numbers are concerned
>> if this is easy and not causing more problems than it fixes.
>
> We shot ourselves in the foot when we decided that one part of Org
> should consider plain numbers as minutes and the other part as hours.
> This is clearly sub-optimal.
>
> I see no easy way to fix it painlessly. If we change anything, the
> easier route to go is having Column View mode consider plain numbers as
> minutes, because it only affects ... Column View mode itself.
>

I'd like to change my vote :)
So Cancel the above request about touching the mode line code :)

> We can also change nothing. I have the feeling this issue will bubble up
> from time to time, though.
>
> WDYT?

Okay that all sounds very reasonable :)

I think changing column view to be consistent with the rest of org-mode
is the right way to go if we are changing anything.

The issue is how to alert any users in the wild that are already using
efforts and expecting it to behave as hours in column mode so they can
fix their data if we change the interpretation from hours to minutes to
match the rest of org-mode.

I expect this is really old behaviour and a fix isn't really required.

Personally I will try to move away from using plain numbers as efforts.
I usually mean minutes but will need to fix any values that are
displayed in column mode.

For now I will just find and fix my effort values in my org-files and
try not to create plain numbers as efforts in the future when they are
used in column mode.

My org files are under a git repository so finding the bad entries is
fairly easy for me:

git grep -nHi ':effort:' | grep -v '[0-9]:[0-9]'

Would it be useful to flag plain effort numbers in org-lint so they are
easier to find and fix?  This way if I make more in the future I will
hopefully notice sooner.  I have some zero (0) entries and some empty
entries in my org files -- but maybe that's okay.

>> Otherwise I can live with it -- it's been this way for years I think --
>> and I will just change my effort values to always include both HH:MM and
>> avoid plain numbers.
>
> That's the most reasonable solution, IMO. Note that you can also use
> "3h" instead of the ambiguous "3".

Thanks - I wasn't aware of that option.

So unless someone else feels strongly about this issue we should just
close this bug report and 'do nothing'.

Thanks for listening :)

Regards,
Bernt

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

* Re: Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)]
  2018-05-14 15:52       ` Bernt Hansen
@ 2018-06-19 14:35         ` Nicolas Goaziou
  2018-06-19 15:31           ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-06-19 14:35 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hello

Bernt Hansen <bernt@norang.ca> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> We shot ourselves in the foot when we decided that one part of Org
>> should consider plain numbers as minutes and the other part as hours.
>> This is clearly sub-optimal.
>>
>> I see no easy way to fix it painlessly. If we change anything, the
>> easier route to go is having Column View mode consider plain numbers as
>> minutes, because it only affects ... Column View mode itself.
>>
>
> I'd like to change my vote :)
> So Cancel the above request about touching the mode line code :)

I applied the change above in "next" branch.

Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)]
  2018-06-19 14:35         ` Nicolas Goaziou
@ 2018-06-19 15:31           ` Bernt Hansen
  0 siblings, 0 replies; 7+ messages in thread
From: Bernt Hansen @ 2018-06-19 15:31 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>>> We shot ourselves in the foot when we decided that one part of Org
>>> should consider plain numbers as minutes and the other part as hours.
>>> This is clearly sub-optimal.
>>>
>>> I see no easy way to fix it painlessly. If we change anything, the
>>> easier route to go is having Column View mode consider plain numbers as
>>> minutes, because it only affects ... Column View mode itself.
>>>
>>
>> I'd like to change my vote :)
>> So Cancel the above request about touching the mode line code :)
>
> I applied the change above in "next" branch.

Great!  I will play with it when it gets to master. :)

Regards,
Bernt

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

end of thread, other threads:[~2018-06-19 15:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-12  4:33 Bug: Inconsistent effort handling in clock totals in maint [9.1.13 (release_9.1.13 @ /home/bernt/git/org-mode/lisp/)] Bernt Hansen
2018-05-13 21:36 ` Nicolas Goaziou
2018-05-14  0:53   ` Bernt Hansen
2018-05-14 12:46     ` Nicolas Goaziou
2018-05-14 15:52       ` Bernt Hansen
2018-06-19 14:35         ` Nicolas Goaziou
2018-06-19 15:31           ` Bernt Hansen

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