[Patch] Add a filter to the roadmap page for "milestones with no due date"
|Reported by:||Owned by:|
I'd find it useful to have a filter on the roadmap page for Milestones with no due date. The attached patch implements this by adding a Filter named Hide milestones with no due date.
My justification for this feature is that we have a lot of future milestones defined on my Trac instance, and usually we want to ignore these when viewing the roadmap.
At first, I was thinking that it made more sense to have a checkbox Show milestones with no due date.
To preserve the existing behavior you would want that checkbox to be enabled by default. I'm not sure how to go about that.
I quickly implemented the patch today so that I could get some feedback and over the weekend make any additional modifications that will be needed.
There are some issues:
- The checkbox Hide milestones with no due date does not stay selected when the page refreshes.
- I haven't set up my devenv to run the unit tests … I need to read-up on how to do this and can resubmit the patch with any necessary additions/modifications to associated unit tests, if necessary.
- The implementation might be cleaner if there was a show_noduedate parameter for Milestone.select method. In that case, the following block of code would not be necessary:
if hide_noduedate: for milestone in milestones: if milestone.due is None: milestones.remove(milestone)