[#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 (3751 days ago)
Updated 2010-01-13 (3695 days ago)
Assigned 2009-11-29 (3740 days ago)
Resolved 2009-12-01 (3738 days ago)
Milestone 2.3.3
Patch No

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

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 

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 

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.


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).

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.