Closed Bug 349796 Opened 17 years ago Closed 17 years ago

Tasks with due dates before today appear in Agenda with time of end of task

Categories

(Calendar :: Calendar Frontend, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: vcssupport1, Assigned: jminta)

Details

(Whiteboard: [no l10n impact])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b2) Gecko/20060822 BonEcho/2.0b2
Build Identifier: Thunderbird 2.0a1 (build 2006082203), Lightning 0.1+ (build from 22/08/06)

If a task is overdue, its entry remains on the agenda list along with the time of ending of the task.
e.g. Task 1 ends at 15.00 on 21/08/06
     Today is 23/08/06
     Task appears in the today section of the Agenda with an time of 15.00


Reproducible: Always

Steps to Reproduce:
1. Create a task with a due date before today (e.g. Task 1, 21/08/06, 15.00)
2. Look at the Today section of the Agenda window


Actual Results:  
'Task 1, 15.00' appears in the today section of the Agenda pane.

Expected Results:  
'Task 1, Overdue' appears in the today section of the Agenda pane.
Confirming, but only after restart of Thunderbird!
Using Thunderbird version 2 alpha 1 (20060821) and lightning 2006082207
(In reply to comment #1)
> Confirming, but only after restart of Thunderbird!
> Using Thunderbird version 2 alpha 1 (20060821) and lightning 2006082207
> 
What kind of calendar? (Local, remote-webdav, remote-caldav?)
Err, its too late: Local Calendar.
Status: UNCONFIRMED → NEW
Component: General → Calendar Views
Ever confirmed: true
Flags: blocking0.3+
Attached patch storage fixSplinter Review
mSelectTodosbyRange was totally wrong here.  It was written based on the original pav-event-dialog, which only exposed due dates for tasks.  This patch updates the query to acknowledge that tasks may have entry dates, due dates, both, or neither.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #235430 - Flags: second-review?(dmose)
Attachment #235430 - Flags: first-review?(mattwillis)
Comment on attachment 235430 [details] [diff] [review]
storage fix

> Index: calendar/resources/content/calendarUtils.js
> +function LOG(aString) {
Why is this in this patch? I don't see any uses of LOG().

> Index: calendar/lightning/content/agenda-tree.js
> -    
> +
You probably want to check the whitespace change in separately.

Otherwise the patch appears to fix the problem for me.

r1=lilmatt with those fixed.
Attachment #235430 - Flags: first-review?(mattwillis) → first-review+
Whiteboard: [patch in hand][waiting on dmose review]
Whiteboard: [patch in hand][waiting on dmose review] → [patch in hand][waiting on dmose review][no l10n impact]
Comment on attachment 235430 [details] [diff] [review]
storage fix

>Index: calendar/providers/storage/calStorageCalendar.js

>-        var floatingTodoEntry = "todo_entry_tz = 'floating' AND todo_entry"
>-        var nonFloatingTodoEntry = "todo_entry_tz != 'floating' AND todo_entry"
>+        var floatingTaskStart = "todo_entry_tz = 'floating' AND todo_entry";
>+        var nonFloatingTaskStart = "todo_entry_tz != 'floating' AND todo_entry";
>+        var floatingTaskEnd = "todo_due_tz = 'floating' AND todo_due";
>+        var nonFloatingTaskEnd = "todo_due_tz != 'floating' AND todo_due";

Don't switch from naming the items todo to task. The file uses todo, so keep on using that. Also, the tables etc are still named due and entry, so keep on using those names too. consistency.

>         this.mSelectTodosByRange = createStatement(
>             this.mDB,
>             "SELECT * FROM cal_todos " +
>             "WHERE " +
>-            " ((("+floatingTodoEntry+" < :range_end + :end_offset) OR " +
>-            "   ("+nonFloatingTodoEntry+" < :range_end)) " +
>-            "  OR (todo_entry IS NULL)) " +
>-            " AND cal_id = :cal_id AND recurrence_id IS NULL"
>+            " (("+floatingTaskEnd+" >= :range_start + :start_offset) OR " +
>+            "   (todo_due IS NULL) OR " +
>+            "  ("+nonFloatingTaskEnd+" >= :range_start)) AND " +

I would prefer to switch the order of the last two statements, so back to what they were. Keep the two checks for existing duedates together.

>+            " (("+floatingTaskStart+" < :range_end + :end_offset) OR " +
>+            "   (todo_entry IS NULL) OR " +
>+            "  ("+nonFloatingTaskStart+" < :range_end)) " +
>+            "  AND cal_id = :cal_id AND recurrence_id IS NULL"

One space of indenting too much in that AND statement. It's one level higher.

r=mvl with those (and lilmatts) comments fixed
Attachment #235430 - Flags: second-review?(dmose) → second-review+
Comments addressed and patch checked in on MOZILLA_1_8_BRANCH and trunk.

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [patch in hand][waiting on dmose review][no l10n impact] → [no l10n impact]
Tested with Thunderbird 2.0a1 (20060906) and Lightning 0.1+ (2006090706).

Actual result is now that overdue tasks do not show up on agenda at all.

Expected result is task appears marked as 'overdue' where the time usually goes if it is not completed.

I'm unsure of the etiquette here.  Reopen, or refile as a new enhancement?
QA Contact: general → views
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060929 Sunbird/0.3
Status: RESOLVED → VERIFIED
Whiteboard: [no l10n impact] → [no l10n impact][litmus testcase wanted]
Flags: in-litmus?
Whiteboard: [no l10n impact][litmus testcase wanted] → [no l10n impact]
You need to log in before you can comment on or make changes to this bug.