From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: Re: [PATCH] Smart inference of task progress when exporting to TJ3 Date: Fri, 03 May 2013 17:08:59 +0200 Message-ID: <87fvy4t81g.fsf@sbs.ch> References: <0LlWCR-1TzVer28MZ-00b7Lb@smtp.web.de> <87r4hobgna.fsf@tanger.home> <51839ED3.6070609@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYHbn-0002cK-Q3 for emacs-orgmode@gnu.org; Fri, 03 May 2013 11:09:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYHbk-0006Rc-Lu for emacs-orgmode@gnu.org; Fri, 03 May 2013 11:09:15 -0400 Received: from plane.gmane.org ([80.91.229.3]:44223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYHbk-0006RK-Fr for emacs-orgmode@gnu.org; Fri, 03 May 2013 11:09:12 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UYHbj-0003ke-8t for emacs-orgmode@gnu.org; Fri, 03 May 2013 17:09:11 +0200 Received: from alouette.sbs.ch ([194.29.12.218]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 May 2013 17:09:11 +0200 Received: from christian.egli by alouette.sbs.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 May 2013 17:09:11 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Martin Martin Becker 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