From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Re: TaskJuggler3, revisited Date: Thu, 4 Nov 2010 16:24:57 -0500 Message-ID: References: <94AF83C1-39B7-449F-BCF5-F0CA3B3031EE@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1644099484==" Return-path: Received: from [140.186.70.92] (port=34182 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE7Iu-0007OF-8Z for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 17:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE7Iq-0006uF-R2 for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 17:25:04 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:40148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE7Iq-0006u7-9L for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 17:25:00 -0400 Received: by fxm2 with SMTP id 2so1871128fxm.0 for ; Thu, 04 Nov 2010 14:24:58 -0700 (PDT) In-Reply-To: <94AF83C1-39B7-449F-BCF5-F0CA3B3031EE@yahoo.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Anthony Lander Cc: Christian Egli , emacs-orgmode Mode --===============1644099484== Content-Type: multipart/alternative; boundary=001636c5a6c72f4e6e049440ca2b --001636c5a6c72f4e6e049440ca2b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Nice! I was able to do the following: - grab your copy of org-taskjuggler.el and install it - get the .org file here: http://orgmode.org/manual/TaskJuggler-export.html - export to a .tjp - swap out the default export with the code below and run "tj3 tj3-test.tjp= " and get a nice html report! --- If you're looking for a default tj3 export... perhaps start with what's below? Great work! John The export code that creates quite a nice html report (from tj3 documentation) -------------- navigator navbar { hidereport 0 } macro TaskTip [ tooltip istask() -8<- '''Start: ''' <-query attribute=3D'start'-> '''End: ''' <-query attribute=3D'end'-> ---- '''Resources:''' <-query attribute=3D'resources'-> ---- '''Precursors: ''' <-query attribute=3D'precursors'-> ---- '''Followers: ''' <-query attribute=3D'followers'-> ->8- ] textreport frame "" { header -8<- =3D=3D Accounting Software Project =3D=3D ---- <[navigator id=3D"navbar"]> ---- ->8- footer "----" textreport index "Overview" { formats html center '<[report id=3D"overview"]>' } textreport "Status" { formats html center -8<- <[report id=3D"status.dashboard"]> ---- <[report id=3D"status.completed"]> ---- <[report id=3D"status.ongoing"]> ---- <[report id=3D"status.future"]> ->8- } textreport development "Development" { formats html center '<[report id=3D"development"]>' } textreport "Deliveries" { formats html center '<[report id=3D"deliveries"]>' } textreport "ContactList" { formats html title "Contact List" center '<[report id=3D"contactList"]>' } textreport "ResourceGraph" { formats html title "Resource Graph" center '<[report id=3D"resourceGraph"]>' } } # A traditional Gantt chart with a project overview. taskreport overview "" { header -8<- =3D=3D=3D Project Overview =3D=3D=3D The project is structured into 3 phases. # Specification # <-reportlink id=3D'frame.development'-> # Testing =3D=3D=3D Original Project Plan =3D=3D=3D ->8- columns hierarchindex, name, start, end, effort, duration, cost, revenue, chart { ${TaskTip} } # For this report we like to have the abbreviated weekday in front # of the date. %a is the tag for this. timeformat "%a %Y-%m-%d" loadunit days hideresource 1 caption 'All effort values are in man days.' footer -8<- =3D=3D=3D Staffing =3D=3D=3D All project phases are properly staffed. See [[ResourceGraph]] for detailed resource allocations. =3D=3D=3D Current Status =3D=3D=3D The project started off with a delay of 4 days. This slightly affected the original schedule. See [[Deliveries]] for the impact on the delivery dates. ->8- } # Macro to set the background color of a cell according to the alert # level of the task. macro AlertColor [ cellcolor plan.alert =3D 0 "#00D000" # green cellcolor plan.alert =3D 1 "#D0D000" # yellow cellcolor plan.alert =3D 2 "#D00000" # red ] taskreport status "" { columns wbs, name, start, end, effort, alert { tooltip plan.journal !=3D '' "<-query attribute=3D'journal'->" }, status taskreport dashboard "" { headline "Project Dashboard (<-query attribute=3D'now'->)" columns name { title "Task" ${AlertColor} }, resources { width 200 ${AlertColor} start ${projectstart} end ${projectend} }, alerttrend { title "Trend" ${AlertColor} }, journalmessages { width 260 ${AlertColor} } hidetask ~hasalert(0) sorttasks alert.down period %{${now} - 1w} +1w } taskreport completed "" { headline "Already completed tasks" } taskreport ongoing "" { headline "Ongoing tasks" } taskreport future "" { headline "Future tasks" } } # A list of tasks showing the resources assigned to each task. taskreport development "" { headline "Development - Resource Allocation Report" columns hierarchindex, name, start, end, effort { title "Work" }, duration, chart { ${TaskTip} scale day width 500 } timeformat "%Y-%m-%d" hideresource ~(isleaf() & isleaf_()) sortresources name.up } # A list of all tasks with the percentage completed for each task taskreport deliveries "" { headline "Project Deliverables" columns hierarchindex, name, start, end, note { width 150 }, complete, chart { ${TaskTip} } hideresource 1 } # A list of all employees with their contact details. resourcereport contactList "" { headline "Contact list and duty plan" columns name, email { celltext 1 "[mailto:<-email-> <-email->]" }, chart { scale day } hideresource ~isleaf() sortresources name.up hidetask 1 } # A graph showing resource allocation. It identifies whether each # resource is under- or over-allocated for. resourcereport resourceGraph "" { headline "Resource Allocation Graph" columns no, name, effort, rate, weekly { ${TaskTip} } loadunit shortauto # We only like to show leaf tasks for leaf resources. hidetask ~(isleaf() & isleaf_()) sorttasks plan.start.up } ----------------- On Mon, Nov 1, 2010 at 9:05 PM, Anthony Lander wro= te: > Hi everyone, > > Christian Egli and I have been having an off-list exchange about making a > TaskJuggler3 exporter. In fact, Christian would like to change the curren= t > exporter to export to either TaskJuggler2 or TaskJuggler3, depending on a > defcustom! We have quite a number of ideas in the pipeline now, and thoug= ht > it would be best to move the discussion, and access to the source code, b= ack > onto the list. > > Christian has set up a github repository with the changes he is making > here: http://github.com/egli/org-mode > > And the code I sent to Christian, which makes the exporter work with TJ3, > and also introduces some bug fixes and new features is here: > http://github.com/alander/org-taskjuggler3. Please note that this is > different from Christian's code, and that he is the maintainer of the > exporter that is part of org-mode. I needed something to work, so I spent= an > afternoon hacking until it did what I needed. > > If you are interested in the details, our e-mail exchange is reproduced > below. > > -Anthony > > > ------------------------8<------------------------- > > From: christian.egli@sbs.ch > Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited > Date: October 19, 2010 5:29:42 AM GMT-04:00 > To: anthonylander@yahoo.com > Cc: emacs-orgmode@gnu.org > > Hi Anthony > > Anthony Lander writes: > > Please find attached a somewhat improved version of your TJ2 exporter, >> a drop-in replacement that exports to TJ3, and also a sample .org >> file. >> > > This is all exciting stuff. It's a little hard to digest (many changes > rolled into one, white space formatting changes that make it hard to find > the real change, common lisp idioms which I'm not familiar with). Let me > get back to you with some questions and then we can discuss how to most > easily merge the stuff. > > - Why did you compute the leafiness? I seem to have experienced that tj3 > has a problem with zero effort tasks that aren't marked as milestones. > Is that the reason? > > - Why do you add a duration of 1d if the task has neither a duration, an > end, a period nor an effort? Shouldn't that be a milestone instead? > > - I see that there is a need to annotate a project with stuff such as > scenarios, etc and I was missing a way to have file specific reports > or other globals. Your additional tags solve that problem. However I'm > a bit reluctant to add more magic tags that mark the trees in some > way. I was hoping to find a more general way for this problem. So far > I haven't found a good solution though. > > - I like the idea of the TJ drawer, but in the end you just seem to use > it for the project node and the globals node. So in essence they are > taskjuggler source code blocks (in disguise) which are tied to a > particular node. In fact they are not even really tied to a particular > node, especially in the case of the globals. This goes back to the > previous question about a good way to add file specific globals. Maybe > some kind taskjuggler specific export option is really what we are > looking for. > > As an aside, I think it's better to post the source code to the list. > There might be other people interested in it and pitching in with > opinions and improvements. > > Thanks > > -- > Christian Egli > Swiss Library for the Blind, Visually Impaired and Print Disabled > Grubenstrasse 12, CH-8045 Z=FCrich, Switzerland > > ------------------------8<------------------------- > > From: anthonylander@yahoo.com > Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited > Date: October 19, 2010 8:55:38 AM GMT-04:00 > To: christian.egli@sbs.ch > > Hi Christian, > > > On 10-Oct-19, at 5:29 AM, Christian Egli wrote: > > This is all exciting stuff. It's a little hard to digest (many changes >> rolled into one, white space formatting changes that make it hard to fin= d >> the real change, common lisp idioms which I'm not familiar with). Let me >> get back to you with some questions and then we can discuss how to most >> easily merge the stuff. >> > > Apologies for the big blob of changes - I was initially just trying to ge= t > stuff to work, and, well, just kept going. As for the spacing/formatting,= I > ran M-x indent-region RET on the whole file to get the formatting > consistent. I know it makes diffing hard, though :( > > Is the unfamiliar idiom the backtick list with the ,variables in it, by > chance? > > - Why did you compute the leafiness? I seem to have experienced that tj3 >> has a problem with zero effort tasks that aren't marked as milestones. >> Is that the reason? >> - Why do you add a duration of 1d if the task has neither a duration, an >> end, a period nor an effort? Shouldn't that be a milestone instead? >> > > Ah, sorry. This I should have documented. The problem is that TJ3 fails t= o > compile the file if there is a leaf node with no computable end date. TJ2 > happily ignored the situation, but TJ3 throws an error. So the problem I= 'm > trying to solve is that as you are working on your project plan, it won't > compile unless you put in a bunch of dummy estimates for the leaf nodes. > > I found it easier to let the exporter put them in, so that I don't always > think to myself, "did I put this in as a real estimate or just to make th= e > compiler happy?" Perhaps it would be better to change 1 day to 1 minute o= r 1 > second to make it very obviously a dummy duration that is put in only to > satisfy the compiler. And maybe even a comment in the exported file, too. > > Also, I hadn't thought of milestones. I think the code needs a bit of a f= ix > because it needs to know that a milestone has zero effort, but won't caus= e > the compiler to fail. > > - I see that there is a need to annotate a project with stuff such as >> scenarios, etc and I was missing a way to have file specific reports >> or other globals. Your additional tags solve that problem. However I'm >> a bit reluctant to add more magic tags that mark the trees in some >> way. I was hoping to find a more general way for this problem. So far >> I haven't found a good solution though. >> > > I agree with you about the magic tags. I hate the feeling of reimplementi= ng > the entire TJ3 file format in org. That's asking to always be playing > catch-up, and to always be missing features. I like very much the idea of > "borrowing" features from org that make sense, and doing something useful= on > export. Examples are your % doneness of a task, and your "ordered tasks i= n a > hierarchy" ideas. And in fact I added using the todo states and tags as > flags so you can easily build tj reports that reference them (see the > "active" gantt chart, for example). > > In the end, I felt the project needed a special marker because there are > specific TJ3 features that go with it. And also, the globals need to go > somewhere. I am also not thrilled with making all these tags, but I didn'= t > have a better solution either. > > In any event, the TJ drawer is my attempt at a catch-all solution. It at > least allows a user to use missing features without waiting for a > development change. So for example, I personally will never use the > accounting stuff, and would not be very motivated to add it to the export= er, > but if someone needed it, they could put the required code in the TJ draw= er, > and they could still use the TJ exporter for their project instead of hav= ing > to abandon org-mode entirely for one missing feature. > > - I like the idea of the TJ drawer, but in the end you just seem to use >> it for the project node and the globals node. So in essence they are >> taskjuggler source code blocks (in disguise) which are tied to a >> particular node. In fact they are not even really tied to a particular >> node, especially in the case of the globals. This goes back to the >> previous question about a good way to add file specific globals. Maybe >> some kind taskjuggler specific export option is really what we are >> looking for. >> > > Interesting thought. I very much like the idea that you can do other thin= gs > with your org-file than export it to taskjuggler. For example, keep actua= l > notes in the file, and export it to other formats like html or LaTeX, for > purposes other than project planning. Being able to say "no, this is not = a > task" in the task tree would be very useful. I don't know how to do it > nicely either (yet). > > As an aside, I think it's better to post the source code to the list. >> There might be other people interested in it and pitching in with >> opinions and improvements. >> > > That's a good idea. How about if we set up a git repository on github wit= h > the files, and then post the link on the mailing list? I worry that posti= ng > code and patches will badly confuse the patch manager software than grabs > code from the mailing list. Also, if we're going to do that, I think we > should put your email, and this reply to the list as well. Your thoughts? > > All the best, > > -Anthony > > ------------------------8<------------------------- > > From: christian.egli@sbs.ch > Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited > Date: October 28, 2010 3:28:13 AM GMT-04:00 > To: anthonylander@yahoo.com > Cc: emacs-orgmode@gnu.org > > Hi Anthony > > Anthony Lander writes: > > Is the unfamiliar idiom the backtick list with the ,variables in it, >> by chance? >> > > No it was more stuff like `return' and `return-from'. > > Ah, sorry. This I should have documented. The problem is that TJ3 >> fails to compile the file if there is a leaf node with no computable >> end date. TJ2 happily ignored the situation, but TJ3 throws an error. >> > > OK, I understand. I managed to slowly integrate (some of) your changes. > It should now generate milestones for nodes that cannot be scheduled and > are leaf nodes. So basically it should export valid code for tj3 if you > set org-export-taskjuggler-target-version to 3.0. Of course the report > definitions in the defcustom org-export-taskjuggler-default-reports are > not compatible with tj3 so you will need to change these. > > I have (or I guess rather had) some fondness for recursive functions, so > I re-implemented your leafiness function recursively. However I ran into > problems with max-lisp-eval-depth and it appears that recursion is not > encouraged in Emacs lisp > ( > http://www.gnu.org/s/emacs/manual/html_node/elisp/Compilation-Tips.html#C= ompilation-Tips > ). > So I guess it's back to iterative style. > > In any event, the TJ drawer is my attempt at a catch-all solution. It >> at least allows a user to use missing features without waiting for a >> development change. So for example, I personally will never use the >> accounting stuff, and would not be very motivated to add it to the >> exporter, but if someone needed it, they could put the required code >> in the TJ drawer, and they could still use the TJ exporter for their >> project instead of having to abandon org-mode entirely for one missing >> feature. >> > > I like the drawer stuff and will integrate it. > > Interesting thought. I very much like the idea that you can do other >> things with your org-file than export it to taskjuggler. For example, >> keep actual notes in the file, and export it to other formats like >> html or LaTeX, for purposes other than project planning. >> > > Absolutely, I agree. > > Being able to say "no, this is not a task" in the task tree would be >> very useful. I don't know how to do it nicely either (yet). >> > > Hm, no this is not possible right now. Why would you want to do this? > Maybe we could just mark it as a comment and make the exporter honor > comments. > > How about if we set up a git repository on github >> with the files, and then post the link on the mailing list? >> > > I set up a repo and pushed my changes to the code there > (http://github.com/egli/org-mode). > > I think we should put your email, and this reply to the >> list as well. >> > > Yes, I almost forgot. Would you mind doing that? > > Thanks > Christian > > > -- > Christian Egli > Swiss Library for the Blind, Visually Impaired and Print Disabled > Grubenstrasse 12, CH-8045 Z=FCrich, Switzerland > > ------------------------8<------------------------- > > From: anthonylander@yahoo.com > Subject: Re: [Orgmode] Re: TaskJuggler 3, revisited > Date: October 31, 2010 11:45:34 AM GMT-04:00 > To: christian.egli@sbs.ch > > > On 10-Oct-28, at 3:28 AM, Christian Egli wrote: > > Anthony Lander writes: >> >> Is the unfamiliar idiom the backtick list with the ,variables in it, >>> by chance? >>> >> >> No it was more stuff like `return' and `return-from'. >> > > I see. Well, once you were explicitly requiring 'cl.... :) And as you > discovered, without a tail-recursion optimizing compiler, recursive > functions are prohibitively expensive in elisp. Once you are iterating, y= ou > need a way to exit iteration scopes before the end of the iteration. > > > So basically it should export valid code for tj3 if you >> set org-export-taskjuggler-target-version to 3.0. Of course the report >> definitions in the defcustom org-export-taskjuggler-default-reports are >> not compatible with tj3 so you will need to change these. >> > > Right. Or perhaps better, have different default reports for TJ2 or TJ3, > which the exporter selects as appropriate. > > Interesting thought. I very much like the idea that you can do other >>> things with your org-file than export it to taskjuggler. For example, >>> keep actual notes in the file, and export it to other formats like >>> html or LaTeX, for purposes other than project planning. >>> >> >> Absolutely, I agree. >> >> Being able to say "no, this is not a task" in the task tree would be >>> very useful. I don't know how to do it nicely either (yet). >>> >> >> Hm, no this is not possible right now. Why would you want to do this? >> Maybe we could just mark it as a comment and make the exporter honor >> comments. >> > > Yes, marking it as a comment is not a bad idea. The reason I want to do > that goes with the idea of using the org file for additional purposes tha= n > just a task tree. So for example, I would like to be able to have nodes w= ith > meeting notes, or links to related files etc etc under a task. That way I= am > only maintaining one project document, not separate ones for notes, > scheduling, etc. I think that is very much in the spirit of org-mode, whi= ch > so heavily emphasizes sparse trees, agenda views etc as ways to tease out > relevant information from an intermingled file. > > How about if we set up a git repository on github >>> with the files, and then post the link on the mailing list? >>> >> >> I set up a repo and pushed my changes to the code there >> (http://github.com/egli/org-mode). >> >> I think we should put your email, and this reply to the >>> list as well. >>> >> >> Yes, I almost forgot. Would you mind doing that? >> > > I'll do that, yes. > > Best regards, > > -Anthony > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --001636c5a6c72f4e6e049440ca2b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Nice! I was able to do the following:

