Closed
Bug 507105
Opened 16 years ago
Closed 16 years ago
Task list doesn't update correctly when adding/removing calendars.
Categories
(Calendar :: Tasks, defect)
Calendar
Tasks
Tracking
(Not tracked)
RESOLVED
FIXED
1.0b1
People
(Reporter: Fallen, Assigned: Fallen)
References
Details
(Keywords: regression, Whiteboard: [needed beta][no l10n impact])
Attachments
(2 files)
|
6.47 KB,
patch
|
Fallen
:
review+
|
Details | Diff | Splinter Review |
|
1.64 KB,
patch
|
mschroeder
:
review+
|
Details | Diff | Splinter Review |
bug 500718 improved handling when unchecking calendars. This caused regression bug 506322, which had a patch that only removes the most obvious error.
Wolfgang, could you find out why the task list is not refreshing correctly?
Flags: blocking-calendar1.0+
| Assignee | ||
Comment 1•16 years ago
|
||
Oops, the second mentioned bug should be bug 506608.
Blocks: 500718
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [needed beta][no l10n impact]
Comment 2•16 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2pre) Gecko/20090729 Calendar/1.0pre (BuildID: 20090729050908)
Steps to Reproduce: Setup multiple calendars with multiple tasks.
* Add or Switch On a calendar
-> Actual: task list shows only tasks from the new added calendar
-> Expected: task list shows tasks from all enabled calendars
* Remove or Switch Off a calendar
-> Actual: task list did not update
-> Expected: task list shows only the tasks from the remaining calendars
Keywords: regression
Comment 3•16 years ago
|
||
Wolfgang, any idea what is going on here?
Comment 4•16 years ago
|
||
(In reply to comment #3)
> Wolfgang, any idea what is going on here?
Yes. I am currently working on the same issue in 0.9 (Inverse ed.). I think the problem is double. There is one bug in calendar-item-editing which tries to set the endDate in checkAndSendItipItem and another bug in the handling of occurrences. I will probably produce a valid patch tomorrow.
Note that it all could be a big patch along with: https://bugzilla.mozilla.org/show_bug.cgi?id=502936#c15 , if someone would just review that code I posted 4 weeks ago...
Comment 5•16 years ago
|
||
I observed this issue in Sunbird therefore it can't be caused by invitation handling. It is a regression from the calendar handling changes in bug 500718.
Comment 6•16 years ago
|
||
(In reply to comment #5)
> I observed this issue in Sunbird therefore it can't be caused by invitation
> handling. It is a regression from the calendar handling changes in bug 500718.
I have taken a look to Lightning 1.0b. There are so many changes that I made both for this fix and 502936 that I will wait that my patch has been reviewed before doing anything else. It would not make sense to not apply both at the same time and I don't have much time to spend on this otherwise.
Comment 7•16 years ago
|
||
Tasks would not be removed in onCalendarRemoved because of the problem fixed at line 158:
- var tasks = Array.splice(this.mTaskArray);
+ this.mTreeView.treebox.beginUpdateBatch();
+ var tasks = this.mTaskArray.concat([]);
Tasks would disappear from other calendar during onCalendarAdded because the array of old tasks would be completely wiped. The fix is to keep all the tasks of the other calendars and add a "aCompleteRefresh" parameter for the "refresh" method.
Attachment #395132 -
Flags: review?
Updated•16 years ago
|
Attachment #395132 -
Flags: review? → review?(philipp)
| Assignee | ||
Comment 8•16 years ago
|
||
Comment on attachment 395132 [details] [diff] [review]
[checked in] the fix
There were a few places to change var to let, a few places to prefix functions with cal. and a few indentation problems. I took care of them all locally. r+ codewise, I'll give this a test later on and then check in.
> onCalendarAdded: function tTO_onCalendarAdded(aCalendar) {
>- if (!this.mInBatch && !aCalendar.getProperty("disabled")) {
Just out of curiosity, why is it needed to remove the batch handling here?
> <method name="refreshFromCalendar">
>+ for each (let task in this.mTaskArray) {
>+ if (task.calendar.id != aCalendar.id) {
>+ newArray.push(task);
>+ }
>+ }
newArray = [ task for each (task in this.mTaskArray)
if (task.calendar.id != aCalendar.id) ];
> <method name="refresh">
> <parameter name="aFilter"/>
> <body><![CDATA[
>- this.refreshFromCalendar(getCompositeCalendar(), aFilter);
>+ this.mTreeView.treebox.beginUpdateBatch();
>+ this.refreshFromCalendar(getCompositeCalendar(), aFilter, true);
>+ this.mTreeView.treebox.endUpdateBatch();
This won't really work as expected, since refreshFromCalendar is asynchronous. In the worst case, the batch process will begin, the network requests will be started, the batch process will end, and then the onOperationComplete will be called. Lets move the tree batch stuff to a different bug, unless you want to take care here.
>- var tasks = Array.splice(this.mTaskArray);
>+ this.mTreeView.treebox.beginUpdateBatch();
>+ var tasks = this.mTaskArray.concat([]);
I'll leave this batch stuff in though, nothing async here.
Attachment #395132 -
Flags: review?(philipp) → review+
| Assignee | ||
Comment 9•16 years ago
|
||
(In reply to comment #8)
> > <method name="refresh">
> > <parameter name="aFilter"/>
> > <body><![CDATA[
> >- this.refreshFromCalendar(getCompositeCalendar(), aFilter);
> >+ this.mTreeView.treebox.beginUpdateBatch();
> >+ this.refreshFromCalendar(getCompositeCalendar(), aFilter, true);
> >+ this.mTreeView.treebox.endUpdateBatch();
> This won't really work as expected, since refreshFromCalendar is asynchronous.
> In the worst case, the batch process will begin, the network requests will be
> started, the batch process will end, and then the onOperationComplete will be
> called. Lets move the tree batch stuff to a different bug, unless you want to
> take care here.
The way the code is now, it is also not needed. when savedThis.onOperationComplete() is called, the tree view is reset, so no batch processing needs to happen anyway.
| Assignee | ||
Comment 10•16 years ago
|
||
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/f28f880c5300>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Comment 11•16 years ago
|
||
> * Switch Off a calendar
> -> Actual: task list did not update
> -> Expected: task list shows only the tasks from the remaining calendars
I can still reproduce this issue using Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.4pre) Gecko/20090826 Calendar/1.0pre.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 12•16 years ago
|
||
Wolfgang, could you take another look?
| Assignee | ||
Comment 13•16 years ago
|
||
Stefan, if with "switch off" you mean disable, I cannot reproduce. It seems to work for me now?
Comment 14•16 years ago
|
||
With "switch off" I mean: Open the calendar properties dialog and remove the check-mark next to "Switch this calendar on".
I can still reproduce using Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.4pre) Gecko/20090902 Calendar/1.0pre.
| Assignee | ||
Comment 15•16 years ago
|
||
Duh, I was looking in the unifinder. I can also confirm.
| Assignee | ||
Comment 16•16 years ago
|
||
This should take care
Assignee: WSourdeau → philipp
Status: REOPENED → ASSIGNED
Attachment #398842 -
Flags: review?(mschroeder)
| Assignee | ||
Updated•16 years ago
|
Attachment #395132 -
Attachment description: the fix → [checked in] the fix
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [needed beta][no l10n impact] → [needed beta][no l10n impact][needs review]
Updated•16 years ago
|
Attachment #398842 -
Flags: review?(mschroeder) → review+
Comment 17•16 years ago
|
||
Comment on attachment 398842 [details] [diff] [review]
Fix - v2
r=mschroeder. Works as expected!
Updated•16 years ago
|
Whiteboard: [needed beta][no l10n impact][needs review] → [needed beta][no l10n impact]
| Assignee | ||
Comment 18•16 years ago
|
||
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/f4f457ee162b>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•15 years ago
|
Target Milestone: 1.0 → 1.0b1
You need to log in
before you can comment on or make changes to this bug.
Description
•