~-[[FrontPage|Launchpad Help]] > [[Bugs]] > Bug import format -~ ||<>|| = Overview = You can move your project's bug history to Launchpad by converting the history into Launchpad's import format. To request an import you need to: * generate an import file using one of our exporters (or create one), such as [[https://launchpad.net/sfbugs2launchpad|XML Sourceforge bugs to Launchpad]] or [[https://github.com/kevincox/nsf2lp|JSON Sourceforge bugs to Launchpad]] * validate it as described later in this page * Ask for a staging import to be done by opening a ticket in the lp answer tracker [[https://answers.launchpad.net/launchpad]]. One of our system administrators will check that it validates and import it to staging where you can check its all as you wanted. * Finally ask for a production import to be done (by opening another ticket). In the future we may offer an LP API for self-service of the import step. = Requirements = Before we can import bugs into Launchpad, your export file must validate. Please validate the file against the export format spec in the Launchpad tree before requesting an import. To do this: 1. Download [[https://git.launchpad.net/launchpad/tree/doc/bug-export.rnc|bug-export.rnc]] 2. Install `jing` 3. Run: `jing -c bug-export.rnc your-export-file.xml` `jing` must not report any errors before we can attempt an import of your bugs into Launchpad. Consult the format spec below to understand any errors that `jing` reports. ## Really? We don't change this format ever, as far as I can tell. --deryck ##'''Important:''' this format is a draft and may change. Subscribe to this page if you want to receive an email when we make updates. = The format = {{{ default namespace = "https://launchpad.net/xmlns/2006/bugs" start = lpbugs # Data types boolean = "True" | "False" lpname = xsd:string { pattern = "[a-z0-9][a-z0-9\+\.\-]*" } cvename = xsd:string { pattern = "(19|20)[0-9][0-9]-[0-9][0-9][0-9][0-9]" } non_empty_text = xsd:string { minLength = "1" } # XXX: jamesh 2006-04-11 bug=105401: # These status and importance values need to be kept in sync with the # rest of Launchpad. However, there are not yet any tests for this. # https://bugs.launchpad.net/bugs/105401 status = ( "NEW" | "INCOMPLETE" | "INVALID" | "WONTFIX" | "CONFIRMED" | "TRIAGED" | "INPROGRESS" | "FIXCOMMITTED" | "FIXRELEASED") importance = ( "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "WISHLIST" | "UNDECIDED") # Content model for a person element. The element content is the # person's name. For successful bug import, an email address must be # provided. person_nobody = ( attribute name { string "nobody" }) person_normal = ( attribute name { lpname }?, attribute email { non_empty_text }, text) person = ( person_nobody | person_normal) lpbugs = element launchpad-bugs { bug* } bug = element bug { attribute id { xsd:integer } & element private { boolean }? & element security_related { boolean }? & element duplicateof { xsd:integer }? & element datecreated { xsd:dateTime } & element nickname { lpname }? & # The following will likely be renamed summary in a future version. element title { text } & element description { text } & element reporter { person } & element status { status } & element importance { importance } & element milestone { lpname }? & element assignee { person }? & element urls { element url { attribute href { xsd:anyURI }, text }* }? & element cves { element cve { cvename }* }? & element tags { element tag { lpname }* }? & element bugwatches { element bugwatch { attribute href { xsd:anyURI } }* }? & element subscriptions { element subscriber { person }* }? & comment+ } # A bug has one or more comments. The first comment duplicates the # reporter, datecreated, title, description of the bug. comment = element comment { element sender { person } & element date { xsd:dateTime } & element title { text }? & element text { text } & attachment* } # A bug attachment. Attachments are associated with a bug comment. attachment = element attachment { attribute href { xsd:anyURI }? & element type { "PATCH" | "UNSPECIFIED" }? & element filename { non_empty_text }? & # The following will likely be renamed summary in a future version. element title { text }? & element mimetype { text }? & element contents { xsd:base64Binary { minLength = "1" } } } }}} = An example = {{{ True True 2004-10-12T12:00:00Z some-bug A test bug A modified bug description Foo User CONFIRMED HIGH future Bar User 2005-2736 2005-2737 foo bar Sample Person Nobody (will not get imported) Foo User 2004-10-12T12:00:00Z A test bug Original description UNSPECIFIED hello.txt Hello text/plain SGVsbG8gd29ybGQ= 2005-01-01T11:00:00Z A comment from an anonymous user Some other bloke 2005-01-01T13:00:00Z A comment from mark about CVE-2005-2730 * list item 1 * list item 2 Another paragraph application/octet-stream;key=value PGh0bWw+ PATCH foo.patch text/html QSBwYXRjaA== }}} ~- [[Bugs|< Return to the Bugs page]] -~