User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:22.214.171.124) 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.
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. :)
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 :)
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.
Attachment #482362 - Flags: review? → review?(gregaryh)
Committing to: bzr+ssh://firstname.lastname@example.org/bugzilla/trunk/ modified importxml.pl Committed revision 7528.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.