Opened 18 years ago
Closed 18 years ago
#3495 closed defect (fixed)
Ticket Delete Bug
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.10 |
Component: | ticket system | Version: | devel |
Severity: | major | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
From the looks of the code, when deleting a ticket it will delete the attachment metadata in the db, but not the actual files. Over time these could build up and cause problems.
Attachments (0)
Change History (4)
follow-up: 2 comment:1 by , 18 years ago
comment:2 by , 18 years ago
Replying to eblot:
Not sure to understand this point:
The delete code looks like this: …snip… so the file is actually deleted, isn't it?
Yes, but that code is not called when deleting a ticket. The Ticket.delete()
method deletes the rows directly from the database without removing the files:
trunk/trac/ticket/model.py@3544#L308
comment:3 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Right, we should use Attachment.delete()
for deleting the attachments.
comment:4 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Done in r3595.
The only remaining "issue" is that the empty attachment ticket folder is left behind. If you think it would be cleaner to remove that too, just let me know.
Not sure to understand this point:
The delete code looks like this:
so the file is actually deleted, isn't it?