Closed
Bug 653924
Opened 13 years ago
Closed 13 years ago
RELATED-TO headers are duplicated during write
Categories
(Calendar :: Provider: ICS/WebDAV, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.0
People
(Reporter: bugzilla, Assigned: Fallen)
Details
Attachments
(1 file)
3.00 KB,
patch
|
Fallen
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Build Identifier: Lightning 1.0b2 Lightning is duplicating RELATED-TO properties during write, it makes it unusable for using with other calendar apps which can handle relations. Reproducible: Always Steps to Reproduce: 1. Create ics file with two tasks or events 2. Manually (text-editor or third-party app) create a relation between those two items using RELATED-TO property 3. Open this ics with lightning 4. Do any changes to calendar 5. Review the file; RELATED-TO properties will be duplicated Actual Results: test.ics contains duplicated related-to properties BEGIN:VCALENDAR PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN VERSION:2.0 X-WR-CALNAME:test X-WR-TIMEZONE:Europe/Warsaw BEGIN:VTODO CREATED:20110430T150942Z LAST-MODIFIED:20110430T151059Z DTSTAMP:20110430T151059Z UID:2424d594-0453-49a1-b842-6faee483ca78 SUMMARY:1 SEQUENCE:4 X-MOZ-GENERATION:4 END:VTODO BEGIN:VTODO CREATED:20110430T150947Z LAST-MODIFIED:20110430T150949Z DTSTAMP:20110430T150949Z UID:7a67183e-4c29-4e72-9437-2077050025bc SUMMARY:2 RELATED-TO:2424d594-0453-49a1-b842-6faee483ca78 RELATED-TO:2424d594-0453-49a1-b842-6faee483ca78 END:VTODO END:VCALENDAR Expected Results: BEGIN:VCALENDAR PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN VERSION:2.0 X-WR-CALNAME:test X-WR-TIMEZONE:Europe/Warsaw BEGIN:VTODO CREATED:20110430T150942Z LAST-MODIFIED:20110430T151059Z DTSTAMP:20110430T151059Z UID:2424d594-0453-49a1-b842-6faee483ca78 SUMMARY:1 SEQUENCE:4 X-MOZ-GENERATION:4 END:VTODO BEGIN:VTODO CREATED:20110430T150947Z LAST-MODIFIED:20110430T150949Z DTSTAMP:20110430T150949Z UID:7a67183e-4c29-4e72-9437-2077050025bc SUMMARY:2 RELATED-TO:2424d594-0453-49a1-b842-6faee483ca78 END:VTODO END:VCALENDAR Lightning is writing each relation two times: one time in calItemBase: for each (let relation in this.getRelations({})) { icalcomp.addProperty(relation.icalProperty); } and the second time in calTodo and calEvent in get icalComponent() (because it's returned by propertyEnumerator) Possible solutions: 1. remove saving relations from calItemBase 2. OR change get icalComponent of calTodo and calEvent to ignore related-to properties 3. OR change propertyEnumerator to not return related-to properties After you decide which way to go I can provide a patch. Solution 1 and 2 looks most reasonable for me, 3 would change behaviour of propertyEnumerator which could harm other parts of code.
Reporter | ||
Updated•13 years ago
|
Version: unspecified → Lightning 1.0b2
Reporter | ||
Updated•13 years ago
|
OS: Windows 7 → All
Hardware: x86 → All
Assignee | ||
Comment 1•13 years ago
|
||
It might be enough to add RELATED-TO calItemBase's itemBasePromotedProps hashmap. This matches most with option 2. I would appreciate a patch and testing. When you upload please set review to ? and then enter :Fallen in the field that shows up.
Assignee: nobody → bugzilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 2•13 years ago
|
||
Kacper could you provide a patch for this?
Assignee | ||
Comment 3•13 years ago
|
||
r=me, this patch does work. Testcase included
Assignee: bugzilla → philipp
Attachment #567622 -
Flags: review+
Assignee | ||
Comment 4•13 years ago
|
||
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/2fbfb9106027>
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Trunk
Assignee | ||
Comment 5•13 years ago
|
||
Backported to comm-aurora <http://hg.mozilla.org/releases/comm-aurora/rev/08f790ef4c4a>
Target Milestone: Trunk → 1.0b9
Assignee | ||
Comment 6•13 years ago
|
||
Backported to comm-beta <http://hg.mozilla.org/releases/comm-beta/rev/745b964e0141>
Target Milestone: 1.0b9 → 1.0b8
You need to log in
before you can comment on or make changes to this bug.
Description
•