emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Egli <christian.egli@sbs.ch>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Smart inference of task progress when exporting to TJ3
Date: Fri, 03 May 2013 17:08:59 +0200	[thread overview]
Message-ID: <87fvy4t81g.fsf@sbs.ch> (raw)
In-Reply-To: 51839ED3.6070609@web.de

Hi Martin

Martin Becker <vbmazter@web.de> writes:

> Thank you for these remarks, next time I know.
> I attached a "clean" patch.

I like this patch, this is good stuff. Can you tell me how you use this?
I.e. does tj3 adapt the length fo a task based on your clock table?

A few remarks on the patch from my side:

+          ;; state=done => complete=100
+          (if (eq (org-element-property :todo-type task) 'done) 100.0
+            ;; else if explicit property => use that
+            (if complete-explicit (string-to-number complete-explicit)
+              ;; else guess the completeness from clocksum              
+              (let* ((clocked (org-taskjuggler--clocksum-task task))
+                     (complete-guess 
+		      (and effort (/ (* 100 clocked) 
+		       (org-duration-string-to-minutes effort)))))
+                (and complete-guess (max (min 99 complete-guess) 0)))
+	      )))

I would write this using cond instead of nested if. Makes it more clear.

>>     2. IIUC you don't need the TINYCHANGE cookie because the changes
>>     are made in contrib/ which doesn't require copyright assignment.

The taskjuggler exporter used to be in core before it was moved to
contrib by Bastien or Nicolas on the bases that there aren't many users
(and probably because it wasn't maintained very well). This is OK for
now, but eventually I'd like to move it back to core. So we need
assignment for this patch.

Thanks
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland

  reply	other threads:[~2013-05-03 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 21:24 [PATCH] Smart inference of task progress when exporting to TJ3 Martin
2013-05-03  8:40 ` Daimrod
2013-05-03 11:26   ` Martin Becker
2013-05-03 15:08     ` Christian Egli [this message]
2013-05-03 17:05       ` Martin Becker
2013-05-03 20:25         ` Christian Egli
2013-05-03 23:06           ` Martin Becker
2013-05-07 10:08       ` Bastien
2013-05-07 10:57         ` Bastien

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=87fvy4t81g.fsf@sbs.ch \
    --to=christian.egli@sbs.ch \
    --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).