- grab your copy o= f org-taskjuggler.el and install it
- get the .org file here:=A0<= meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8">http://orgmode.o= rg/manual/TaskJuggler-export.html
- ex= port to a .tjp
- swap out the default export with the code below = and run "tj3 tj3-test.tjp" and get a nice html report!
--- If you're looking for a default tj3 export... perhaps start with wh= at's below?

Great work!


John



The export code that creates quite a nice html report (from tj3 docume= ntation)
--------------
navigator navbar {
=A0=A0hidereport 0
}

macro TaskTip [<= /div>
=A0=A0tooltip istask() -8<-
=A0=A0 =A0'''Star= t: ''' <-query attribute=3D'start'->
= =A0=A0 =A0'''End: ''' <-query attribute=3D'e= nd'->
=A0=A0 =A0----
=A0=A0 =A0'''Resources:''= '
=A0=A0 =A0
=A0=A0 =A0<-query attribute=3D'= resources'->
=A0=A0 =A0----
=A0=A0 =A0''= 'Precursors: '''
=A0=A0 =A0
=A0=A0 =A0<-query attribute=3D'precursors&= #39;->
=A0=A0 =A0----
=A0=A0 =A0'''Follo= wers: '''
=A0=A0 =A0
=A0=A0 =A0<-query a= ttribute=3D'followers'->
=A0=A0 =A0->8-
]

