Closed Bug 562308 Opened 15 years ago Closed 14 years ago

importxml.pl should import each comment separately, rather than concatenating them all into a single one

Categories

(Bugzilla :: Bug Import/Export & Moving, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: fabian, Assigned: LpSolit)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.0.18) Gecko/2010021619 Camino/2.0.2 (like Firefox/3.0.18) Build Identifier: Bugzilla-3.6 importxml.pl currently aggregates all comments into the description field of the bug, with text markings to report on the original reporter (who) and time of the imported comments. The reason behind this seems to be (from comments) that original reporters may not exist in the system being imported in. Reproducible: Always Steps to Reproduce: 1. save xml output of a bug 2. importxml.pl that output Actual Results: see comments being aggregated as a single message in the description of the imported bug Expected Results: allow in some way to post separate comments to the bug to as close as possible reproduce the original bug. I have a patch which implements this behaviour based on a command line switch "--post_comments". I will attach the patch in the next comment.
Patch to implement posting real comments to each bug, instead of aggregating in the description. I decided to retain the original behaviour, as it probably has some good usage too. Result is a bit if/then/else-like code. If separate comments are to be posted, each reporter is looked up. If they don't exist, a remark is prepended to the comment message with the original reporter id/email and the reporter is set to the exporter's id. The status message about the import is made a final comment on the bug as well in --post_comments mode.
Comment on attachment 442050 [details] [diff] [review] importxml post-comments implementation Putting this patch in our radar.
Attachment #442050 - Flags: review?
I'm actually interested to see this implemented. I will go even farther and say that there is no need for a switch. This should be the default behavior. And I like you proposal: use the original comment reporter, else fall back to the exporter. Fabian, are you interested in updating your patch this way?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Bugzilla 4.2
Version: unspecified → 3.6
Summary: importxml.pl: add support for posting bug comments → importxml.pl should import each comment separately, rather than concatenating them all into a single one
Comment on attachment 442050 [details] [diff] [review] importxml post-comments implementation Cancelling request for review per my previous comment. When you attach your updated patch, feel free to ask me for review. I would be happy to test your patch. :)
Attachment #442050 - Flags: review?
I only needed this for a one-time conversion phase. I hereby allow you to change the patch in any way to suit your liking. I think it's fairly straight-forward to remove all the if-cases to make post-comments the only option, or just to add an "aggregate-comments" option to achieve the inverse. If you really need me to update the patch for you to commit it, tell me exactly how you want it, and I'll attach it.
OK, that's fine. I will do it. Thanks :)
Attached patch patch, v1Splinter Review
My patch also fixes another bug I found while testing it. %X writes the time in the 12 hours format, instead of the 24h format (i.e. 4pm was displayed as 04:00:00 instead of 16:00:00). So we want %T here.
Assignee: import-export → LpSolit
Attachment #442050 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #482362 - Flags: review?
Attachment #482362 - Flags: review? → review?(gregaryh)
Attachment #482362 - Flags: review?(gregaryh) → review+
Flags: approval+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified importxml.pl Committed revision 7528.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: relnote
Resolution: --- → FIXED
Added to relnotes in bug 713346.
Keywords: relnote
Blocks: 848063
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: