Closed Bug 432966 Opened 17 years ago Closed 14 years ago

Required start date of a repeating task can be deselected after changing the calendar

Categories

(Calendar :: Tasks, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: toto18, Assigned: mmecca)

Details

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Build Identifier: Thunderbird version 2.0.0.14 (20080421) / Lightning 2008033120 A start date is mandatory for repeated task and it is selectable when change the agenda. Reproducible: Always Steps to Reproduce: 1. create a new task (start date is mandatory) 2. change the agenda (the start date is selectable) 3. unset the start date Actual Results: you have a recurrent task without start date ! Expected Results: In step 2, changing the agenda should not change other fields. I haven't try to save the task !
What Lightning version do you use? What do you mean with "change the agenda"? When do you set the task to repeat and how? Please provide detailed steps to reproduce your issue describing all your actions.
What Lightning version do you use? -> Lightning build 2008033120 What do you mean with "change the agenda"? -> from the task property view, selecting another agenda. When do you set the task to repeat and how? Please provide detailed steps to reproduce your issue describing all your actions. -> step to Reproduce: 1. create a new task 2. select a repeat time (start date is mandatory) 3. select another agenda for this task (the start date is selectable) 4. unset the start date best regards.
I can reproduce it if I change the calendar (= "agenda" ?) in the event dialog.
Confirmed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15pre) Gecko/2008051318 Calendar/0.9pre. Error in console when creating a new repeating task: Error: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [calIRecurrenceItem.getOccurrences] Source file: file:///[...]/js/calRecurrenceInfo.js Line: 409 Error in console when editing a previously created repeating task: Error: 'Illegal value' when calling method: [calIRecurrenceInfo::onStartDateChange] = NS_ERROR_ILLEGAL_VALUE Source file: file:///[...]/js/calTodo.js Line: 252
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Start date of repeated task may be unselected → Required start date of a repeating task can be deselected after changing the calendar
This bug should be used to prevent the creation of such tasks from within Sunbird/Lightning. I filed Bug 435166 for the handling of such tasks e.g. when imported from an external calendar.
Flags: wanted-calendar0.9?
Hardware: PC → All
Flags: wanted-calendar0.9? → wanted-calendar0.9+
Flags: wanted-calendar0.9+ → wanted-calendar1.0+
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081020 Calendar/1.0pre (BuildID: 20081020094120) Trying to save such a task will now report the following error: Error: uncaught exception: [Exception... "'Illegal value' when calling method: [calITodo::entryDate]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://calendar/content/calUtils.js :: setItemProperty :: line 1651" data: no]
Assignee: nobody → matthew.mecca
Attached patch fix v1 (obsolete) โ€” โ€” Splinter Review
Attachment #494296 - Flags: review?(philipp)
Status: NEW → ASSIGNED
Comment on attachment 494296 [details] [diff] [review] fix v1 > // update datetime pickers >- updateDueDate(); >- updateEntryDate(); >+ updateRepeat(); > Could you tell me more about this change? I don't see how updateRepeat() updates the datetime pickers? Don't they still need to be updated somewhere?
(In reply to comment #8) > Could you tell me more about this change? I don't see how updateRepeat() > updates the datetime pickers? Don't they still need to be updated somewhere? updateRepeat() makes sure the start date check box is locked if the task is repeating. updateRepeat() always calls updateDueDate() and updateEntryDate(), so those calls can be removed here.
Attached patch Fix - v2 (obsolete) โ€” โ€” Splinter Review
Matthew, what do you think about this patch? I've changed the call structure a bit so that its more clear what is being updated.
Attachment #511720 - Flags: review?(matthew.mecca)
Attachment #511720 - Attachment description: Fix - v1 → Fix - v2
Attachment #494296 - Attachment is obsolete: true
Attachment #494296 - Flags: review?(philipp)
Comment on attachment 511720 [details] [diff] [review] Fix - v2 The only problem with doing it this way is that updateRepeat is also called directly when the Repeat selection is changed, so the date pickers need to be updated in that case. Otherwise if a task has no Start Date set and Repeat is changed from "Does not repeat" to any other setting, the start date becomes set but can't be changed. r- based on this, I would favor keeping the call structure as it is. Also there is a similar issue when setting reminders, the disabled checkboxes become enabled when the calendar is changed - I think we can take care of that here as well.
Attachment #511720 - Flags: review?(matthew.mecca) → review-
Also, setting Repeat to a custom setting causes the Edit Recurrence dialog to pop up again when the calendar is changed.
Attached patch fix v3 โ€” โ€” Splinter Review
Adds an optional argument aSuppressDialogs to the updateRepeat and updateReminder functions to allow updating associated controls without triggering the dialogs in case of custom repeat/reminder settings. Adds updateRepeat and updateReminder to the updateCalendar function.
Attachment #511720 - Attachment is obsolete: true
Attachment #513818 - Flags: review?(philipp)
Attachment #513818 - Attachment is patch: true
Attachment #513818 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 513818 [details] [diff] [review] fix v3 Ok, lets do it. r=philipp
Attachment #513818 - Flags: review?(philipp) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: