Diff for "Bugs/ImportFormat"

Not logged in - Log In / Register

Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2009-06-17 17:06:55
Size: 5293
Editor: 92-237-59-186
Comment:
Revision 8 as of 2011-01-06 23:10:16
Size: 6806
Editor: 122-63-10-108
Comment: tweak and update for reorg
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
~-[[FrontPage|Launchpad Help]] > [[Bugs]] > Bug import format -~
Line 5: Line 7:
You can move your project's bug history to Launchpad by converting the history into Launchpad's import format and then [[https://answers.launchpad.net/launchpad||asking the Launchpad team to make the import.

'''Important:''' this format is a draft and may change. Subscribe to this page if you want to receive an email when we make updates.
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)
 * 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 [[http://bazaar.launchpad.net/~launchpad-pqm/launchpad/devel/annotate/head%3A/doc/bug-export.rnc|bug-export.rnc]]
 2. Install `rnv`
 3. Run: `rnv bug-export.rnc your-export-file.xml`

rnv must not report any errors before we can attempt an import of your bugs into Launchpad.

Consult the format spec below to understand the errors rnv 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.
Line 22: Line 47:
# 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
# xsd:dateTime elements must be expressed in UTC and have the trailing timezone indicator 'Z'.
Line 111: Line 134:

Use the first two paragraphs to summarise all the important points about this article.

Tell the reader if this is the information they need as soon as possible.

= Instructional text =

Where appropriate, use step by step instructions:

'''Step 1:''' Give concise and unambiguous instructions.

'''Step 2:''' Try not to state the obvious, unless you're writing for a novice user.

{i} '''Note:''' Highlight important information with a note.

'''Step 3:''' Use a well cropped screen shot if it will help orient the reader. Don't let the screen shot replace instructional text: not everyone can see your screen shot. Don't worry about borders or annotation for small, cropped screen shots such as this.

{{attachment:screen-shot.png}}

{i} '''Warning:''' If you're about to tell the reader to delete or otherwise change something that would be hard to restore, warn them.


== Full screen shots ==

||<tablestyle="float:right; font-size: 0.8em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">{{attachment:proj-announce.png}}||
||<style="text-align: center;">'''Describe the screen shot here'''||

Some screen shots will be better placed to the right of your text. As they're not placed directly below the text that they support, use a border and short description.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam sagittis. Aliquam eros dui, scelerisque id, consequat in, accumsan vitae, pede. Suspendisse neque ligula, scelerisque ac, mattis ut, aliquam quis, odio.

Proin nunc nisi, fringilla ac, congue ac, luctus eu, lacus. Maecenas ac purus. Cras felis metus, ultricies non, euismod ac, accumsan eleifend, leo. Quisque imperdiet tempus tellus.

Ut euismod, diam nec adipiscing interdum, tortor orci fringilla nisi, vel blandit erat magna at nisi. Fusce hendrerit odio non metus. Mauris nisl massa, dapibus id, feugiat quis, blandit a, quam. Integer tincidunt feugiat nunc. Curabitur iaculis egestas elit. Nam imperdiet suscipit odio.
= An example =

{{{
<?xml version="1.0"?>
<launchpad-bugs xmlns="https://launchpad.net/xmlns/2006/bugs">
<bug xmlns="https://launchpad.net/xmlns/2006/bugs" id="45">
  <private>True</private>
  <security_related>True</security_related>
  <datecreated>2004-10-12T12:00:00Z</datecreated>
  <nickname>some-bug</nickname>
  <title>A test bug</title>

  <description>A modified bug description</description>
  <reporter name="foo" email="foo@example.com">Foo User</reporter>
  <status>CONFIRMED</status>
  <importance>HIGH</importance>
  <milestone>future</milestone>
  <assignee email="bar@example.com">Bar User</assignee>

  <cves>
    <cve>2005-2736</cve>
    <cve>2005-2737</cve>
  </cves>
  <tags>
    <tag>foo</tag>
    <tag>bar</tag>

  </tags>
  <bugwatches>
    <bugwatch href="http://bugzilla.example.com/show_bug.cgi?id=42" />
    <!-- The following tracker has not been registered -->
    <bugwatch href="http://bugzilla.example.com/show_bug.cgi?id=43" />
  </bugwatches>
  <subscriptions>
    <subscriber email="test@canonical.com">Sample Person</subscriber>

    <subscriber name="nobody">Nobody (will not get imported)</subscriber>
  </subscriptions>
  <comment>
    <sender name="foo" email="foo@example.com">Foo User</sender>
    <date>2004-10-12T12:00:00Z</date>
    <title>A test bug</title>
    <text>Original description</text>

    <attachment>
      <type>UNSPECIFIED</type>
      <filename>hello.txt</filename>
      <title>Hello</title>
      <mimetype>text/plain</mimetype>
      <contents>SGVsbG8gd29ybGQ=</contents>

    </attachment>
  </comment>
  <comment>
    <!-- anonymous comment -->
    <sender name="nobody"/>
    <date>2005-01-01T11:00:00Z</date>
    <text>A comment from an anonymous user</text>
  </comment>

  <comment>
    <sender email="other@example.com">Some other bloke</sender>
    <date>2005-01-01T13:00:00Z</date>
    <text>
A comment from mark about CVE-2005-2730

 * list item 1
 * list item 2

Another paragraph

    </text>
    <attachment>
      <mimetype>application/octet-stream;key=value</mimetype>

      <contents>PGh0bWw+</contents>
    </attachment>
    <attachment>
      <type>PATCH</type>
      <filename>foo.patch</filename>
      <mimetype>text/html</mimetype>
      <contents>QSBwYXRjaA==</contents>

    </attachment>
  </comment>
</bug></launchpad-bugs>
}}}

~- [[Bugs|< Return to the Bugs page]] -~

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)
  • 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 bug-export.rnc

  2. Install rnv

  3. Run: rnv bug-export.rnc your-export-file.xml

rnv must not report any errors before we can attempt an import of your bugs into Launchpad.

Consult the format spec below to understand the errors rnv reports.

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]" }

# xsd:dateTime elements must be expressed in UTC and have the trailing timezone indicator 'Z'.

status = (
  "NEW"          |
  "INCOMPLETE"   |
  "INVALID"      |
  "WONTFIX"      |
  "CONFIRMED"    |
  "TRIAGED"      |
  "INPROGRESS"   |
  "FIXCOMMITTED" |
  "FIXRELEASED"  |
  "UNKNOWN")
importance = (
  "UNKNOWN"   |
  "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 = (
  attribute name { lpname }?,
  attribute email { text }?,
  text)

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 { text }? &
  # The following will likely be renamed summary in a future version.
  element title { text }? &
  element mimetype { text }? &
  element contents { xsd:base64Binary }
}

