Author Topic: How to Add Gantt Charts (JSGantt) to Feng Office  (Read 185026 times)

gah242s

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #135 on: April 20, 2010, 06:10:34 PM »
Allen,

All of this looks great and I'm ready to implement, but after 9 pages of forum posts, I'm a little lost on where to find the latest and greatest version.  Would it be possible to do this in the Wiki somewhere?

Thanks

(Oops! Knew I should have looked before I typed.  Sorry about that Allen!)
« Last Edit: April 20, 2010, 06:20:18 PM by gah242s »

Syrion

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Studio Krater v.o.f.
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #136 on: April 21, 2010, 11:16:44 AM »
Hi, really cool work.

is it going to be at Feng 1.7 by defaul?

Daniel

Feng 1.7 is already in testing phase. It will make it for Feng 1.8.

Just wondering: if I implement this in my current installation (1.7.2 beta) with the instructions specified by Allen, will I lose data if I update to 1.8 later?

darkbalder

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #137 on: April 21, 2010, 01:35:10 PM »
Hi,

First of all, Great work!!!

I'm trying to install but:

When I execute feng_gantt_11.2.sql, I have this error:
Code: [Select]
$ mysql -u openuser -p fo < application/views/lab/feng_gantt_11.2.sql
Enter password:
ERROR 1064 (42000) at line 198: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
It is DELETE FROM my_tblworkspaces;

When I disable this line (using -- ), I have another error:
Code: [Select]
$ mysql -u openuser -p fo < application/views/lab/feng_gantt_11.2.sql
Enter password:
ERROR 1064 (42000) at line 198: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 246
It is ORDER BY pOrderBy) AS subSelect, (SELECT @rowcount:=0) AS rowcountinit;

What can I do??

My mysql version:
$ mysql -V
mysql  Ver 14.12 Distrib 5.0.90, for pc-linux-gnu (x86_64) using readline 6.1


allenlook

  • Volunteer Moderator
  • Sr. Member
  • ****
  • Posts: 312
    • MSN Messenger - sii_lookal@hotmail.com
    • View Profile
    • SI Group, Inc.
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #138 on: April 21, 2010, 01:57:37 PM »
Is the initial error at line 198, or is it at line 4.  The error message indicates both line numbers...

What is that corresponding line of code?
I am a volunteer moderator.  Any statements, opinions or observations I contribute are solely mine and are not necessarily shared by the makers of Feng Office.

darkbalder

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #139 on: April 21, 2010, 02:13:51 PM »
Line 198 is:

CREATE PROCEDURE fo.`get_my_workspaces`()

and procedure's Line 4:

DELETE FROM my_tblworkspaces;     

Code: [Select]

CREATE PROCEDURE fo.`get_my_workspaces`()
BEGIN

DELETE FROM my_tblworkspaces;

INSERT INTO my_tblworkspaces

...


allenlook

  • Volunteer Moderator
  • Sr. Member
  • ****
  • Posts: 312
    • MSN Messenger - sii_lookal@hotmail.com
    • View Profile
    • SI Group, Inc.
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #140 on: April 21, 2010, 02:39:45 PM »
If whitespace is ignored, the fourth line might be:

Code: [Select]
SELECT CONCAT('9', LPAD(@rowcount:=@rowcount+1, 4, '0')) AS rowcount, subSelect.*
That function alone took two weeks to puzzle through and had to work around numerous MySQL bugs, so I wonder if it's a version kind of thing...
I am a volunteer moderator.  Any statements, opinions or observations I contribute are solely mine and are not necessarily shared by the makers of Feng Office.

darkbalder

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #141 on: April 21, 2010, 03:39:02 PM »
I don't think that white spaces are ignored because when I documented this line:
Code: [Select]
DELETE FROM my_tblworkspaces;

there is another error in procedure's line 246:

Code: [Select]
ORDER BY pOrderBy) AS subSelect, (SELECT @rowcount:=0) AS rowcountinit;

the error:
Code: [Select]
ERROR 1064 (42000) at line 198: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 246

BTW, In which version on mysql this script runs well????

Thanks for your time :)

allenlook

  • Volunteer Moderator
  • Sr. Member
  • ****
  • Posts: 312
    • MSN Messenger - sii_lookal@hotmail.com
    • View Profile
    • SI Group, Inc.
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #142 on: April 21, 2010, 03:51:00 PM »
I'm running on 5.1.41.
I am a volunteer moderator.  Any statements, opinions or observations I contribute are solely mine and are not necessarily shared by the makers of Feng Office.

gah242s

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #143 on: April 21, 2010, 06:48:36 PM »
@darkbalder

