I am testing the project manager application.
It seems to me that the project manager application gantt-diagram does not display correctly. Am I wrong? It seems that the duration is not correctly calculated. Look at the following link: https://demo904.ofbiz.org/projectmgr/control/ganttChart?projectId=9000 Thanks, Torstein Hegbom |
I have found out why the Gantt Chart does not work(in my revision and on the 904demo)
The problem is that, OFBiz is generating Items like this out of the tasklist in gantChart.ftl g.AddTaskItem(new JSGantt.TaskItem(9102,"task1","12/03/2007", "12/05/2007","009900", "/projectmgr/control/taskView?workEffortId=9102", 0 , "16.0 Hrs", 0 , 0, 9101, 1)); if I change the above statically to this g.AddTaskItem(new JSGantt.TaskItem(9103,"task2","12/05/2007", "12/16/2007","009900", "/projectmgr/control/taskView?workEffortId=9103", 0 , "24.0 Hrs", 0 , 0, 9101, 1, 9102)); the, the chart displays nicely. Tracking it back to the code, I found these in GantChart.groovy taskInfo.estimatedStartDate = UtilDateTime.toDateString(taskInfo.estimatedStartDate, "MM/dd/yyyy"); taskInfo.estimatedCompletionDate = UtilDateTime.toDateString(taskInfo.estimatedCompletionDate, "MM/dd/yyyy"); I however can't seem to find a method on UtilDateTime that will avoid the encoding. Whiles I can produce the patch, I think this is very trivial and should be fixed by an OFBiz Committer so it can go into the right branches and whatever is involved in making a change. Regards Farouk A --- On Tue, 16/6/09, Torstein Hegbom <[hidden email]> wrote: From: Torstein Hegbom <[hidden email]> Subject: Gant-chart To: [hidden email] Date: Tuesday, 16 June, 2009, 11:36 AM I am testing the project manager application. It seems to me that the project manager application gantt-diagram does not display correctly. Am I wrong? It seems that the duration is not correctly calculated. Look at the following link: https://demo904.ofbiz.org/projectmgr/control/ganttChart?projectId=9000 Thanks, Torstein Hegbom |
Sorry Guys,
The browser encoded the fisrt URL. What I meant was html generated was for the start and end dates for tasks and projects, was encoded. However, if I replaced the encoding with the slashes, The gant chart worked fine. --- On Mon, 29/6/09, farouk alhassan <[hidden email]> wrote: From: farouk alhassan <[hidden email]> Subject: Re: Gant-chart To: [hidden email] Date: Monday, 29 June, 2009, 8:22 AM I have found out why the Gantt Chart does not work(in my revision and on the 904demo) The problem is that, OFBiz is generating Items like this out of the tasklist in gantChart.ftl g.AddTaskItem(new JSGantt.TaskItem(9102,"task1","12/03/2007", "12/05/2007","009900", "/projectmgr/control/taskView?workEffortId=9102", 0 , "16.0 Hrs", 0 , 0, 9101, 1)); if I change the above statically to this g.AddTaskItem(new JSGantt.TaskItem(9103,"task2","12/05/2007", "12/16/2007","009900", "/projectmgr/control/taskView?workEffortId=9103", 0 , "24.0 Hrs", 0 , 0, 9101, 1, 9102)); the, the chart displays nicely. Tracking it back to the code, I found these in GantChart.groovy taskInfo.estimatedStartDate = UtilDateTime.toDateString(taskInfo.estimatedStartDate, "MM/dd/yyyy"); taskInfo.estimatedCompletionDate = UtilDateTime.toDateString(taskInfo.estimatedCompletionDate, "MM/dd/yyyy"); I however can't seem to find a method on UtilDateTime that will avoid the encoding. Whiles I can produce the patch, I think this is very trivial and should be fixed by an OFBiz Committer so it can go into the right branches and whatever is involved in making a change. Regards Farouk A --- On Tue, 16/6/09, Torstein Hegbom <[hidden email]> wrote: From: Torstein Hegbom <[hidden email]> Subject: Gant-chart To: [hidden email] Date: Tuesday, 16 June, 2009, 11:36 AM I am testing the project manager application. It seems to me that the project manager application gantt-diagram does not display correctly. Am I wrong? It seems that the duration is not correctly calculated. Look at the following link: https://demo904.ofbiz.org/projectmgr/control/ganttChart?projectId=9000 Thanks, Torstein Hegbom |
In reply to this post by gcameo
The encoding is actually done in the FTL file. By default all "String" objects are encoded for reasons of security and so that special characters don't get interpreted as HTML. In cases like this where we don't want encoding the easiest way around it is to change it to not be a String object and there is a little utility method for that: StringUtil.wrapString(). Basically just do something like the following: ${StringUtil.wrapString(productPromo.promoText?if_exists)} -David On Jun 29, 2009, at 1:22 AM, farouk alhassan wrote: > I have found out why the Gantt Chart does not work(in my revision > and on the 904demo) > > The problem is that, OFBiz is generating Items like this out of the > tasklist in gantChart.ftl > g.AddTaskItem(new > JSGantt.TaskItem(9102,"task1","12/03/2007", > "12/05/2007","009900", > "/ > ;projectmgr/control/taskView?workEffortId=9102", 0 , > "16.0 Hrs", 0 , 0, 9101, 1)); > > if I change the above statically to this > > g.AddTaskItem(new JSGantt.TaskItem(9103,"task2","12/05/2007", > "12/16/2007","009900", "/projectmgr/control/ > taskView?workEffortId=9103", 0 , "24.0 Hrs", 0 , 0, 9101, 1, > 9102)); > > the, the chart displays nicely. > > Tracking it back to the code, I found these in GantChart.groovy > > taskInfo.estimatedStartDate = > UtilDateTime.toDateString(taskInfo.estimatedStartDate, "MM/dd/yyyy"); > taskInfo.estimatedCompletionDate = > UtilDateTime.toDateString(taskInfo.estimatedCompletionDate, "MM/dd/ > yyyy"); > > I however can't seem to find a method on UtilDateTime that will > avoid the encoding. > > Whiles I can produce the patch, I think this is very trivial and > should be fixed by an OFBiz Committer so it can go into the right > branches and whatever is involved in making a change. > > Regards > > Farouk A > > > > > --- On Tue, 16/6/09, Torstein Hegbom <[hidden email]> wrote: > > From: Torstein Hegbom <[hidden email]> > Subject: Gant-chart > To: [hidden email] > Date: Tuesday, 16 June, 2009, 11:36 AM > > I am testing the project manager application. > > > > It seems to me that the project manager application gantt-diagram > does not > display correctly. > > > > Am I wrong? It seems that the duration is not correctly calculated. > > > > Look at the following link: > > https://demo904.ofbiz.org/projectmgr/control/ganttChart?projectId=9000 > > > > Thanks, > > Torstein Hegbom > > > > |
In reply to this post by gcameo
Thank you for the report, Committed revision 789337
On Mon, 2009-06-29 at 00:22 -0700, farouk alhassan wrote: > I have found out why the Gantt Chart does not work(in my revision and on the 904demo) > > The problem is that, OFBiz is generating Items like this out of the tasklist in gantChart.ftl > g.AddTaskItem(new JSGantt.TaskItem(9102,"task1","12/03/2007", "12/05/2007","009900", "/projectmgr/control/taskView?workEffortId=9102", 0 , "16.0 Hrs", 0 , 0, 9101, 1)); ..... > > > -- Antwebsystems.com: Quality OFBiz services for competitive rates |
That is now working perfectly.
Thanks Farouk A --- On Mon, 29/6/09, Hans Bakker <[hidden email]> wrote: From: Hans Bakker <[hidden email]> Subject: Re: Gant-chart To: [hidden email] Date: Monday, 29 June, 2009, 3:15 PM Thank you for the report, Committed revision 789337 On Mon, 2009-06-29 at 00:22 -0700, farouk alhassan wrote: > I have found out why the Gantt Chart does not work(in my revision and on the 904demo) > > The problem is that, OFBiz is generating Items like this out of the tasklist in gantChart.ftl > g.AddTaskItem(new JSGantt.TaskItem(9102,"task1","12/03/2007", "12/05/2007","009900", "/projectmgr/control/taskView?workEffortId=9102", 0 , "16.0 Hrs", 0 , 0, 9101, 1)); ..... > > > -- Antwebsystems.com: Quality OFBiz services for competitive rates |
Free forum by Nabble | Edit this page |