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

gain

  • Freshman
  • *
  • Posts: 30
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #30 on: March 03, 2010, 12:53:28 pm »
I'm trying to install it on Feng Office 1.6.2, but have problems with sql script:
ERROR 1146 (42S02) at line 50: Table 'fengoffice.my_workspaces' doesn't exist.  Tried also with a new installation, but no success and same error...

I may have left the brief instructions in the SQL file out in my haste to re-post them.  If your database is not named "fengoffice" you will need to simply search and replace each occurrence of fengoffice with the name of your database.  Then the SQL scripts should work.

Database name is ok!

Solved executing one query at a time in a new order (functions first, my_workspaces, my_taskparents, my_tasks, and the others in the file order...) perhaps no lab tab in the menu... :|

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 #31 on: March 03, 2010, 01:08:40 pm »
Excellent!  Glad you got it sorted.
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.

WiZaxx

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #32 on: March 03, 2010, 02:09:14 pm »
While the Feng Office team is welcome to any and all of this work, I do not imagine it is of a quality that they would want to support in its current state.

IMHO the least FO can do is provide you with dependencies. Hello ... ConradO?!

As for the quality, well do not underestimate what you have done 8), remarkable at the least. And isn't that what commercial team should do? Polish the community work, I mean.

--Wz


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 #33 on: March 03, 2010, 03:00:36 pm »
OKAY, here is the next version, 7.0.

This version does a few things right, maybe.  ;D

First of all, I think I have the SQL script in an order that will execute without errors.  It may generate warnings, but that's expected when you are creating objects that are dependent on one another.  (If you run the script and get warnings, you can safely run it again, as it is only dropping and creating its own objects, and the dependencies will be satisfied for certain the second time around.)

I finally found a nice MySQL program that helped me to create the SQL script, Toad Freeware for MySQL.

Lastly, this verion will sort your Gantt closer to what you might expect.  Alphabetically for workspaces, and by start then end date for tasks.

Milestones are the odd man out, because their start and end dates are being reset by jsGantt based on their constituent tasks, so we'll have to figure that out later.  I believe you can at least move them around on the Gantt chart by setting their start and end dates correctly?

The original post will be updated with feng_gantt_7.0
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 #34 on: March 03, 2010, 03:03:53 pm »
IMHO the least FO can do is provide you with dependencies. Hello ... ConradO?!
As for the quality, well do not underestimate what you have done 8), remarkable at the least. And isn't that what commercial team should do? Polish the community work, I mean.
--Wz

Well, this doesn't really qualify even as a "plug-in" at this point, it's more of a very ambitious hack, and the coders at Feng Office have every right to roll their eyes.  ::)

But it *does* meet a need.  ;D
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 #35 on: March 03, 2010, 04:52:44 pm »
IMHO the least FO can do is provide you with dependencies. Hello ... ConradO?!

Unfortunately Wz, there is no place in Feng Office to denote a dependency, unless we create a custom field for it which makes it a bit cumbersome to manage or unless we add a column to one or more tables, which makes it a bit cumbersome to persist through upgrades.

But we'll keep noodling about it.
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.

maxxer

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #36 on: March 04, 2010, 06:20:35 am »
Solved executing one query at a time in a new order (functions first, my_workspaces, my_taskparents, my_tasks, and the others in the file order...) perhaps no lab tab in the menu... :|


quote this, I cannot get the "Gannt" tab to appear.

Guite

  • Guest
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #37 on: March 04, 2010, 06:41:26 am »
A few minor issues to fix:
Code: [Select]
    $workspaces = (isset($_POST['selWorkspaces']) ? $_POST['selWorkspaces'] : array());
    $resources = (isset($_POST['selResources']) ? $_POST['selResources'] : array());
    $startdate = (isset($_POST['pStart']) && isdate($_POST['pStart']) ? $_POST['pStart'] : '');
    $enddate = (isset($_POST['pEnd']) && isdate($_POST['pEnd']) ? $_POST['pEnd'] : '');
    $truncate = (isset($_POST['txtTruncate']) && is_numeric($_POST['txtTruncate'])) ? (int)$_POST['txtTruncate'] : 0;
    $color = (isset($_POST['chkColor']) && ($_POST['chkColor'] == 'on' || $_POST['chkColor'] == 'checked') ? true : false);
    $complete = (isset($_POST['chkComplete']) && ($_POST['chkComplete'] == 'on' || $_POST['chkComplete'] == 'checked') ? true : false);

Typos to replace (capitalisation) (found two times):
Code: [Select]
if ($SQL_workspaces || $SQL_resources || $SQL_Start || $SQL_End || $SQL_OVERRIDE) {
becomes
Code: [Select]
if ($SQL_workspaces || $SQL_resources || $SQL_start || $SQL_end || $SQL_OVERRIDE) {

Guite

  • Guest
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #38 on: March 04, 2010, 06:44:17 am »
Code: [Select]
<input name="pStart" type="text" value="<?php echo (isset($_POST['pStart']) ? $_POST['pStart'] : ''); ?>" />
<input name="pEnd" type="text" value="<?php echo (isset($_POST['pEnd']) ? $_POST['pEnd'] : ''); ?>" />

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 #39 on: March 04, 2010, 12:58:42 pm »
A few minor issues to fix:

Typos to replace (capitalisation) (found two times):
Code: [Select]
if ($SQL_workspaces || $SQL_resources || $SQL_Start || $SQL_End || $SQL_OVERRIDE) {
becomes
Code: [Select]
if ($SQL_workspaces || $SQL_resources || $SQL_start || $SQL_end || $SQL_OVERRIDE) {

Thanks for the pointers!  Apparently I did the same thing as your ISSET with a hidden $submitted variable in a later version, and I had already fixed the capitalization, but I did add your ISSET logic anyway.
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 #40 on: March 04, 2010, 04:44:06 pm »
Feng Gantt 8.0 has been posted.

Sorting is improved and takes into account more circumstances than before, such as missing dates.

Input is escaped more completely and accurately.

Each task name and bar will, when clicked, open a new email addressed to the Resource of that task and having the task Name as the subject.  This required a slight modification to jsgantt.js to avoid having a small (one line) blank window appear each time.  The resource will have to have their e-mail address entered in Feng Office for it to be available.

Truncation now defaults to 50, and Color is now the default.
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.

WiZaxx

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
That's really weird ....
« Reply #41 on: March 06, 2010, 04:30:38 am »
I have it (sort of) working, finally.
   Got the SQL script running without any error.
   Got the selection page to display in my custom (Gantt) tab with the list of workspaces

... but then it goes all wrong:
rather than showing the Gantt chart, it takes me to the overview tab  ???

Anyone seen/solved this?

Cheers,
Wz

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 #42 on: March 06, 2010, 10:40:36 am »
Does it take you to the overview page when you click the Submit button?
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 #43 on: March 06, 2010, 10:52:14 am »
Apparently there are many, many ways to sort a @#$! Gantt chart, and it depends on how you store your projects and how you treat milestones and tasks.

We will be documenting the method we use and freezing the sort model in the next revision.  It requires some pretty complex SQL, but we're trying to do it all there instead of client-side.

More to come...
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.

WiZaxx

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: How to Add Gantt Charts (JSGantt) to Feng Office
« Reply #44 on: March 06, 2010, 02:24:00 pm »
Does it take you to the overview page when you click the Submit button?

Yes it does, and I gave up trying to find the reason by myself.
Any idea on how to fix it?

Thanks,
--Wz