Closed Bug 182128 Opened 23 years ago Closed 19 years ago

Edit Card, Notes on several lines appear on one after export/import in text format (txt, tab, csv)

Categories

(MailNews Core :: Address Book, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nbaca, Assigned: standard8)

References

Details

(Keywords: helpwanted, regression)

Attachments

(1 file, 1 obsolete file)

Trunk build 2002-11-26: WinMe, Mac 10.1.3 haven't tried linux yet. Overview: Create a card with multiple lines in the Notes section, Export/Import in text format, open the card and the notes now appear on one line. Steps to reproduce: 1. Create a card with Notes on several lines: one two three four five 2. Export the file in text format (i.e. txt, tab or csv) 3. Impor the file 4. Open the card and view the Notes tab Actual results: All the text in the Notes section is now on one line: one two three four five Expected Results: They should appear on separate lines. Note: This bug should not be confused with the Card View pane showing the Notes on the same line. This bug is about the Notes tab in a card. Additional Information: - trunk build 2002-11-08: WinMe, OK so the regression occured between 11/8 and 11/26.
Marking nsbeta1 since this is a recent regression and makes reading the Notes section difficult.
Keywords: nsbeta1, regression
Summary: Edit Card, Notes on several lines appear one one after export/import in text format (txt, tab, csv) → Edit Card, Notes on several lines appear on one after export/import in text format (txt, tab, csv)
Mail triage team: nsbeta1-
Keywords: nsbeta1-
Keywords: nsbeta1
If bug #130704 where text fields containing delimeters are not quoted is fixed then this should be simple to fix. Provided it is quoted correctly a csv field can legally contain newlines, so instead of stripping the newlines when exporting, quote the fields properly and leave them in.
mass re-assign.
Assignee: racham → sspitzer
Product: Browser → Seamonkey
Assignee: sspitzer → mail
Assignee: mail → nobody
Component: Address Book → MailNews: Address Book
Product: Mozilla Application Suite → Core
QA Contact: nbaca → addressbook
OS: MacOS X → All
Keywords: helpwanted
Attached patch Fixes import and export (obsolete) — Splinter Review
This does it like excel, open office and other applications generally seem to accept - quotes around the field which is on multiple lines.
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Attachment #253862 - Flags: review?(neil)
Comment on attachment 253862 [details] [diff] [review] Fixes import and export >+ // For notes, make sure we quote if containing CR/LF. Nit: I know the old code had the same bug, but what happens if you import csv data containing embedded newlines in other fields and then re-export it? > rv = importService->SystemStringFromUnicode(newValue.get(), valueCStr); Haven't I seen a patch that converts this to NS_CopyUnicodeToNative? >+ if (!aLine.IsEmpty()) { >+ aLine.AppendLiteral(NS_LINEBREAK); >+ aLine.Append(line); >+ } >+ else >+ aLine = line; I've seen this written alternatively: if (!aLine.IsEmpty()) aLine.AppendLiteral(NS_LINEBREAK); aLine.Append(line);
Attachment #253862 - Flags: review?(neil) → review+
(In reply to comment #6) > (From update of attachment 253862 [details] [diff] [review]) > > rv = importService->SystemStringFromUnicode(newValue.get(), valueCStr); > Haven't I seen a patch that converts this to NS_CopyUnicodeToNative? Not that I can find. We're probably safe to do it though (in a separate bug).
Address Neil's nits, carrying forward his r. requesting sr
Attachment #253862 - Attachment is obsolete: true
Attachment #254556 - Flags: superreview?(bienvenu)
Attachment #254556 - Flags: review+
Comment on attachment 254556 [details] [diff] [review] Fixes import and export v2 thx, Mark
Attachment #254556 - Flags: superreview?(bienvenu) → superreview+
Patch checked in -> fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: