From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Mueller Subject: Re: Bug in clocktable report with formula % Date: Mon, 6 Feb 2017 00:29:53 +0100 Message-ID: <20170205232953.GA11539@nowhere> References: <20161228155427.GA14195@nowhere> <871swrpov1.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V0207lvV8h4k8FAm" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caWG5-0003f0-9k for emacs-orgmode@gnu.org; Sun, 05 Feb 2017 18:30:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caWG2-0007es-14 for emacs-orgmode@gnu.org; Sun, 05 Feb 2017 18:30:13 -0500 Received: from vie01a-dmta-ch02-1.mx.upcmail.net ([84.116.36.94]:24155) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1caWG1-0007Ua-QW for emacs-orgmode@gnu.org; Sun, 05 Feb 2017 18:30:09 -0500 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-ch02.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1caWFq-0001u6-Qa for emacs-orgmode@gnu.org; Mon, 06 Feb 2017 00:29:58 +0100 Received: from nowhere (84-75-82-78.dclient.hispeed.ch [84.75.82.78]) by smtp.0x7.ch (Postfix) with ESMTPSA id DA7825E0D2 for ; Mon, 6 Feb 2017 00:29:55 +0100 (CET) Content-Disposition: inline In-Reply-To: <871swrpov1.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --V0207lvV8h4k8FAm Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello I just noticed with updated org (org-20170124), although days are no longer ignored, the percentage calculation is still wrong. It looks to me like the problem is that org-effort-durations calculates minutes in a day with 8 hours per day (I assume the idea was to only plan for 8 hour workdays). Changing org-effort-durations to calculate with 24 hour days gives the correct result of 93% / 7%. Thanks & best regards, Andreas Nicolas Goaziou wrote: > Hello, >=20 > Andreas Mueller writes: >=20 >> I think I may have found a bug in the clocktable report: When using >> :formula %, it seems days are ignored in time percentage calculation. >> >> I have attached a simple test.org which demonstrates this. >> >> Emacs version: 24.5.1 >> Org version: Org mode version 9.0.2 (9.0.2-10-g820d1e-elpa @ ~/.emacs.d/= elpa/org-20161223/) >> >> Thanks & best regards, >> Andreas >> >> * Foo >> CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] =3D> 26:00 >> * Bar >> CLOCK: [2016-12-28 Wed 13:09]--[2016-12-28 Wed 15:09] =3D> 2:00 >> >> * Report >> #+BEGIN: clocktable :maxlevel 2 :scope file :formula % >> #+CAPTION: Clock summary at [2016-12-28 Wed 15:10] >> | Headline | Time | | % | >> |--------------+-----------+---+-------| >> | *Total time* | *1d 4:00* | | 100.0 | >> |--------------+-----------+---+-------| >> | Foo | 1d 2:00 | | 50.0 | >> | Bar | 2:00 | | 50.0 | >> #+TBLFM: $4=3D'(org-clock-time% @2$2 $2..$3);%.1f >> #+END: >=20 > Fixed. Thank you. >=20 > Regards, >=20 --fUYQa+Pmc3FrFX/N Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename="test.org" Content-Transfer-Encoding: quoted-printable * Foo=0A CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] =3D> 26:00= =0A* Bar=0A CLOCK: [2016-12-28 Wed 13:09]--[2016-12-28 Wed 15:09] =3D> 2:= 00=0A=0A* Report=0A#+BEGIN: clocktable :maxlevel 2 :scope file :formula %= =0A#+CAPTION: Clock summary at [2017-02-06 Mon 00:12]=0A| Headline | Ti= me | | % |=0A|--------------+-----------+---+-------|=0A| *Total= time* | *1d 4:00* | | 100.0 |=0A|--------------+-----------+---+-------|= =0A| Foo | 1d 2:00 | | 83.3 |=0A| Bar | 2:00 | = | 16.7 |=0A#+TBLFM: $4=3D'(org-clock-time% @2$2 $2..$3);%.1f=0A#+END:=0A --fUYQa+Pmc3FrFX/N-- --V0207lvV8h4k8FAm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAliXtXEACgkQyGQqbBqqwqQ/swCfTGPOHA/sANCu8T8VXvU8Vg3+ joMAn3y9TT5r3sctl4yvjy69e7fO6vm7 =BoMe -----END PGP SIGNATURE----- --V0207lvV8h4k8FAm--