textreport fram= e "" {
=A0=A0header -8<-
=A0=A0 =A0=3D=3D = Accounting Software Project =3D=3D
=A0=A0 =A0----
=A0= =A0 =A0<[navigator id=3D"navbar"]>
=A0=A0 =A0----
=A0=A0->8-
=A0=A0footer "--= --"
=A0=A0textreport index "Overview" {
= =A0=A0 =A0formats html
=A0=A0 =A0center '<[report id=3D&qu= ot;overview"]>'
=A0=A0}

=A0=A0textreport "Status" {=
=A0=A0 =A0formats html
=A0=A0 =A0center -8<-
<= div>=A0=A0 =A0 =A0<[report id=3D"status.dashboard"]>
<= div>=A0=A0 =A0 =A0----
=A0=A0 =A0 =A0<[report id=3D"statu= s.completed"]>
=A0=A0 =A0 =A0----
=A0=A0 =A0 =A0<[report id=3D"stat= us.ongoing"]>
=A0=A0 =A0 =A0----
=A0=A0 =A0 =A0= <[report id=3D"status.future"]>
=A0=A0 =A0->8-= =A0=A0
=A0=A0}

=A0=A0textreport development "Development" {
=A0= =A0 =A0formats html
=A0=A0 =A0center '<[report id=3D"= development"]>'
=A0=A0}

=A0= =A0textreport "Deliveries" {
=A0=A0 =A0formats html
=A0=A0 =A0center '<[report id= =3D"deliveries"]>'
=A0=A0}

<= div>=A0=A0textreport "ContactList" {
=A0=A0 =A0formats = html
=A0=A0 =A0title "Contact List"
=A0=A0 =A0center '<[report id=3D"contactList"]>= 9;
=A0=A0}
=A0=A0textreport "ResourceGraph" {=
=A0=A0 =A0formats html
=A0=A0 =A0title "Resource = Graph"
=A0=A0 =A0center '<[report id=3D"resource= Graph"]>'
=A0=A0}
}

