Add a method to IBug to link existing file aliases

Bug #524296 reported by Graham Binns
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Graham Binns

Bug Description

At the moment IBug.addAttachment() does all the work of adding an attachment. It takes an upload file, creates a LibraryFileAlias for it and then creates a BugAttachment that refers to that alias.

However, for situations like those in bug 513193, where the attachments already exist as LibraryFileAliases, there's no way to link them to the bug.

IBug needs a new method, linkAttachment(), which will take most of the same parameters as addAttachment(), but which will take a file_alias instead of a data parameter. The FileAlias will then be used during the linking process rather than creating a new one.

addAttachment() should call linkAttachment() so that functionality is not duplicated.

Related branches

Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in malone:
status: In Progress → Fix Committed
Graham Binns (gmb)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.