Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 2 years ago

#12796 closed defect (fixed)

Can't delete a ticket attachment

Reported by: anonymous Owned by:
Priority: normal Milestone:
Component: attachment Version: 0.12.5
Severity: normal Keywords:
Cc: jen917@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Jenna Neiser <jen917@…>)

We have found that when a file with '.-' in the name is attached to a ticket, it cannot be deleted using the trac-admin command attachment remove <realm:id> <name>. In the version of trac that we are using it is difficult to understand how to delete attachments using the web interface, this is why the trac-admin command is necessary.

Attachments (0)

Change History (13)

comment:1 by anonymous, 7 years ago

Version: 0.12.5

comment:2 by Jenna Neiser <jen917@…>, 7 years ago

Cc: jen917@… added
Keywords: attachments delete '.-' added

comment:3 by Ryan J Ollos, 7 years ago

I just deleted your attachment, so presumably the issue is fixed in a more recent Trac version.

comment:4 by Jenna Neiser <jen917@…>, 7 years ago

Okay, thank you

comment:5 by Ryan J Ollos, 7 years ago

From your description on gmessage:trac-users:2Xflh13aTIA/RLGAhAcUAwAJ, it appears the issue is with deleting attachments using TracAdmin. I deleted the attachment through the web interface. Need to confirm if the issue is seen with TracAdmin.

comment:6 by Jenna Neiser <jen917@…>, 7 years ago

Yes, it was command line arguments attachment remove <realm:id> <name> that I used, this was unable to recognize the file name

comment:7 by Jenna Neiser <jen917@…>, 7 years ago

Description: modified (diff)

comment:8 by Jun Omae, 7 years ago

Component: ticket systemattachment
Keywords: attachments delete '.-' removed

Works for me with Trac 0.12.5.

Welcome to trac-admin 0.12.5
Interactive Trac administration console.
Copyright (C) 2003-2013 Edgewall Software

Type:  '?' or 'help' for help on commands.

Trac [/var/trac/0.12-sqlite]> attachment list ticket:1

Name         Size     Author  Date                 Description
--------------------------------------------------------------
test.-1.txt  1 bytes  admin   2017-05-06 02:31:17

Trac [/var/trac/0.12-sqlite]> attachment remove ticket:1 test.-1.txt
Trac [/var/trac/0.12-sqlite]> attachment list ticket:1

Name  Size  Author  Date  Description
-------------------------------------

comment:10 by Jenna Neiser <jen917@…>, 7 years ago

> attachment list ticket:1729

Name                                            Size    Author    Date                 Description
--------------------------------------------------------------------------------------------------           
J.Electrochem.Soc.-1998-Laycock-1101-8.2.pdf    2.2 MB  admin  2017-05-05 10:22:01  

> attachment remove ticket:1729  J.Electrochem.Soc./-1998/-Laycock/-1101/-8.pdf
ResourceNotFound: Attachment 'ticket:1729: J.Electrochem.Soc./-1998/-Laycock/-1101/-8.pdf' does not exist.

This is what mine looks like when I attempt to remove it. I have tried multiple variations of the name and escape characters. My apologies for the messy comment before

comment:11 by Jenna Neiser <jen917@…>, 7 years ago

I also tried no / escape characters and also tried with \ as an escape character, none of thos combinations worked

> attachment remove tickets:1729 J.Electrochem.Soc.-1998-Laycock-1101-8.pdf
ResourceNotFound: Attachment 'tickets:1729: J.Electrochem.Soc.-1998-Laycock-1101-8.pdf' does not exist.

in reply to:  11 comment:12 by Jun Omae, 7 years ago

Replying to Jenna Neiser <jen917@…>:

I also tried no / escape characters and also tried with \ as an escape character, none of thos combinations worked

The / is not an escape character.

> attachment remove tickets:1729 J.Electrochem.Soc.-1998-Laycock-1101-8.pdf
ResourceNotFound: Attachment 'tickets:1729: J.Electrochem.Soc.-1998-Laycock-1101-8.pdf' does not exist.

Your attachment list ticket:1729 command lists J.Electrochem.Soc.-1998-Laycock-1101-8.2.pdf, not J.Electrochem.Soc.-1998-Laycock-1101-8.pdf.

Try:

attachment remove tickets:1729 J.Electrochem.Soc.-1998-Laycock-1101-8.2.pdf
Version 0, edited 7 years ago by Jun Omae (next)

comment:13 by anonymous, 7 years ago

I can't believe it was such a silly mistake on my part… Thank you so much, goes to show a second set of eyes is always valuable.

comment:14 by anonymous, 7 years ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.