Gantt Chart for Mantis

General discussion of Mantis.

Moderators: Contributor, Developer

Re: Gantt Chart for Mantis

Postby AlainD. » Mar 19, 2012 12:33 pm

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
AlainD.
 
Posts: 57
Joined: Mar 23, 2011 9:30 am
Location: Bruxelles

Re: Gantt Chart for Mantis

Postby Elyes » Mar 19, 2012 12:39 pm

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

Re: Gantt Chart for Mantis

Postby Elyes » Mar 19, 2012 4:06 pm

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);
 
}
Elyes
 
Posts: 38
Joined: Feb 21, 2012 8:31 am

Re: Gantt Chart for Mantis

Postby AlainD. » Mar 19, 2012 4:40 pm

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
AlainD.
 
Posts: 57
Joined: Mar 23, 2011 9:30 am
Location: Bruxelles

Re: Gantt Chart for Mantis

Postby Elyes » Mar 19, 2012 7:00 pm

By the way, have you checked how can we add a legend for the colors on the GRANTT graph?
Elyes
 
Posts: 38
Joined: Feb 21, 2012 8:31 am

Re: Gantt Chart for Mantis

Postby AlainD. » Mar 20, 2012 2:23 am

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
AlainD.
 
Posts: 57
Joined: Mar 23, 2011 9:30 am
Location: Bruxelles

Re: Gantt Chart for Mantis

Postby Elyes » Mar 22, 2012 10:11 am

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).
Elyes
 
Posts: 38
Joined: Feb 21, 2012 8:31 am

Re: Gantt Chart for Mantis

Postby AlainD. » Mar 22, 2012 10:53 am

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 444 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: Mar 23, 2011 9:30 am
Location: Bruxelles

Re: Gantt Chart for Mantis

Postby AlainD. » Mar 22, 2012 11:04 am

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
AlainD.
 
Posts: 57
Joined: Mar 23, 2011 9:30 am
Location: Bruxelles

Re: Gantt Chart for Mantis

Postby Elyes » Mar 22, 2012 12:16 pm

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: Feb 21, 2012 8:31 am

Re: Gantt Chart for Mantis

Postby Elyes » Mar 30, 2012 6:00 am

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).
Elyes
 
Posts: 38
Joined: Feb 21, 2012 8:31 am

Re: Gantt Chart for Mantis

Postby AlainD. » Mar 30, 2012 6:33 am

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
AlainD.
 
Posts: 57
Joined: Mar 23, 2011 9:30 am
Location: Bruxelles

Re: Gantt Chart for Mantis

Postby TomR » Jun 08, 2012 2:17 am

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?
TomR
 
Posts: 48
Joined: Aug 01, 2006 5:22 am

Re: Gantt Chart for Mantis

Postby AlainD. » Jun 08, 2012 4:21 am

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
AlainD.
 
Posts: 57
Joined: Mar 23, 2011 9:30 am
Location: Bruxelles

Re: Gantt Chart for Mantis

Postby chewhg » Oct 03, 2012 10:44 pm

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 7561 times

3) I have check the jpgraph and it's working fine
jgraph.png
jgraph.png (137.21 KiB) Viewed 7561 times

4) Update the latest grantt_api (gantt_api_patch_20120322_Add_Legend_To_Graph.zip)


Regards,
Chew
chewhg
 
Posts: 1
Joined: Oct 03, 2012 10:24 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 8 guests