<> This document describes the extra data interface to the bug tracker in Launchpad that can be used by bug reporting tools such as [[https://launchpad.net/Apport|Apport]]. If you have questions or comments about this document, please address them to {{{#launchpad}}} on irc.libera.chat, or ask on the [[https://lists.ubuntu.com/mailman/listinfo/launchpad-users|launchpad-users mailing list]]. <> == Summary == 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. == File Format == 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. === Fields === 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. {{{informationtype: privatesecurity}}} The filed bug will be marked as private security (only the project's trusted people will see it). {{{Subscribers: launchpad-user user@example.com}}} The specified Launchpad users and/or registered e-mail addresses will be subscribed to the filed bug. === Parts === 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/` replacing `` 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//+source//+filebug/` or `https://bugs.launchpad.net//+filebug/` replacing ``, `` and `` as appropriate. The process after this point is the same as filing a bug normally except that certain fields may be pre-populated. == Sample File == {{{ MIME-Version: 2.0 Content-type: multipart/mixed; boundary=boundary Subject: Initial bug summary Tags: foo bar Private: yes Subscribers: launchpad-user user@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-- }}} <> == Known Issues == Currently any errors within the extra data file are ignored with no feedback provided.