# A traditional Gantt cha= rt with a project overview.
taskreport overview "" {
=A0=A0header -8<-
=A0=A0 =A0=3D=3D=3D Project Overview= =3D=3D=3D
=A0=A0 =A0
=A0=A0 =A0The project is structured into 3 phases.
=A0=A0 = =A0
=A0=A0 =A0# Specification
=A0=A0 =A0# <-reportli= nk id=3D'frame.development'->
=A0=A0 =A0# Testing
=A0=A0 =A0
=A0=A0 =A0=3D=3D=3D Original Project Plan =3D=3D= =3D
=A0=A0->8-
=A0=A0columns hierarchindex,
=A0=A0 = =A0 =A0 =A0 =A0name, start, end, effort, duration, cost,
=A0=A0 = =A0 =A0 =A0 =A0revenue, chart { ${TaskTip} }
=A0=A0# For this rep= ort we like to have the abbreviated weekday in front
=A0=A0# of the date. %a is the tag for this.
=A0=A0timeforma= t "%a %Y-%m-%d"
=A0=A0loadunit days
=A0=A0hid= eresource 1
=A0=A0caption 'All effort values are in man days.= '

=A0=A0footer -8<-
=A0=A0 =A0=3D=3D=3D Staffing = =3D=3D=3D
=A0=A0 =A0
=A0=A0 =A0All project phases are p= roperly staffed. See [[ResourceGraph]] for
=A0=A0 =A0detailed res= ource allocations.
=A0=A0 =A0
=A0=A0 =A0=3D=3D=3D Current Status =3D=3D=3D
=A0=A0 =A0
=A0=A0 =A0The project started off with a delay of 4 days. This slight= ly affected
=A0=A0 =A0the original schedule. See [[Deliveries]] f= or the impact on the
=A0=A0 =A0delivery dates.
=A0=A0->8-
}

