emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer Stengele <rainer.stengele@online.de>
To: emacs-orgmode@gnu.org
Subject: Bug in the sorting of clocktables with ":sort (4 . ?T)" for clock sums over "100:00" hours
Date: Thu, 24 Aug 2017 16:26:22 +0200	[thread overview]
Message-ID: <onmnm6$qo3$1@blaine.gmane.org> (raw)

Hi,

I may have found a bug in the sorting of clocktables.
I am summing up clocked time over time periods.

As long as the clocksum is under "100:00" (6 characters including ":") sorting seems to be ok:

#+BEGIN: clocktable :maxlevel 1 :properties ("CATEGORY") :fileskip0 t :scope agenda-with-archives :tstart "<2017-01-01 So 00:00>" :tend 
"<2017-01-20 Fr 00:00>" :sort (4 . ?T)
#+CAPTION: Clock summary at [2017-08-24 Do 15:04]
| File                  | CATEGORY    | Headline     |    Time |
|-----------------------+-------------+--------------+---------|
|                       | ALL         | *Total time* | *97:30* |
|-----------------------+-------------+--------------+---------|
| Projectmanagement.org |             | *File time*  | *96:45* |
|                       | annonymised | annonymised  |   24:45 |
|                       | annonymised | annonymised  |   17:45 |
|                       | annonymised | annonymised  |   10:45 |
|                       | annonymised | annonymised  |    8:00 |
|                       | annonymised | annonymised  |    7:45 |
|                       | annonymised | annonymised  |    5:00 |
|                       | annonymised | annonymised  |    4:00 |
|                       | annonymised | annonymised  |    3:45 |
|                       | annonymised | annonymised  |    2:00 |
|                       | annonymised | annonymised  |    2:00 |
|                       | annonymised | annonymised  |    1:45 |
|                       | annonymised | annonymised  |    1:45 |
|                       | annonymised | annonymised  |    1:15 |
|                       | annonymised | annonymised  |    0:45 |
|                       | annonymised | annonymised  |    0:45 |
|                       | annonymised | annonymised  |    0:30 |
|                       | annonymised | annonymised  |    0:30 |
|                       | annonymised | annonymised  |    0:30 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|                       | annonymised | annonymised  |    0:15 |
|-----------------------+-------------+--------------+---------|
| FILE2.org             |             | *File time*  |  *0:45* |
|                       | annonymised | annonymised  |    0:45 |
#+END:

As soon as the sum grows higher than 100:00 sorting is corrupted:

#+BEGIN: clocktable :maxlevel 1 :properties ("CATEGORY") :fileskip0 t :scope agenda-with-archives :tstart "<2017-01-01 So 00:00>" :tend 
"<2017-01-23 Mo 00:00>" :sort (4 . ?T)
#+CAPTION: Clock summary at [2017-08-24 Do 16:14]
| File                  | CATEGORY    | Headline     |     Time |
|-----------------------+-------------+--------------+----------|
|                       | ALL         | *Total time* | *104:45* |
|-----------------------+-------------+--------------+----------|
|                       | annonymised | annonymised  |    28:00 |
|                       | annonymised | annonymised  |    18:45 |
|                       | annonymised | annonymised  |    10:45 |
|                       | annonymised | annonymised  |     8:00 |
|                       | annonymised | annonymised  |     8:00 |
|                       | annonymised | annonymised  |     7:15 |
| Projectmanagement.org |             | *File time*  | *104:00* |
|                       | annonymised | annonymised  |     4:00 |
|                       | annonymised | annonymised  |     3:45 |
|                       | annonymised | annonymised  |     2:00 |
|                       | annonymised | annonymised  |     2:00 |
|                       | annonymised | annonymised  |     1:45 |
|                       | annonymised | annonymised  |     1:45 |
|                       | annonymised | annonymised  |     1:15 |
|                       | annonymised | annonymised  |     0:45 |
|                       | annonymised | annonymised  |     0:45 |
|                       | annonymised | annonymised  |     0:30 |
|                       | annonymised | annonymised  |     0:30 |
|                       | annonymised | annonymised  |     0:30 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|-----------------------+-------------+--------------+----------|
| FILE2.org             |             | *File time*  |   *0:45* |
|                       | annonymised | annonymised  |     0:45 |
#+END:

Another example with a longer time period which is more corrupted and might help to identify the reason:

#+BEGIN: clocktable :maxlevel 1 :properties ("CATEGORY") :fileskip0 t :scope agenda-with-archives :tstart "<2017-01-01 So 00:00>" :tend 
"<2017-03-23 Do 00:00>" :sort (4 . ?T)
#+CAPTION: Clock summary at [2017-08-24 Do 16:23]
| File                  | CATEGORY    | Headline     |     Time |
|-----------------------+-------------+--------------+----------|
|                       | ALL         | *Total time* | *432:45* |
|-----------------------+-------------+--------------+----------|
|                       | annonymised | annonymised  |    75:00 |
|                       | annonymised | annonymised  |    50:00 |
|                       | annonymised | annonymised  |    37:00 |
| Projectmanagement.org |             | *File time*  | *432:00* |
|                       | annonymised | annonymised  |    31:30 |
|                       | annonymised | annonymised  |    23:00 |
|                       | annonymised | annonymised  |    12:45 |
|                       | annonymised | annonymised  |    12:45 |
|                       | annonymised | annonymised  |    12:30 |
|                       | annonymised | annonymised  |    10:45 |
|                       | annonymised | annonymised  |     6:30 |
|                       | annonymised | annonymised  |     5:45 |
|                       | annonymised | annonymised  |     5:30 |
|                       | annonymised | annonymised  |     5:30 |
|                       | annonymised | annonymised  |     4:45 |
|                       | annonymised | annonymised  |   104:15 |
|                       | annonymised | annonymised  |     3:45 |
|                       | annonymised | annonymised  |     3:30 |
|                       | annonymised | annonymised  |     3:30 |
|                       | annonymised | annonymised  |     3:15 |
|                       | annonymised | annonymised  |     3:00 |
|                       | annonymised | annonymised  |     2:45 |
|                       | annonymised | annonymised  |     1:30 |
|                       | annonymised | annonymised  |     1:30 |
|                       | annonymised | annonymised  |     1:15 |
|                       | annonymised | annonymised  |     1:15 |
|                       | annonymised | annonymised  |     1:15 |
|                       | annonymised | annonymised  |     1:15 |
|                       | annonymised | annonymised  |     1:00 |
|                       | annonymised | annonymised  |     1:00 |
|                       | annonymised | annonymised  |     0:45 |
|                       | annonymised | annonymised  |     0:45 |
|                       | annonymised | annonymised  |     0:45 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|                       | annonymised | annonymised  |     0:15 |
|-----------------------+-------------+--------------+----------|
| DIPLAN.org            |             | *File time*  |   *0:45* |
|                       | annonymised | annonymised  |     0:45 |
#+END:

Org mode version 9.0.9 (release_9.0.9-795-gb47de2.dirty

This worked in older versions, not sure maybe when it changed.
Does anybody know if the sorting has changed?
Any fix possible?

Thank you.
Regards, Rainer

             reply	other threads:[~2017-08-24 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 14:26 Rainer Stengele [this message]
2017-08-24 22:07 ` Bug in the sorting of clocktables with ":sort (4 . ?T)" for clock sums over "100:00" hours Nicolas Goaziou
2017-08-25  6:56   ` Rainer Stengele

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='onmnm6$qo3$1@blaine.gmane.org' \
    --to=rainer.stengele@online.de \
    --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).