Opened 5 years ago

# Shift of taskbar in graph

Reported by: Owned by: sgeulette ChrisNelson high TracJsGanttPlugin major lucalenardi 0.12

### Description

If you see the example graph, there is a shift of the taskbar regarding start date and end date. Example with the ticket named "Constructor proc": the start date is 2/21/2011 but the taskbar begins on 2/20. The end date is 3/9 but the taskbar ends on 3/8. Is it possible to correct this ? For me it's blocking to use the plugin. I also need to use this kiind of chart to schedule tasks. I have seen in another ticket you work on this aspect. For it, I have locally adapted the code to align subtickets (when no end date is defined) on the parent end date (parent used here as "milestone", but not in the graph). Are you interested by the code? Another improvement should be to serialize tickets assigned to the same developer: calculate start and end of developer tickets regarding the others, like the "succ" functionality. Stephan Geulette

### comment:1 Changed 5 years ago by ChrisNelson

• Status changed from new to assigned

I wonder if this relates to [10474]? Can you try it the code before that change?

### comment:2 Changed 5 years ago by ChrisNelson

I do not see this on live data, only in the sample. Can you attach a screen shot of it failing for you with live data?

### Changed 5 years ago by sgeulette

live data screenshot with taskbar shift

### comment:3 Changed 5 years ago by sgeulette

with rev 10473, the start is good but not the end. If we only do:

It is good !

### comment:4 follow-up: ↓ 5 Changed 5 years ago by rjollos

Just thought I'd mention in case it is helpful, the start and end dates line up fine on my Trac instance and I've installed version 0.8 that includes [10474].

### comment:5 in reply to: ↑ 4 ; follow-up: ↓ 7 Changed 5 years ago by ChrisNelson

Just thought I'd mention in case it is helpful, the start and end dates line up fine on my Trac instance and I've installed version 0.8 that includes [10474].

Ryan, what version of Trac are you using?

What browsers are you two using?

### comment:6 in reply to: ↑ description Changed 5 years ago by ChrisNelson

... For it, I have locally adapted the code to align subtickets (when no end date is defined) on the parent end date (parent used here as "milestone", but not in the graph). Are you interested by the code? Another improvement should be to serialize tickets assigned to the same developer: calculate start and end of developer tickets regarding the others, like the "succ" functionality. Stephan Geulette

We're working on adding some soft scheduling like you describe. I think we have a somewhat different and more comprehensive approach than yours so I don't know how much your code would help. But thank you for the offer.

### comment:7 in reply to: ↑ 5 Changed 5 years ago by rjollos

Ryan, what version of Trac are you using?

What browsers are you two using?

Ahh yes, I should know to include those details by now ;)

I'm using Trac 0.11.7. I'm on Windows 7 x64 - Firefox 5 and IE 9 are correct. The bars in the graph are shifted by -1 from their correct dates on Chrome 12.0!

### comment:8 follow-up: ↓ 9 Changed 5 years ago by sgeulette

I use Trac 0.12.2 with Firefox 5.0 on Ubuntu 11.04.

Concerning your scheduling approach, can you give me more details. When do you plan it will be finished. It will be helpful for us to have those informations to decide if we wait your version or if we must work on another approach. Thanks in advance.

Where can I send you my code that include corrections, spaces replacing tabs, little optimizations and the method to inherit a date from a parent ?

### comment:9 in reply to: ↑ 8 Changed 5 years ago by ChrisNelson

I use Trac 0.12.2 with Firefox 5.0 on Ubuntu 11.04.

OK. This issue seems to be browser-dependent and I'm not sure how to address that.

Concerning your scheduling approach, can you give me more details.

We're working on a Scheduler plugin that will define a task scheduler extension point and provide a default implementation. That implementation will take a list of tickets and do a somewhat-naive resource-constrained schedule of the tickets. Initially, we plan to integrate that with TracJsGantt so that you can say schedule=1 and see the effect of dependencies and resource conflicts. When we build confidence in the scheduling implementation, we'll add a ticket change listener which can reschedule in the background whenever a ticket is updated.

When do you plan it will be finished.

We may not be *finished* for quite a while but we hope to have something useful in a week or so.

It will be helpful for us to have those informations to decide if we wait your version or if we must work on another approach. Thanks in advance.

Where can I send you my code that include corrections, spaces replacing tabs, little optimizations and the method to inherit a date from a parent ?

Create tickets here and attach patches.

### Changed 5 years ago by sgeulette

All my modifications, sorry to not divide it. I can do it next week if you want...

### comment:10 follow-up: ↓ 11 Changed 5 years ago by sgeulette

I have attached all my modifications. I'm now on holliday. I can separate patches next week if you want.

### comment:11 in reply to: ↑ 10 Changed 5 years ago by ChrisNelson

I have attached all my modifications. I'm now on holliday. I can separate patches next week if you want.

Yes, please; it's very hard for me to apply one big patch with multiple unrelated changes in it.

### comment:12 Changed 5 years ago by ChrisNelson

• Severity changed from blocker to major

I can't handle a browser bug (or dependency) as a critical issue.

### comment:13 Changed 5 years ago by Luca Lenardi

• Cc lucalenardi added; anonymous removed

I'm getting the same problem on Chrome, Firefox and Safari. There is exactly 1 day shift over the correct value: for example a task which should start at 5th and end at 8th, is displayed from 4th to 7th on the graph. Note that the problem also affects milestones.

I'm quite sure that it's not a browser dependent issue as I cannot reproduce the problem by looking at the example below: http://www.jsgantt.com/

I'm on OSX 10.7, Server is Ubuntu 11.04 and Trac version is 0.12.

### comment:14 Changed 5 years ago by Luca Lenardi

I can confirm that the following change solves the problem for tickets (not for milestones).

//vTaskLeft -= 1;


### comment:15 follow-up: ↓ 16 Changed 5 years ago by sgeulette

Hi, is the scheduler plugin already working ? Thanks Stephan

### comment:16 in reply to: ↑ 15 Changed 5 years ago by ChrisNelson

Hi, is the scheduler plugin already working ?

Sadly, no. The intern I had working on it went back to school. I'm working on getting set up to take the work back but I likely won't have anything for a month.

### comment:17 Changed 5 years ago by ChrisNelson

(In [10832]) Tweak task positioning. Refs #9003.

### comment:18 Changed 5 years ago by ChrisNelson

This looks better for me when viewed in FF 7 on Ubuntu 10.04. If it doesn't look right for you, please provide browser details.

### comment:19 Changed 5 years ago by rjollos

Looks good for my on FF7 / Win7 x64. Prior to pulling in the latest changes it was off by 1 day.

### comment:20 Changed 5 years ago by rjollos

Shifted by +1 day in Chrome 14 on Windows x64.

### comment:21 Changed 5 years ago by Luca Lenardi

Same problem here.

a) Chrome 15 on OSX Lion: milestone and task shifted by +1 day b) Firefox 8 on OSX Lion: milestone shifted by +1 day, tasks are ok. c) Safari 5.1 on OSX Lion: milestone shifted by +1 day, tasks are ok.