# Macro to set the = background color of a cell according to the alert
# level of the = task.
macro AlertColor [
=A0=A0cellcolor plan.alert =3D= 0 "#00D000" # green
=A0=A0cellcolor plan.alert =3D 1 "#D0D000" # yellow
=A0=A0cellcolor plan.alert =3D 2 "#D00000" # red
]

taskreport status "" {
=A0=A0col= umns wbs, name, start, end, effort, alert { tooltip plan.journal
=A0=A0!=3D '' "<-query attribute=3D'journal'-&= gt;" }, status

=A0=A0taskreport dashboard &qu= ot;" {
=A0=A0 =A0headline "Project Dashboard (<-quer= y attribute=3D'now'->)"
=A0=A0 =A0columns name { title "Task" ${AlertColor} },
=
=A0=A0 =A0 =A0 =A0 =A0 =A0resources { width 200 ${AlertColor}=A0
=
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0start ${projectstart= } end ${projectend} },
=A0=A0 =A0 =A0 =A0 =A0 =A0alerttrend { tit= le "Trend" ${AlertColor} },
=A0=A0 =A0 =A0 =A0 =A0 =A0journalmessages { width 260 ${AlertColor} }<= /div>
=A0=A0 =A0hidetask ~hasalert(0)
=A0=A0 =A0sorttasks ale= rt.down
=A0=A0 =A0period %{${now} - 1w} +1w
=A0=A0}
=A0=A0taskreport completed "" {
=A0=A0 =A0headline "Already completed tasks"
=A0= =A0}
=A0=A0taskreport ongoing "" {
=A0=A0 =A0= headline "Ongoing tasks"
=A0=A0}
=A0=A0taskre= port future "" {
=A0=A0 =A0headline "Future tasks"
=A0=A0}
}