An example

<?xml version="1.0"?>
<launchpad-bugs xmlns="https://launchpad.net/xmlns/2006/bugs">
<bug xmlns="https://launchpad.net/xmlns/2006/bugs" id="45">
  <private>True</private>
  <security_related>True</security_related>
  <datecreated>2004-10-12T12:00:00Z</datecreated>
  <nickname>some-bug</nickname>
  <title>A test bug</title>

  <description>A modified bug description</description>
  <reporter name="foo" email="foo@example.com">Foo User</reporter>
  <status>CONFIRMED</status>
  <importance>HIGH</importance>
  <milestone>future</milestone>
  <assignee email="bar@example.com">Bar User</assignee>

  <cves>
    <cve>2005-2736</cve>
    <cve>2005-2737</cve>
  </cves>
  <tags>
    <tag>foo</tag>
    <tag>bar</tag>

  </tags>
  <bugwatches>
    <bugwatch href="http://bugzilla.example.com/show_bug.cgi?id=42" />
    <!-- The following tracker has not been registered -->
    <bugwatch href="http://bugzilla.example.com/show_bug.cgi?id=43" />
  </bugwatches>
  <subscriptions>
    <subscriber email="test@canonical.com">Sample Person</subscriber>

    <subscriber name="nobody">Nobody (will not get imported)</subscriber>
  </subscriptions>
  <comment>
    <sender name="foo" email="foo@example.com">Foo User</sender>
    <date>2004-10-12T12:00:00Z</date>
    <title>A test bug</title>
    <text>Original description</text>

    <attachment>
      <type>UNSPECIFIED</type>
      <filename>hello.txt</filename>
      <title>Hello</title>
      <mimetype>text/plain</mimetype>
      <contents>SGVsbG8gd29ybGQ=</contents>

    </attachment>
  </comment>
  <comment>
    <!-- anonymous comment -->
    <sender name="nobody"/>
    <date>2005-01-01T11:00:00Z</date>
    <text>A comment from an anonymous user</text>
  </comment>

  <comment>
    <sender email="other@example.com">Some other bloke</sender>
    <date>2005-01-01T13:00:00Z</date>
    <text>
A comment from mark about CVE-2005-2730

 * list item 1
 * list item 2

Another paragraph

    </text>
    <attachment>
      <mimetype>application/octet-stream;key=value</mimetype>

      <contents>PGh0bWw+</contents>
    </attachment>
    <attachment>
      <type>PATCH</type>
      <filename>foo.patch</filename>
      <mimetype>text/html</mimetype>
      <contents>QSBwYXRjaA==</contents>

    </attachment>
  </comment>
</bug></launchpad-bugs>

< Return to the Bugs page

Bugs/ImportFormat (last edited 2019-10-04 11:41:47 by cjwatson)