Edgewall Software
Modify

Ticket #8247 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Deleting a Milestone via Admin panel leaves an Anonymous comment in tickets

Reported by: anonymous Owned by: rblank
Priority: normal Milestone: 0.11.5
Component: ticket system Version: 0.11.4
Severity: normal Keywords:
Cc:
Release Notes:
API Changes:

Description

When you delete a milestone, the admin panel calls delete() on the Milestone model. That method leaves a comment in any tickets that have that milestone and accepts an author parameter. The ticket system admin panel for milestones does not provide the author parameter. Here is a proposed patch:

--- trac/ticket/admin.py.orig	2009-04-28 08:22:40.000000000 -0700
+++ trac/ticket/admin.py	2009-04-28 08:24:30.000000000 -0700
@@ -272,7 +272,7 @@
                     db = self.env.get_db_cnx()
                     for name in sel:
                         mil = model.Milestone(self.env, name, db=db)
-                        mil.delete(db=db)
+                        mil.delete(db=db, author=req.authname)
                     db.commit()
                     req.redirect(req.href.admin(cat, page))

Attachments

Change History

comment:1 Changed 3 years ago by rblank

  • Milestone set to 0.11.5
  • Owner set to rblank

Yep, I noticed this the other day, too. Good idea, and thanks for the patch.

comment:2 Changed 3 years ago by rblank

  • Resolution set to fixed
  • Status changed from new to closed

Patch applied in [8161], together with a regression test.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from rblank. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.