[#8716] Week view events spans are incorrect
Summary Week view events spans are incorrect
Queue Kronolith
Queue Version 2.3.2
Type Bug
State Resolved
Priority 2. Medium
Owners jan@horde.org
Requester arnaud.didry@univ-avignon.fr
Created 2009-11-18 (2896 days ago)
Due
Updated 2010-01-13 (2840 days ago)
Assigned 2009-11-29 (2885 days ago)
Resolved 2009-12-01 (2883 days ago)
Milestone 2.3.3
Patch No

Comments
arnaud.didry@univ-avignon.fr 2009-11-18 13:03:19
Hi,

As you can see in the screenshot, colspan are incorrectly calculated 
when events overlap. The bug can easily be reproduced by creating the 
same events.

We are using Horde Groupware Webmail Edtion 1.2.3 with 1.2.4 patch

Thanks for your help

arnaud.didry@univ-avignon.fr 2009-11-19 17:59:18
I think I finally found the origins of the bug.

First, $event->indent was miscalculated because $hspan doesn't count 
empties cells at the beginning of a day, which affected the 
calculation of the coverage graph.

Once this bug was corrected, I found that the span was miscalculated 
when collision occurs between two events : when the first half of an 
event "A" (width indent=0) is in collision with another event "B" 
(with indent=2); it was impossible to calculate the span of event "A" 
once event "B" is finished, affecting the value of hspan and the 
number of empties "td" appended at the end of a timeslot. To fix this, 
I stored the span of an event at its first computation.

The problem of colspan float values is still present, I temporary 
fixed it with "ceil()" but I think that another ticket needs to be 
opened.

It's not related to the bug, but I added a css class to empty cells 
between each day to be able to easily add color to them.

Everything seems to work now, I just need to do some more tests.

Sorry for my poor english, some comments in the patch may need to be 
rewritten.


arnaud.didry@univ-avignon.fr 2009-11-19 18:00:01
Here come the patch

CVS Commit <cvs@lists.horde.org> 2009-12-01 22:46:50
Changes have been made in Git for this ticket:

Fix obscure event layout bug (Bug #8716). Untested, because I can't 
login to git right now.

http://git.horde.org/diff.php/kronolith/lib/View/Week.php?rt=horde-hatchery&r1=da2812a55a55da147580f9ca3002c42a307fb1f9&r2=cb6617eb017433e477a38cd582ad318167f91ddb

CVS Commit <cvs@lists.horde.org> 2009-12-01 22:56:05
Changes have been made in CVS for this ticket:

MFG: Fix obscure event layout bug (Bug #8716).
http://cvs.horde.org/diff.php/kronolith/lib/Views/Week.php?rt=horde&r1=1.24.2.6&r2=1.24.2.7&ty=u

Jan Schneider <jan@horde.org> 2009-12-01 22:56:37
Committed, thanks!

CVS Commit <cvs@lists.horde.org> 2010-01-13 00:17:11
Changes have been made in Git for this ticket:

Fix obscure event layout bug (Bug #8716). Untested, because I can't 
login to git right now.

http://git.horde.org/diff.php/kronolith/lib/View/Week.php?rt=horde-git&r1=da2812a55a55da147580f9ca3002c42a307fb1f9&r2=cb6617eb017433e477a38cd582ad318167f91ddb