[Tickets #8220] Add link for all day events doesn't set proper timespan

bugs at horde.org bugs at horde.org
Mon Apr 27 15:06:15 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8220
------------------------------------------------------------------------------
  Ticket             | 8220
  Created By         | stpierre at nebrwesleyan.edu
  Summary            | Add link for all day events doesn't set proper timespan
  Queue              | Kronolith
  Version            | 2.3.1
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
+New Attachment     | allday-creation.patch
------------------------------------------------------------------------------


stpierre at nebrwesleyan.edu (2009-04-27 11:06) wrote:

The link to add a new all day event from the "Day" view does not  
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.






More information about the bugs mailing list