This document describes the extra data interface to the bug tracker in Launchpad that can be used by bug reporting tools such as Apport. If you have questions or comments about this document, please address them to #launchpad on irc.libera.chat, or ask on the launchpad-users mailing list.
The bug tracker provides an extra interface for filing bugs. By uploading a specifically formatted file to Launchpad prior to filing a bug, data and fields contained in the file will be incorporated into the bug during the filing process.
This file can be used to provide additional information like logs, dumps and command outputs to bugs without burdening the users with finding and uploading the relevant files/details.
The file containing the extra data should be a MIME multipart message. The bug tracker uses the Content-Disposition to determine how to handle each part.
By placing certain fields in the header of the file, some initial values and the behaviour of the filed bug can be determined prior to filing it.
Subject: bar crashes foo
This will be used to populate the suggested title for the bug.
Tags: foo bar
The filed bug will be tagged with supplied tags.
The filed bug will be marked as private security (only the project's trusted people will see it).
Subscribers: launchpad-user firstname.lastname@example.org
The specified Launchpad users and/or registered e-mail addresses will be subscribed to the filed bug.
The first part with a Content-Disposition of inline will be appended to the bug description after it is filed.
Additional parts that have a Content-Disposition of inline will become comments for the filed bug.
Parts with a Content-Disposition of attachment will have have their contents added as attachments to the filed bug.
Filing a bug
Prior to filing a bug the extra data file needs to be stored in Launchpad. This can be done via the page https://launchpad.net/+storeblob. Upon successful storing of the file a token will be provided both within the page and contained in the HTTP headers as X-Launchpad-Blob-Token.
Filing a bug can be achieved by accessing the page https://launchpad.net/bugs/+filebug/<token> replacing <token> with the token received previously. However this page requires the user to specify the Distribution/Package or Project. An alternative is to use the URL syntax https://bugs.launchpad.net/<distribution>/+source/<package>/+filebug/<token> or https://bugs.launchpad.net/<project>/+filebug/<token> replacing <distribution>, <package> and <project> as appropriate.
The process after this point is the same as filing a bug normally except that certain fields may be pre-populated.
MIME-Version: 2.0 Content-type: multipart/mixed; boundary=boundary Subject: Initial bug summary Tags: foo bar Private: yes Subscribers: launchpad-user email@example.com --boundary Content-disposition: inline Content-type: text/plain; charset=utf-8 This should be added to the description. --boundary Content-disposition: inline Content-type: text/plain; charset=utf-8 This should be added as a comment. --boundary Content-disposition: attachment; filename='attachment1' Content-type: text/plain; charset=utf-8 This is an attachment. --boundary Content-disposition: inline Content-type: text/plain; charset=utf-8 This should be added as another comment. --boundary Content-disposition: attachment; filename='attachment2' Content-description: Attachment description. Content-Transfer-Encoding: base64 Content-Type: application/x-gzip H4sICH5op0UAA3Rlc3QudHh0AAvJyCxWAKLEvPySjNQihcSSksTkjNzUvBIdhfLMkgyFRIWU1OLk osyCksz8PD0uAPiw9nkwAAAA --boundary--
Currently any errors within the extra data file are ignored with no feedback provided.