Can't delete patch attachement

Bug #256527 reported by Scott Kitterman
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
Björn Tillenius

Bug Description

In https://bugs.launchpad.net/bugs/252236 I wanted to delete the attachments before uploading corrected patches. It didn't work.

I clicked https://bugs.launchpad.net/ubuntu/+source/python-dns/+bug/252236/attachments/321322 to get to the edit screen so I could delete the dapper debdiff. Then I clicked Delete Attachment. Instead of deleting, I got an error:

There is 1 error.

text/x-diff;
  charset="utf-8";
  name="dapper2.debdiff"
Constraint not satisfied

I didn't change anything in the content type box.

If I edit the content type box to just have text/x-diff in it, then I can delete the attachements.

Note that these attachments were originally submitted by email.

Tags: lp-bugs
Revision history for this message
Diogo Matsubara (matsubara) wrote :

Hi Scott,

thanks for the report. I think this is a fallout from another bug, which caused the wrong content type to be recorded when the attachment was submitted by email. Can you still reproduce it?

I think what needs to be done is to cleanup attachments with content-types containing newline characters. (Altough I couldn't reproduce using staging bugs with multiline content types attachments.)

Changed in malone:
status: New → Incomplete
Revision history for this message
Scott Kitterman (kitterman) wrote :

I'll let you know if this specific case comes up again, but regardless of if there was another primary problem that exposed this as a secondary issue, I think it's still a bug in it's own right that I couldn't delete.

Changed in malone:
status: Incomplete → New
Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 256527] Re: Can't delete patch attachement

On Thu, Sep 04, 2008 at 09:29:22PM -0000, Diogo Matsubara wrote:
> Hi Scott,
>
> thanks for the report. I think this is a fallout from another bug, which
> caused the wrong content type to be recorded when the attachment was
> submitted by email. Can you still reproduce it?
>
> I think what needs to be done is to cleanup attachments with content-
> types containing newline characters. (Altough I couldn't reproduce using
> staging bugs with multiline content types attachments.)

I also can't reproduce this, but there is bad data in the DB (mimetypes
containing new line characters), which could cause problem, so let's use
this bug to clean up the bad data. After that is done, this bug will
definitely be gone.

    status triaged
    milestone 2.1.10

Changed in malone:
milestone: none → 2.1.10
status: New → Triaged
Changed in malone:
milestone: 2.1.10 → 2.1.11
Changed in malone:
milestone: 2.1.11 → 2.1.12
Revision history for this message
Björn Tillenius (bjornt) wrote :

The following SQL query should do the trick: https://pastebin.canonical.com/12728/

Changed in malone:
assignee: nobody → bjornt
milestone: 2.1.12 → 2.2.1
status: Triaged → In Progress
Changed in malone:
status: In Progress → 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.