Edgewall Software
Modify

Opened 7 years ago

Closed 2 years ago

Last modified 4 months ago

#10656 closed defect (fixed)

provide a way to delete ticket comments from trac-admin

Reported by: Daniel Kahn Gillmor <dkg@…> Owned by: Daniel Kahn Gillmor <dkg@…>
Priority: normal Milestone: 1.3.2
Component: admin/console Version: 0.12-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Added ticket delete_comment command to TracAdmin.

API Changes:

Description

trac-admin currently supports a way to remove entire tickets (ticket remove), but doesn't allow for removal of ticket comments. Removal of ticket comments through the webui is available via the tracopt.ticket.deleter component, but this feature is bundled with TICKET_ADMIN, which is quite powerful as well, and might not be something administrators want to expose via the web UI, even if ticket comment removal is occasionally needed.

The attached patch exposes the ability to remove ticket comments via trac-admin, using the new command:

ticket_comment remove

It applies and works for me against 0.12 — i haven't tested it against 0.13.

Attachments (1)

ticket_comment-remove.patch (1.2 KB ) - added by Daniel Kahn Gillmor <dkg@…> 7 years ago.
patch to implement "ticket_comment remove" in trac-admin

Download all attachments as: .zip

Change History (7)

by Daniel Kahn Gillmor <dkg@…>, 7 years ago

Attachment: ticket_comment-remove.patch added

patch to implement "ticket_comment remove" in trac-admin

comment:1 by Christian Boos, 7 years ago

Milestone: next-dev-1.1.x

I just found an old note of mine about this ticket saying:

Seems to work quite fine. What could perhaps be improved is the error handling in case of wrong ticket or comment number (first concern is shared by the ticket remove command as well).

… which means I tested it some time ago ;-)

Sorry for the long delay and thanks for the patch, we'll look into integrating it.

comment:2 by Ryan J Ollos, 4 years ago

Milestone: next-dev-1.1.xnext-major-releases

Retargetting tickets to narrow focus for milestone:1.2. Please move the ticket back to milestone:next-dev-1.1.x if you intend to resolve it by milestone:1.2.

comment:3 by Ryan J Ollos, 2 years ago

Milestone: next-major-releases1.3.2
Owner: set to Ryan J Ollos
Release Notes: modified (diff)
Status: newassigned

Proposed changes in log:rjollos.git:t10656_ticket_admin_comment_remove. I accidentally checked in the changes, then reverted ([15505:15506]).

Rather than adding a ticket remove_comment command, I considered changing the ticket remove command to take two arguments, <ticket#> <comment#>, with the second argument optional. However, I think there would be more risk in accidentally deleting a ticket if the second argument unintentionally omitted.

comment:4 by Ryan J Ollos, 2 years ago

Resolution: fixed
Status: assignedclosed

Committed to trunk in [15518:15519].

comment:5 by Ryan J Ollos, 2 years ago

Owner: changed from Ryan J Ollos to Daniel Kahn Gillmor <dkg@…>

comment:6 by Ryan J Ollos, 20 months ago

I don't know if it's important, but we aren't deleting just comments, so we often refer to the entries as ticket changes. Maybe the command should be named remove_change? I'll leave as is unless there is agreement that it should be renamed.

Last edited 20 months ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Daniel Kahn Gillmor <dkg@…>.
The resolution will be deleted.
to The owner will be changed from Daniel Kahn Gillmor <dkg@…> 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.