Last Comment Bug 392734 - Event dialog: start/end time get lost if 'all day event' is ticked/de-ticked once
: Event dialog: start/end time get lost if 'all day event' is ticked/de-ticked ...
Status: VERIFIED FIXED
:
Product: Calendar
Classification: Client Software
Component: Dialogs (show other bugs)
: Sunbird 0.7
: All All
: -- minor (vote)
: 1.0b1
Assigned To: Decathlon
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-18 13:32 PDT by juergen.edner
Modified: 2010-02-24 11:34 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (2.54 KB, patch)
2009-09-07 05:16 PDT, Decathlon
philipp: review+
Details | Diff | Splinter Review

Description juergen.edner 2007-08-18 13:32:09 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Thunderbird v2.0.0.6 (20070728) / Lightning v0.7pre (2007081804)

If the 'all day event' box is ticked the start/end time get lost and is set to 00:00h instead. If the box is de-ticked again the time will not be restored properly.

Reproducible: Always

Steps to Reproduce:
1. create a new event
2. tick 'all day event' box
3. de-tick 'all day event' box
Actual Results:  
start/end time get lost.

Expected Results:  
start/end time will be restored properly.
Comment 1 Martin Schröder [:mschroeder] 2007-11-10 07:54:11 PST
I can confirm the behavior with Lightning 0.8pre (2007110903) on WinXP. Christian, what is the expected behavior?
Comment 2 Mike Beltzner [:beltzner, not reading bugmail] 2008-01-29 17:13:09 PST
Oops, sorry, my bad, returning to the right component, awfully sorry about stomping your target milestone, please send hatemail to this address :(
Comment 3 benc 2009-09-01 22:13:38 PDT
I can confirm on Sunbird 0.9, Mac OS X 10.5.
Comment 4 Decathlon 2009-09-07 05:16:27 PDT
Created attachment 399055 [details] [diff] [review]
patch

Could I have an opinion here?
I think the patch covers all possible cases and, if the event is an all-day one, when the checkbox is de-ticked off, it sets the start time to next hour (like a new event).
Unfortunately I used two global variables (that I know aren't the best choice).

By the way, in the file 'calendar-event-dialog.js' there are two global variables that aren't used anywhere:
gUserID
gOrganizerID
Comment 5 Philipp Kewisch [:Fallen] 2009-10-10 06:14:21 PDT
Comment on attachment 399055 [details] [diff] [review]
patch

The first time I tested the patch, the date was reset to midnight, but afterwards I could not reproduce this. Maybe I just clicked in the wrong time slot or so. Further testing lets it look fine.

The only way we could "get rid" of those globals is to set the variables on the function object, i.e

onUpdateAllDay.oldStartTime = gStartTime.clone()

but given the large amount of globals we have I doubt its worth the extra effort.

Anyway, I'd like to have the globals prefixed with "g" and make the allday variable use "let". I'll change this before checkin.

r=philipp
Comment 6 Philipp Kewisch [:Fallen] 2009-10-10 06:16:24 PDT
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/d595d8b75570>

-> FIXED
Comment 7 Damian Szczepanik 2010-02-24 11:34:38 PST
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9pre) Gecko/20100224 Calendar/1.0b2pre

Note You need to log in before you can comment on or make changes to this bug.