#3971 closed defect (fixed)
Empty Milestone
Reported by: | markus | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | roadmap | Version: | devel |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Trac 0.11dev tries to render "empty" milestones (see http://trac.edgewall.org/milestone).
-
trac/ticket/roadmap.py
27 27 from trac.util.text import shorten_line, CRLF, to_unicode 28 28 from trac.ticket import Milestone, Ticket, TicketSystem 29 29 from trac.Timeline import ITimelineEventProvider 30 from trac.web import IRequestHandler30 from trac.web.api import IRequestHandler, HTTPNotFound 31 31 from trac.web.chrome import add_link, add_stylesheet, INavigationContributor 32 32 from trac.wiki import wiki_to_html, wiki_to_oneliner, IWikiSyntaxProvider 33 33 … … 358 358 elif action == 'delete': 359 359 return self._render_confirm(req, db, milestone) 360 360 361 return self._render_view(req, db, milestone) 361 if milestone.exists: 362 return self._render_view(req, db, milestone) 363 else: 364 raise HTTPNotFound('Milestone not found') 362 365 363 366 # Internal methods
Creating the corresponding unit test is left as an exercise for the TracTeam. ;-)
Attachments (0)
Change History (6)
follow-up: 2 comment:1 by , 18 years ago
Milestone: | → 0.11 |
---|---|
Severity: | normal → minor |
follow-up: 3 comment:2 by , 18 years ago
Replying to cboos:
Mh, couldn't we do something more useful here, like displaying the "current" milestone?
This is what I do for changesets, looking for
/changeset
, you'll get the head.
What do you mean by current milestone? In other words, what would be Trac's current milestone? 0.9.7, 0.10.1, 0.11? If we really want to avoid returing HttpNotFound, I'd rather redirect to the roadmap…
comment:3 by , 18 years ago
Owner: | changed from | to
---|
Replying to anonymous:
Replying to cboos:
Mh, couldn't we do something more useful here, like displaying the "current" milestone?
This is what I do for changesets, looking for
/changeset
, you'll get the head.What do you mean by current milestone? In other words, what would be Trac's current milestone? 0.9.7, 0.10.1, 0.11?
Good point, what I had in mind was the use the first milestone in the Roadmap list of opened milestones, but in the case of Trac itself, that would give 0.9.7, which is not really the "current" one (0.11 would be the interesting one).
If we really want to avoid returing HttpNotFound, I'd rather redirect to the roadmap…
Good suggestion. Any other opinion?
comment:6 by , 18 years ago
Should we do the same for /ticket
, and redirect to either /query
or /reports
?
Mh, couldn't we do something more useful here, like displaying the "current" milestone?
This is what I do for changesets, looking for
/changeset
, you'll get the head.