Deleting a task from tasklist -> no agenda update

VERIFIED FIXED in 0.7

Status

Calendar
Calendar Views
VERIFIED FIXED
11 years ago
10 years ago

People

(Reporter: Andreas Treumann, Assigned: Michael Büttner (no reviews TFN))

Tracking

unspecified

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
STEPS TO REPRODUCE:
===================


1. create a task with a start date
2. restart Thunderbird/Lightning
3. delete this task from the tasklist


RESULT:
=======

- no agenda update, the agenda shows the deleted task

EXPECTED RESULT:
================

- the agenda should not display the deleted task

REPRODUCIBLE:
=============

- always


Same scenario without the restart works.
(Reporter)

Updated

11 years ago
Summary: Deleting a task from tasklist -> no update agenda → Deleting a task from tasklist -> no agenda update
I can confirm this but only for tasks with a start date in the past. This also explains the necessary restart to reproduce it, see Bug 394054. Right after creation past tasks are not displayed in the Agenda.
(Assignee)

Comment 2

11 years ago
Created attachment 281653 [details] [diff] [review]
patch v1

The agenda gets notified but it fails to find the occurrence to delete since it starts the query with a date/time of the current time. It would well be the case that the items displayed in the agenda don't fall into this timespan.
Assignee: nobody → michael.buettner
Status: NEW → ASSIGNED
Attachment #281653 - Flags: review?(daniel.boelzle)

Comment 3

11 years ago
Comment on attachment 281653 [details] [diff] [review]
patch v1

>-    var occs = item.getOccurrencesBetween(this.agendaTreeView.today.start,
>+    var queryStart = this.agendaTreeView.today.start.clone();
>+    queryStart.isDate = true;
>+    var occs = item.getOccurrencesBetween(queryStart,
>                                           this.agendaTreeView.soon.end, {});
I know this works, but with respect bug 388656 (meaning essentially that DATE values don't/shouldn't specify a point in time), I'd prefer to explicitly set the time part to 0, i.e.
queryStart.hour = 0;
queryStart.minute = 0;
queryStart.second = 0;

r=dbo, but please try out the above approach whether it fixes the bug, too.
Attachment #281653 - Flags: review?(daniel.boelzle) → review+
(Assignee)

Comment 4

11 years ago
(In reply to comment #3)
> I know this works, but with respect bug 388656 (meaning essentially that DATE
> values don't/shouldn't specify a point in time), I'd prefer to explicitly set
> the time part to 0.
Interestingly enough, this was indeed my first attempt but decided to set the date/time to date. But thinking twice, you're right.

> but please try out the above approach whether it fixes the bug, too.
That's needless to say, isn't it? :-)
(Assignee)

Comment 5

11 years ago
patch checked in on trunk and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
This patch doesn't fix the issue completely. The Agenda also shows task with a past start *date* and time in the Today section (Bug 394054). Deleting such a task in the Task list will not update the Agenda.
Target Milestone: --- → 0.7
Version: Trunk → unspecified

Comment 7

11 years ago
I think that the bug should be fixed in a different way:
1) When the today-pane shows the current date ("ShowsToday-mode) the "starttime" of the agenda-pane should be the current time and only events with a start or end-date after the current time should be displayed in the agenda-pane
2) 'Tomorrow' and "Soon" should always start at midnight.
3) if the today-pane is not in "ShowsToday-mode" all dates should start at midnight.
Currently the agenda-pane does not reflect this behaviour.

Comment 8

11 years ago
I suggest to leave this issue as fixed and implement a common solution to bug 394054
(Reporter)

Comment 9

10 years ago
Checked in latest nightly build -> task is fixed and verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.