Page 3 of 5

Re: Gantt Chart for Mantis

Posted: 19 Mar 2012, 17:33
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!
:-)

Re: Gantt Chart for Mantis

Posted: 19 Mar 2012, 17:39
by Elyes
How can I change it?

Re: Gantt Chart for Mantis

Posted: 19 Mar 2012, 21:06
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);
  
}

Re: Gantt Chart for Mantis

Posted: 19 Mar 2012, 21:40
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.

Re: Gantt Chart for Mantis

Posted: 20 Mar 2012, 00:00
by Elyes
By the way, have you checked how can we add a legend for the colors on the GRANTT graph?

Re: Gantt Chart for Mantis

Posted: 20 Mar 2012, 07:23
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

Re: Gantt Chart for Mantis

Posted: 22 Mar 2012, 15:11
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).

Re: Gantt Chart for Mantis

Posted: 22 Mar 2012, 15:53
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)

Re: Gantt Chart for Mantis

Posted: 22 Mar 2012, 16:04
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! ;-)

Re: Gantt Chart for Mantis

Posted: 22 Mar 2012, 17:16
by Elyes
Hello,
Thank you for the partch adding the legend to the chart.
I've tested it and it's working fine.

Re: Gantt Chart for Mantis

Posted: 30 Mar 2012, 11:00
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).

Re: Gantt Chart for Mantis

Posted: 30 Mar 2012, 11:33
by AlainD.
unfortunately not yet. I'm overworking these days :-(

Re: Gantt Chart for Mantis

Posted: 08 Jun 2012, 07:17
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?

Re: Gantt Chart for Mantis

Posted: 08 Jun 2012, 09:21
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.

Re: Gantt Chart for Mantis

Posted: 04 Oct 2012, 03:44
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 92868 times
3) I have check the jpgraph and it's working fine
jgraph.png
jgraph.png (137.21 KiB) Viewed 92868 times
4) Update the latest grantt_api (gantt_api_patch_20120322_Add_Legend_To_Graph.zip)


Regards,
Chew