Gantt Chart for Mantis

General discussion of Mantis.

Moderators: Developer, Contributor

AlainD.
Posts: 57
Joined: 23 Mar 2011, 14:30
Location: Bruxelles
Contact:

Re: Gantt Chart for Mantis

Post by AlainD. »

It's not a malfunction, it is done on purpose since we are not suppose to work on the week-end, to be the most fair as possible I exclude the week-end days in the charts. For instance, if you start an issue on friday and set for instance 1 day of duration, of course the end date will not be in the week end, but at the end of the following monday!
:-)
AlainD.
ti lamp, ti lamp n'arivé!
Mantis: 1.2.5
PHP: 5.2.0
OS: Linux (etch)
Plugins: MantisGanttChart | Mantis Graphs | Source Control Integration | Subversion / WebSVN Integration
Elyes
Posts: 38
Joined: 21 Feb 2012, 13:31

Re: Gantt Chart for Mantis

Post by Elyes »

How can I change it?
Elyes
Posts: 38
Joined: 21 Feb 2012, 13:31

Re: Gantt Chart for Mantis

Post by Elyes »

Hello,
I've solved my problem by adjusting the working days. ($t_adjusted_days = 0;)
I know this is not the optimal way but it's working fine.

Code: Select all

function gantt_adjust_working_day( $p_date ){
  
  define ( GANTT_CHART_DAY_SUNDAY, 0);
  define ( GANTT_CHART_DAY_SATURDAY, 6);
  $t_one_day_in_seconds = 1 * 24 * 3600;
  $t_day = strftime( "%w", $p_date );
  
  switch ( $t_day ){
  	
    case GANTT_CHART_DAY_SUNDAY:
      $t_adjusted_days = 0;
      break;
    case GANTT_CHART_DAY_SATURDAY:
      $t_adjusted_days = 0;
      break;
    default:
    
      $t_adjusted_days = 0;
      break;
  }
  
  return $p_date + ($t_adjusted_days * $t_one_day_in_seconds);
  
}
AlainD.
Posts: 57
Joined: 23 Mar 2011, 14:30
Location: Bruxelles
Contact:

Re: Gantt Chart for Mantis

Post by AlainD. »

Yes, it'll do it wel. But maybe I would add in an update an option to allow or avoid such a feature, i.e. exclude the week-end days or not.
AlainD.
ti lamp, ti lamp n'arivé!
Mantis: 1.2.5
PHP: 5.2.0
OS: Linux (etch)
Plugins: MantisGanttChart | Mantis Graphs | Source Control Integration | Subversion / WebSVN Integration
Elyes
Posts: 38
Joined: 21 Feb 2012, 13:31

Re: Gantt Chart for Mantis

Post by Elyes »

By the way, have you checked how can we add a legend for the colors on the GRANTT graph?
AlainD.
Posts: 57
Joined: 23 Mar 2011, 14:30
Location: Bruxelles
Contact:

Re: Gantt Chart for Mantis

Post by AlainD. »

Not yet, I don't have a lot of time this beginning of the week.
But looks possible using the jpgraph MGraph class... I'll try to do something by the end of the week if I can free some time.

source and documentation: http://jpgraph.net/doc/howto1.php
AlainD.
ti lamp, ti lamp n'arivé!
Mantis: 1.2.5
PHP: 5.2.0
OS: Linux (etch)
Plugins: MantisGanttChart | Mantis Graphs | Source Control Integration | Subversion / WebSVN Integration
Elyes
Posts: 38
Joined: 21 Feb 2012, 13:31

Re: Gantt Chart for Mantis

Post by Elyes »

Hello,
I'm wondering whether we can add the relationship (Parent Of, Child Of) between issues in the GANTT chart.
Or something like an ordinal relationship (One issue can't start before some other one has finished).
AlainD.
Posts: 57
Joined: 23 Mar 2011, 14:30
Location: Bruxelles
Contact:

Re: Gantt Chart for Mantis

Post by AlainD. »

I disagree with that last one. This is not the purpose of the plugin. The plugin just displays gantt charts, it does not do the work of the manager. This is a task the manager should take care of, by using why not the help of the GanttChart plugin :-)
But indeed, maybe I could add something to display child bug different from the parent bugs, like it is displayed in the roadmap for instance, with an extra space before the issue.

