Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#1078 closed defect (fixed)

Don't allow new tickets be target to already closed milestones

Reported by: Otavio Salvador Owned by: Christopher Lenz
Priority: normal Milestone: 0.9
Component: ticket system Version: 0.8
Severity: minor Keywords: patch
Cc: manuzhai@… Branch:
Release Notes:
API Changes:

Description

IMHO doesn't make sense allow users target some new ticket to already released version.

Attachments (0)

Change History (5)

comment:1 by Manuzhai, 15 years ago

Cc: manuzhai@… added

comment:2 by Christopher Lenz, 15 years ago

Component: generalticket system
Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned
Summary: Doesn't allow newtickets be target to already closed milestonesDon't allow new tickets be target to already closed milestones

So remove "closed" milestones (see also #786) from the new ticket form, but include them in the regular ticket form, right? That seems like a good idea.

comment:3 by Matthew Good <trac matt-good net>, 15 years ago

Keywords: patch added

Simple enough:

=== trac/Ticket.py
==================================================================
--- trac/Ticket.py  (revision 1710)
+++ trac/Ticket.py  (local)
@@ -341,7 +341,7 @@

         util.sql_to_hdf(self.db, "SELECT name FROM component ORDER BY name",
                         req.hdf, 'newticket.components')
-        util.sql_to_hdf(self.db, "SELECT name FROM milestone ORDER BY name",
+        util.sql_to_hdf(self.db, "SELECT name FROM milestone WHERE completed = 0 ORDER BY name",
                         req.hdf, 'newticket.milestones')
         util.sql_to_hdf(self.db, "SELECT name FROM version ORDER BY name",
                         req.hdf, 'newticket.versions')

comment:4 by Christopher Lenz, 15 years ago

Resolution: fixed
Status: assignedclosed

Applied in [1359]. Thanks!

comment:5 by jruscio@…, 14 years ago

This patch will provide the same functionality to the 0.8.4 release:

--- Ticket.py-unpatched 2005-08-16 17:44:41.000000000 -0400
+++ Ticket.py   2005-08-16 18:05:54.000000000 -0400
@@ -327,8 +327,12 @@
 
         util.sql_to_hdf(self.db, 'SELECT name FROM component ORDER BY name',
                         self.req.hdf, 'newticket.components')
-        util.sql_to_hdf(self.db, 'SELECT name FROM milestone ORDER BY name',
+
+        util.sql_to_hdf(self.db, "SELECT name, time FROM milestone "
+                                "WHERE (time IS NULL OR time = 0 OR time > %d) "
+                                "ORDER BY name" % time.time() ,
                         self.req.hdf, 'newticket.milestones')
+
         util.sql_to_hdf(self.db, 'SELECT name FROM version ORDER BY name',
                         self.req.hdf, 'newticket.versions')

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Christopher Lenz 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.