# A list of tasks showing the resources assign= ed to each task.
taskreport development "" {
= =A0=A0headline "Development - Resource Allocation Report"
=A0=A0columns hierarchindex, name, start, end, effort { title "Wo= rk" },
=A0=A0 =A0 =A0 =A0 =A0duration, chart { ${TaskTip} sc= ale day width 500 }
=A0=A0timeformat "%Y-%m-%d"
=A0=A0hideresource ~(isleaf() & isleaf_())
=A0=A0sortresources name.up
}

# A l= ist of all tasks with the percentage completed for each task
task= report deliveries "" {
=A0=A0headline "Project Del= iverables"
=A0=A0columns hierarchindex, name, start, end, note { width 150 }, com= plete,
=A0=A0 =A0 =A0 =A0 =A0chart { ${TaskTip} }=A0
=A0=A0hideresource 1
}
# A list of all emp= loyees with their contact details.
resourcereport contactList "" {
=A0=A0headline &qu= ot;Contact list and duty plan"
=A0=A0columns name,
=A0=A0 =A0 =A0 =A0 =A0email { celltext 1 "[mailto:<-email-> <= ;-email->]" },
=A0=A0 =A0 =A0 =A0 =A0chart { scale day }
=A0=A0hideresource= ~isleaf()
=A0=A0sortresources name.up
=A0=A0hidetask 1=
}

# A graph showing resource allocation= . It identifies whether each
# resource is under- or over-allocated for.
resourcereport r= esourceGraph "" {
=A0=A0headline "Resource Allocat= ion Graph"
=A0=A0columns no, name, effort, rate, weekly { ${= TaskTip} }
=A0=A0loadunit shortauto
=A0=A0# We only like to show leaf t= asks for leaf resources.
=A0=A0hidetask ~(isleaf() & isleaf_(= ))
=A0=A0sorttasks plan.start.up
}
----------= -------

On Mon, Nov 1, 2010 at 9:05 PM, Anthony Land= er <anthony= lander@yahoo.com> wrote:
Hi everyone,

Christian Egli and I have been having an off-list exchange about making a T= askJuggler3 exporter. In fact, Christian would like to change the current e= xporter to export to either TaskJuggler2 or TaskJuggler3, depending on a de= fcustom! We have quite a number of ideas in the pipeline now, and thought i= t would be best to move the discussion, and access to the source code, back= onto the list.

Christian has set up a github repository with the changes he is making here= : http://gith= ub.com/egli/org-mode

And the code I sent to Christian, which makes the exporter work with TJ3, a= nd also introduces some bug fixes and new features is here: http://github.com= /alander/org-taskjuggler3. Please note that this is different from Chri= stian's code, and that he is the maintainer of the exporter that is par= t of org-mode. I needed something to work, so I spent an afternoon hacking = until it did what I needed.

If you are interested in the details, our e-mail exchange is reproduced bel= ow.

=A0-Anthony


------------------------8<-------------------------

=A0 =A0 =A0 =A0From: =A0 christian.egli@sbs.ch
=A0 =A0 =A0 =A0Subject: =A0 =A0 =A0 =A0Re: [Orgmode] Re: TaskJuggler 3, re= visited
=A0 =A0 =A0 =A0Date: =A0 October 19, 2010 5:29:42 AM GMT-04:00
=A0 =A0 =A0 =A0To: =A0 =A0 anthonylander@yahoo.com
=A0 =A0 =A0 =A0Cc: =A0 =A0 emacs-orgmode@gnu.org

Hi Anthony

Anthony Lander <anthonylander@yahoo.com> writes:

Please find attached a somewhat improved version of your TJ2 exporter,
a drop-in replacement that exports to TJ3, and also a sample .org
file.

This is all exciting stuff. It's a little hard to digest (many changes<= br> rolled into one, white space formatting changes that make it hard to find the real change, common lisp idioms which I'm not familiar with). Let m= e
get back to you with some questions and then we can discuss how to most
easily merge the stuff.

- Why did you compute the leafiness? I seem to have experienced that tj3 =A0has a problem with zero effort tasks that aren't marked as milestone= s.
=A0Is that the reason?

- Why do you add a duration of 1d if the task has neither a duration, an =A0end, a period nor an effort? Shouldn't that be a milestone instead?<= br>
- I see that there is a need to annotate a project with stuff such as
=A0scenarios, etc and I was missing a way to have file specific reports
=A0or other globals. Your additional tags solve that problem. However I'= ;m
=A0a bit reluctant to add more magic tags that mark the trees in some
=A0way. I was hoping to find a more general way for this problem. So far =A0I haven't found a good solution though.

- I like the idea of the TJ drawer, but in the end you just seem to use
=A0it for the project node and the globals node. So in essence they are
=A0taskjuggler source code blocks (in disguise) which are tied to a
=A0particular node. In fact they are not even really tied to a particular =A0node, especially in the case of the globals. This goes back to the
=A0previous question about a good way to add file specific globals. Maybe =A0some kind taskjuggler specific export option is really what we are
=A0looking for.

As an aside, I think it's better to post the source code to the list. There might be other people interested in it and pitching in with
opinions and improvements.

Thanks

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

------------------------8<-------------------------

