Modify ↓
#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: | |||
| Internal 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 , 21 years ago
| Cc: | added |
|---|
comment:2 by , 21 years ago
| Component: | general → ticket system |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Summary: | Doesn't allow newtickets be target to already closed milestones → Don't allow new tickets be target to already closed milestones |
comment:3 by , 21 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 , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Applied in [1359]. Thanks!
comment:5 by , 20 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')
Note:
See TracTickets
for help on using tickets.



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.