Summary | Add link for all day events doesn't set proper timespan |
Queue | Kronolith |
Queue Version | 2.3.1 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | stpierre (at) nebrwesleyan (dot) edu |
Created | 04/27/2009 (5910 days ago) |
Due | |
Updated | 01/13/2010 (5649 days ago) |
Assigned | |
Resolved | 04/29/2009 (5908 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
MFB: Correctly create all-day events if using the all-day link in the
day view (stpierre@nebrwesleyan.edu,
Bug #8220).http://git.horde.org/diff.php/kronolith/docs/CHANGES?rt=horde-git&r1=2c0e6563163eabf02797f18c59af122a39744d58&r2=f9a8a2a6ac21252a005bfd421b44d80a3299c8d0
http://git.horde.org/diff.php/kronolith/lib/Event.php?rt=horde-git&r1=c50d3146ca4f15162b782e496e557db487218d8c&r2=f9a8a2a6ac21252a005bfd421b44d80a3299c8d0
http://git.horde.org/diff.php/kronolith/lib/Kronolith.php?rt=horde-git&r1=1422d3dbe21cf80219f3b28ab1d4946552571a36&r2=f9a8a2a6ac21252a005bfd421b44d80a3299c8d0
http://git.horde.org/diff.php/kronolith/new.php?rt=horde-git&r1=92befb78fac3bc173afa31225f1e065ea8612e58&r2=f9a8a2a6ac21252a005bfd421b44d80a3299c8d0
Assigned to Jan Schneider
State ⇒ Resolved
otherwise looked good, thanks for the patch!
http://cvs.horde.org/diff.php/kronolith/docs/CHANGES?rt=horde&r1=1.165.2.260&r2=1.165.2.261&ty=u
http://cvs.horde.org/diff.php/kronolith/lib/Driver.php?rt=horde&r1=1.116.2.82&r2=1.116.2.83&ty=u
http://cvs.horde.org/diff.php/kronolith/new.php?rt=horde&r1=1.7.2.3&r2=1.7.2.4&ty=u
Priority ⇒ 1. Low
New Attachment: allday-creation.patch
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Add link for all day events doesn't set proper timespan
Type ⇒ Bug
State ⇒ Unconfirmed
properly set the duration of the event. Instead, the event start time
is set to 12 am that day, and the end time is set one hour later, to 1
am. This is the default for events created at other times, and is an
appropriate default for non-all-day events, but is obviously not
appropriate for events intended to be all day events.
I looked into how to solve this, but it seems there are a few issues
that would have to be resolved:
1. In new.php, the event end time is, by default, set to one hour
past the start time, regardless of the value of the 'allday' GET
variable. However, changing this behavior is insufficient, because...
2. In the Kronolith_Event::html() method in Driver.php, if the event
is not initialized (i.e., $this->isInitialized() returns false), then
the end time is again set to one hour past the start time, regardless
of whether or not an end time exists.
I think the proper solution would be two steps:
1. In new.php, set the end time correctly according to the value of
the 'allday' GET variable.
2. In Kronolith_Event::html(), honor the end time if one exists;
otherwise, default the start time + 1 hour behavior. In order to
completely fix this, the behavior must be changed for all of the
various end time/date attributes Kronolith_Event::html() can render,
not just end_min.
I have attached a patch that effects these changes.