I had the same issue.  I had to add the "delimiter $$" line before each "CREATE PROCEDURE ... " line.  Then change the ; to a $$ after the END for each block and then add a "delimiter ;" line after the END$$ line.  (Lost yet?)  Fortunately, I only had to do that for the procedures.

Allenlook, what would it look like if that were the standard file?  Would it mess up cli interfaces?

Thanks

allenlook

  • Volunteer Moderator
  • Sr. Member
  • ****
  • Posts: 312
    • MSN Messenger - sii_lookal@hotmail.com
    • View Profile
    • SI Group, Inc.
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #144 on: April 22, 2010, 08:59:41 AM »
Gosh, I don't know, I'm not really a MySQL expert at all.  :(  Nor a PHP expert, truth be told.  ??? Nor a Feng Office expert, in fact least of all.  :o

If you think it would fix the problem, and if most people are running the file all at once, I'd be happy to update the code that way to make it easier.  8)

I just used Toad Freeware to generate all the MySQL code, and it all ran, so I wonder if there's a simpler way to turn on this delimiter option at the beginning and end of the file?

We're really a SQL Server shop, and we have many, many SQL Server databases, but we only have two MySQL databases, Feng Office being one of them.
I am a volunteer moderator.  Any statements, opinions or observations I contribute are solely mine and are not necessarily shared by the makers of Feng Office.

darkbalder

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #145 on: April 22, 2010, 11:42:13 AM »
Thanks for your help,

gah242s,  that's the solution! :)

I'm not an sql expert and php noob but I think is better work with php to code functions for get gantt data, what do you think?. I really need this module and I can contribute to develop it :).

allenlook

  • Volunteer Moderator
  • Sr. Member
  • ****
  • Posts: 312
    • MSN Messenger - sii_lookal@hotmail.com
    • View Profile
    • SI Group, Inc.
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #146 on: April 22, 2010, 11:46:16 AM »
We decided to do it in MySQL for those who wanted project data outside of Feng Office for other systems (we already have some other ideas on what we want to do with our project/task data in conjunction with SQL Server and SharePoint)
I am a volunteer moderator.  Any statements, opinions or observations I contribute are solely mine and are not necessarily shared by the makers of Feng Office.

allenlook

  • Volunteer Moderator
  • Sr. Member
  • ****
  • Posts: 312
    • MSN Messenger - sii_lookal@hotmail.com
    • View Profile
    • SI Group, Inc.
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #147 on: April 23, 2010, 12:45:09 PM »
There is a new version which adds a feature I needed now that it's getting later in the year.  I wanted the simple ability to limit the Gantt chart to a date range.  One unfortunate side effect of this is that jsGantt does not give you a way to do this, and it automatically sets the chart range to be the full extent of the earliest and latest tasks selected, so I cheated and modified the start and end dates of all tasks to fall within the given date range.

You'll see two new date fields on the form, called "Chart Dates", and they are explained in the text on the left of the form, including this side effect.

ONLY index.php was modified, and you don't need to run any of the SQL scripts if you already have the latest version installed..

« Last Edit: April 23, 2010, 12:49:43 PM by allenlook »
I am a volunteer moderator.  Any statements, opinions or observations I contribute are solely mine and are not necessarily shared by the makers of Feng Office.

chuelibrueder

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #148 on: April 27, 2010, 07:42:51 AM »
Just a little info about the code to integrate gantt in a tab. For me it was important to have no linebreak in the following code from allenlook before
Code: [Select]
src="http://fengoffice.insert-your-domai....

(The complete post ist on page 5)

Third, you add the tab to the tab panel by adding the following section to 'public/assets/javascript/og/layout.js'.  Add it just BEFORE the following line of code: og.panels.reporting = new og.ContentPanel({

Code: [Select]
// AEL - Begin mod to add lab panel to Feng Office
og.panels.lab = new og.ContentPanel({
title: lang('labs'),
id: 'labs-panel',
iconCls: 'ico-labs',
refreshOnWorkspaceChange: false,
defaultContent: {
type: 'html',
data: '<iframe style="width:100%;height:100%;border:0"
                    src="http://fengoffice.insert-your-domain.com/application/views/lab/index.php"></iframe>'
}
}),
// AEL - End mod to add lab panel to Feng Office
« Last Edit: April 27, 2010, 01:03:37 PM by chuelibrueder »

chuelibrueder

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #149 on: April 27, 2010, 01:11:30 PM »
Thanks a lot for your work allenlook

Is it correct that only task are shown which are part of a milestone?

I think task without a milestone should also be shown, groupt according to their workspace, or if that's to complicated wihtout grouping.

Sadly the php is already to complicated for me to make an attempt. I didn't understand how the query is done.

Greetings chuelibrueder

 

anything