=A0 =A0 =A0 =A0From: =A0 anthonylander@yahoo.com
=A0 =A0 =A0 =A0Subject: =A0 =A0 =A0 =A0Re: [Orgmode] Re: TaskJuggler 3, re= visited
=A0 =A0 =A0 =A0Date: =A0 October 19, 2010 8:55:38 AM GMT-04:00
=A0 =A0 =A0 =A0To: =A0 =A0 christian.egli@sbs.ch

Hi Christian,


On 10-Oct-19, at 5:29 AM, Christian Egli wrote:

This is all exciting stuff. It's a little hard to digest (many changes<= br> rolled into one, white space formatting changes that make it hard to find the real change, common lisp idioms which I'm not familiar with). Let m= e
get back to you with some questions and then we can discuss how to most
easily merge the stuff.

Apologies for the big blob of changes - I was initially just trying to get = stuff to work, and, well, just kept going. As for the spacing/formatting, I= ran M-x indent-region RET on the whole file to get the formatting consiste= nt. I know it makes diffing hard, though :(

Is the unfamiliar idiom the backtick list with the ,variables in it, by cha= nce?

- Why did you compute the leafiness? I seem to have experienced that tj3 has a problem with zero effort tasks that aren't marked as milestones.<= br> Is that the reason?
- Why do you add a duration of 1d if the task has neither a duration, an end, a period nor an effort? Shouldn't that be a milestone instead?

Ah, sorry. This I should have documented. The problem is that TJ3 fails to = compile the file if there is a leaf node with no computable end date. TJ2 h= appily ignored the situation, but TJ3 throws an error. =A0So the problem I&= #39;m trying to solve is that as you are working on your project plan, it w= on't compile unless you put in a bunch of dummy estimates for the leaf = nodes.

I found it easier to let the exporter put them in, so that I don't alwa= ys think to myself, "did I put this in as a real estimate or just to m= ake the compiler happy?" Perhaps it would be better to change 1 day to= 1 minute or 1 second to make it very obviously a dummy duration that is pu= t in only to satisfy the compiler. And maybe even a comment in the exported= file, too.

Also, I hadn't thought of milestones. I think the code needs a bit of a= fix because it needs to know that a milestone has zero effort, but won'= ;t cause the compiler to fail.

- I see that there is a need to annotate a project with stuff such as
scenarios, etc and I was missing a way to have file specific reports
or other globals. Your additional tags solve that problem. However I'm<= br> a bit reluctant to add more magic tags that mark the trees in some
way. I was hoping to find a more general way for this problem. So far
I haven't found a good solution though.

I agree with you about the magic tags. I hate the feeling of reimplementing= the entire TJ3 file format in org. That's asking to always be playing = catch-up, and to always be missing features. I like very much the idea of &= quot;borrowing" features from org that make sense, and doing something= useful on export. Examples are your % doneness of a task, and your "o= rdered tasks in a hierarchy" ideas. And in fact I added using the todo= states and tags as flags so you can easily build tj reports that reference= them (see the "active" gantt chart, for example).

In the end, I felt the project needed a special marker because there are sp= ecific TJ3 features that go with it. And also, the globals need to go somew= here. I am also not thrilled with making all these tags, but I didn't h= ave a better solution either.

In any event, the TJ drawer is my attempt at a catch-all solution. It at le= ast allows a user to use missing features without waiting for a development= change. So for example, I personally will never use the accounting stuff, = and would not be very motivated to add it to the exporter, but if someone n= eeded it, they could put the required code in the TJ drawer, and they could= still use the TJ exporter for their project instead of having to abandon o= rg-mode entirely for one missing feature.

- I like the idea of the TJ drawer, but in the end you just seem to use
it for the project node and the globals node. So in essence they are
taskjuggler source code blocks (in disguise) which are tied to a
particular node. In fact they are not even really tied to a particular
node, especially in the case of the globals. This goes back to the
previous question about a good way to add file specific globals. Maybe
some kind taskjuggler specific export option is really what we are
looking for.

Interesting thought. I very much like the idea that you can do other things= with your org-file than export it to taskjuggler. For example, keep actual= notes in the file, and export it to other formats like html or LaTeX, for = purposes other than project planning. Being able to say "no, this is n= ot a task" in the task tree would be very useful. I don't know how= to do it nicely either (yet).

As an aside, I think it's better to post the source code to the list. There might be other people interested in it and pitching in with
opinions and improvements.

That's a good idea. How about if we set up a git repository on github w= ith the files, and then post the link on the mailing list? I worry that pos= ting code and patches will badly confuse the patch manager software than gr= abs code from the mailing list. Also, if we're going to do that, I thin= k we should put your email, and this reply to the list as well. Your though= ts?

All the best,

=A0-Anthony

------------------------8<-------------------------

=A0 =A0 =A0 =A0From: =A0 christian.egli@sbs.ch
=A0 =A0 =A0 =A0Subject: =A0 =A0 =A0 =A0Re: [Orgmode] Re: TaskJuggler 3, re= visited
=A0 =A0 =A0 =A0Date: =A0 October 28, 2010 3:28:13 AM GMT-04:00
=A0 =A0 =A0 =A0To: =A0 =A0 anthonylander@yahoo.com
=A0 =A0 =A0 =A0Cc: =A0 =A0 emacs-orgmode@gnu.org

Hi Anthony

Anthony Lander <anthonylander@yahoo.com> writes:

Is the unfamiliar idiom the backtick list with the ,variables in it,
by chance?

No it was more stuff like `return' and `return-from'.

Ah, sorry. This I should have documented. The problem is that TJ3
fails to compile the file if there is a leaf node with no computable
end date. TJ2 happily ignored the situation, but TJ3 throws an error.

OK, I understand. I managed to slowly integrate (some of) your changes.
It should now generate milestones for nodes that cannot be scheduled and are leaf nodes. So basically it should export valid code for tj3 if you
set org-export-taskjuggler-target-version to 3.0. Of course the report
definitions in the defcustom org-export-taskjuggler-default-reports are
not compatible with tj3 so you will need to change these.

I have (or I guess rather had) some fondness for recursive functions, so I re-implemented your leafiness function recursively. However I ran into problems with max-lisp-eval-depth and it appears that recursion is not
encouraged in Emacs lisp
(http://www.gnu.org/s/emacs/man= ual/html_node/elisp/Compilation-Tips.html#Compilation-Tips).
So I guess it's back to iterative style.

In any event, the TJ drawer is my attempt at a catch-all solution. It
at least allows a user to use missing features without waiting for a
development change. So for example, I personally will never use the
accounting stuff, and would not be very motivated to add it to the
exporter, but if someone needed it, they could put the required code
in the TJ drawer, and they could still use the TJ exporter for their
project instead of having to abandon org-mode entirely for one missing
feature.

I like the drawer stuff and will integrate it.

Interesting thought. I very much like the idea that you can do other
things with your org-file than export it to taskjuggler. For example,
keep actual notes in the file, and export it to other formats like
html or LaTeX, for purposes other than project planning.

Absolutely, I agree.

Being able to say "no, this is not a task" in the task tree would= be
very useful. I don't know how to do it nicely either (yet).

Hm, no this is not possible right now. Why would you want to do this?
Maybe we could just mark it as a comment and make the exporter honor
comments.

How about if we set up a git repository on github
with the files, and then post the link on the mailing list?

I set up a repo and pushed my changes to the code there
(http://githu= b.com/egli/org-mode).

I think we should put your email, and this reply to the
list as well.

Yes, I almost forgot. Would you mind doing that?

Thanks
Christian


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

------------------------8<-------------------------

=A0 =A0 =A0 =A0From: =A0 anthonylander@yahoo.com
=A0 =A0 =A0 =A0Subject: =A0 =A0 =A0 =A0Re: [Orgmode] Re: TaskJuggler 3, re= visited
=A0 =A0 =A0 =A0Date: =A0 October 31, 2010 11:45:34 AM GMT-04:00
=A0 =A0 =A0 =A0To: =A0 =A0 christian.egli@sbs.ch


On 10-Oct-28, at 3:28 AM, Christian Egli wrote:

Anthony Lander <anthonylander@yahoo.com> writes:

Is the unfamiliar idiom the backtick list with the ,variables in it,
by chance?

No it was more stuff like `return' and `return-from'.

I see. Well, once you were explicitly requiring 'cl.... :) And as you d= iscovered, without a tail-recursion optimizing compiler, recursive function= s are prohibitively expensive in elisp. Once you are iterating, you need a = way to exit iteration scopes before the end of the iteration.


So basically it should export valid code for tj3 if you
set org-export-taskjuggler-target-version to 3.0. Of course the report
definitions in the defcustom org-export-taskjuggler-default-reports are
not compatible with tj3 so you will need to change these.

Right. Or perhaps better, have different default reports for TJ2 or TJ3, wh= ich the exporter selects as appropriate.

Interesting thought. I very much like the idea that you can do other
things with your org-file than export it to taskjuggler. For example,
keep actual notes in the file, and export it to other formats like
html or LaTeX, for purposes other than project planning.

Absolutely, I agree.

Being able to say "no, this is not a task" in the task tree would= be
very useful. I don't know how to do it nicely either (yet).

Hm, no this is not possible right now. Why would you want to do this?
Maybe we could just mark it as a comment and make the exporter honor
comments.

Yes, marking it as a comment is not a bad idea. The reason I want to do tha= t goes with the idea of using the org file for additional purposes than jus= t a task tree. So for example, I would like to be able to have nodes with m= eeting notes, or links to related files etc etc under a task. That way I am= only maintaining one project document, not separate ones for notes, schedu= ling, etc. I think that is very much in the spirit of org-mode, which so he= avily emphasizes sparse trees, agenda views etc as ways to tease out releva= nt information from an intermingled file.

How about if we set up a git repository on github
with the files, and then post the link on the mailing list?

I set up a repo and pushed my changes to the code there
(http://githu= b.com/egli/org-mode).

I think we should put your email, and this reply to the
list as well.

Yes, I almost forgot. Would you mind doing that?

I'll do that, yes.

Best regards,

=A0-Anthony


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--001636c5a6c72f4e6e049440ca2b-- --===============1644099484== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1644099484==--