Anyway, I tried something tricky here for the legend. Can you try it please ? (cf attachement)
(I create a fake line plot graph which I hide, but I display it's legend. Then I combine the 2 graphs by using MGraph)
Attachments
gantt_api_patch_20120322_Add_Legend_To_Graph.zip
Patch gantt_api.php in order to add a legend to the graph.
(6.8 KiB) Downloaded 4218 times
AlainD.
ti lamp, ti lamp n'arivé!
Mantis: 1.2.5
PHP: 5.2.0
OS: Linux (etch)
Plugins: MantisGanttChart | Mantis Graphs | Source Control Integration | Subversion / WebSVN Integration
AlainD.
Posts: 57
Joined: 23 Mar 2011, 14:30
Location: Bruxelles
Contact:

Re: Gantt Chart for Mantis

Post by AlainD. »

Elyes wrote:Hello,
I'm wondering whether we can add the relationship (Parent Of, Child Of) between issues in the GANTT chart.
Or something like an ordinal relationship (One issue can't start before some other one has finished).
Well... at a second thought maybe it's not a bad idea after all... We could then use the grouping function of the gantt chart, and relations, etc...
Yeah we could think of something here... sorry 'bout what I said before, and thank for the idea in fact! ;-)
AlainD.
ti lamp, ti lamp n'arivé!
Mantis: 1.2.5
PHP: 5.2.0
OS: Linux (etch)
Plugins: MantisGanttChart | Mantis Graphs | Source Control Integration | Subversion / WebSVN Integration
Elyes
Posts: 38
Joined: 21 Feb 2012, 13:31

Re: Gantt Chart for Mantis

Post by Elyes »

Hello,
Thank you for the partch adding the legend to the chart.
I've tested it and it's working fine.
Elyes
Posts: 38
Joined: 21 Feb 2012, 13:31

Re: Gantt Chart for Mantis

Post by Elyes »

Hello,
Any clues about the following hint?
Elyes wrote: I'm wondering whether we can add the relationship (Parent Of, Child Of) between issues in the GANTT chart.
Or something like an ordinal relationship (One issue can't start before some other one has finished).
AlainD.
Posts: 57
Joined: 23 Mar 2011, 14:30
Location: Bruxelles
Contact:

Re: Gantt Chart for Mantis

Post by AlainD. »

unfortunately not yet. I'm overworking these days :-(
AlainD.
ti lamp, ti lamp n'arivé!
Mantis: 1.2.5
PHP: 5.2.0
OS: Linux (etch)
Plugins: MantisGanttChart | Mantis Graphs | Source Control Integration | Subversion / WebSVN Integration
TomR
Posts: 55
Joined: 01 Aug 2006, 10:22

Re: Gantt Chart for Mantis

Post by TomR »

Is this plugin suppose to work when using a custom field of type date as end date?

I seems to work fine when using a duration ( numeric ) in days to calculatie an end date. However when using a custom field of type date as end date , it seems it will still calculate with the duration in seconds which gives me end dates in the far future and th graph is not displaying due to MAX_GANTTIMG_SIZE.

Can anyone verify this?
AlainD.
Posts: 57
Joined: 23 Mar 2011, 14:30
Location: Bruxelles
Contact:

Re: Gantt Chart for Mantis

Post by AlainD. »

No, the custom field must be a duration in days, not a date.
But normally, instead of custom field, the plugin should be able to work also with mantis 'due date' if activated in the config_inc.php file.
AlainD.
ti lamp, ti lamp n'arivé!
Mantis: 1.2.5
PHP: 5.2.0
OS: Linux (etch)
Plugins: MantisGanttChart | Mantis Graphs | Source Control Integration | Subversion / WebSVN Integration
chewhg
Posts: 1
Joined: 04 Oct 2012, 03:24

Re: Gantt Chart for Mantis

Post by chewhg »

Hi AlainD,

First of all, thanks for developing a good plugin!
Nevertheless, I need a little help you as I couldn't get the grantt chart working.

The result I get :
Clicking on the item in Grant Chart Roadmap, I get a blank page
(mantis/plugin.php?page=MantisGanttChart/summary_gantt_chart.php&project_id=3&version_id=2&inherited=)

A few things that I have checked,
1) Custom Field
- Estimated Duration - String
- Start Date - Date
- Link to all the projects
2) Plugin Config
config.png
config.png (16.66 KiB) Viewed 82319 times
3) I have check the jpgraph and it's working fine
jgraph.png
jgraph.png (137.21 KiB) Viewed 82319 times
4) Update the latest grantt_api (gantt_api_patch_20120322_Add_Legend_To_Graph.zip)


Regards,
Chew
Post Reply