Closed Bug 432966 Opened 13 years ago Closed 10 years ago
Required start date of a repeating task can be deselected after changing the calendar
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:220.127.116.11) Gecko/20080404 Firefox/18.104.22.168 Build Identifier: Thunderbird version 22.214.171.124 (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:126.96.36.199pre) 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.
Hardware: PC → All
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]
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.
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
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.
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.
Comment on attachment 513818 [details] [diff] [review] fix v3 Ok, lets do it. r=philipp
Attachment #513818 - Flags: review?(philipp) → review+
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/21d32ea89dbf> Backported to comm-1.9.2 <http://hg.mozilla.org/releases/comm-1.9.2/rev/4442a9d366f1> -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b3
You need to log in before you can comment on or make changes to this bug.