Closed Bug 361565 Opened 19 years ago Closed 19 years ago

Weekly layout: Every second week is not printed and wrong week numbering

Categories

(Calendar :: Printing, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ssitter, Assigned: jminta)

Details

Attachments

(1 file)

Weekly layout: Every second week is not printed and wrong week numbering Steps to Reproduce: 1. Start Sunbird with clean profile 2. Set First day of the week to Monday 3. Select Month view and switch to November 2006 4. Select 'File -> Print...' and choose the 'Weekly Planner layout 5. Check preview Actual Results: If first day of the week is set to Monday the Output shows: KW 43: Mon 30-Oct-2006 to Sat 04-Nov-2006 followed by Sun 29-Oct-2006 KW 45: Mon 12-Nov-2006 to Sat 17-Nov-2006 followed by Sun 11-Nov-2006 KW 47: Mon 25-Nov-2006 to Sat 30-Nov-2006 followed by Sun 24-Nov-2006 Note: If first day of the week is set to Sunday the Output shows: KW 44: Mon 30-Oct-2006 to Sat 04-Nov-2006 followed by Sun 29-Oct-2006 KW 45: Mon 12-Nov-2006 to Sat 17-Nov-2006 followed by Sun 11-Nov-2006 KW 47: Mon 25-Nov-2006 to Sat 30-Nov-2006 followed by Sun 24-Nov-2006 Expected Results: If first day of the week is set to Monday the Output shows: KW 44: Mon 30-Oct-2006 to Sun 05-Nov-2006 KW 45: Mon 06-Nov-2006 to Sun 12-Nov-2006 KW 46: Mon 13-Nov-2006 to Sun 19-Nov-2006 KW 47: Mon 20-Nov-2006 to Sun 26-Nov-2006 KW 48: Mon 27-Nov-2006 to Sun 03-Dec-2006 Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20061122 Calendar/0.4a1 - Build ID: 2006112207
I think Bug #361560 will help a lot with this.
Can we get an update here, now that some of the other printing bugs have been fixed?
Results of retest using Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20061209 Calendar/0.4a1 - Build ID: 2006120903 with STR from Comment #0: If first day of the week is set to Monday the Output shows: KW 44: Mon 30-Oct-2006 to Sun 05-Nov-2006 KW 45: Mon 13-Nov-2006 to Sat 18-Nov-2006, Sun 12-Nov-2006 KW 47: Mon 27-Nov-2006 to Fri 01-Dez-2006, Sat 25-Nov-2006 to Sun 26-Nov-2006 KW 49: Mon 11-Dez-2006 to Thu 14-Dez-2006, Fri 08-Dez-2006 to Sun 10-Dez-2006 KW 51: Mon 25-Dez-2006 to Wed 27-Dez-2006, Thu 21-Dez-2006 to Sun 24-Dez-2006 First week shown is ok. For the following weeks the week numbers are off by one and every second week is skipped. There is a new regression: With every next week shown the days that shows previous week shift on day earlier.
Attached patch fix logicSplinter Review
I don't know what happened here, but someone lost track of their variables somewhere. Because |date| is being modified in the loop, we don't need to add 7 afterwards. Also, -1 hack prior to the loop doesn't work when we're going through the whole while loop a second time. This fixes the loop to be cleaner and removes the double-adjustment.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #249394 - Flags: second-review?(mvl)
Attachment #249394 - Flags: first-review?(lilmatt)
Comment on attachment 249394 [details] [diff] [review] fix logic Much better. r=lilmatt
Attachment #249394 - Flags: first-review?(lilmatt) → first-review+
Comment on attachment 249394 [details] [diff] [review] fix logic r2=mvl
Attachment #249394 - Flags: second-review?(mvl) → second-review+
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Looks fine now. Verified with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a2pre) Gecko/20070106 Calendar/0.4a1 ID:2007010603.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: