Opened 16 years ago
Last modified 14 years ago
#7895 new enhancement
Issue: Custom Query Shows All Milestones Closed and Active
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | unscheduled |
Component: | general | Version: | none |
Severity: | normal | Keywords: | |
Cc: | ismael@…, kirean@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I realize this maybe intentional but it occured to me that when I do a custom query and search by milestone, EVERY milestone is shown in the dropdown. I understand it was meant to be exhaustive but the list is growing and growing after each successive release.
Would be great to only show current/active milestones in the dropdown as default but also, if needed, through a checkbox be able to show all milestones.
Attachments (5)
Change History (26)
comment:1 by , 15 years ago
Milestone: | 0.12 → next-major-0.1X |
---|
comment:2 by , 15 years ago
Milestone: | next-major-0.1X → 1.0 |
---|
by , 14 years ago
Attachment: | select_group_milestones.diff added |
---|
Put milestones in select groups like ticket view. Make some tests to fail.
comment:4 by , 14 years ago
Cc: | added |
---|
comment:5 by , 14 years ago
Milestone: | triaging → 0.13 |
---|---|
Owner: | set to |
Priority: | normal → high |
Using the same grouping as in the milestone field of tickets might indeed be a good idea. I'll test the patch.
by , 14 years ago
Attachment: | select_group_milestones_correct.diff added |
---|
This is the correct diff, the other one has two extra lines where ordered alphabetically the milestones 'By due date', that fits better my organization
by , 14 years ago
Attachment: | order_milestones_custom_query_view_V2.patch added |
---|
Found a bug in the last one. Uploading patch with fixed bug.
follow-up: 8 comment:6 by , 14 years ago
Thanks for working on this, but please have a look at our TracDev/CodingStyle first.
In particular, it seems you have a mix of tabs and spaces, use spaces only. Also, use more appropriate variable names (e.g. sel
instead of e
for the <select>).
follow-up: 9 comment:7 by , 14 years ago
Are you working on Would be great to only show current/active milestones in the dropdown as default but also, if needed, through a checkbox be able to show all milestones.
or Put milestones in select groups like ticket view.
? Or a mix of both?
follow-up: 11 comment:8 by , 14 years ago
Replying to cboos:
Thanks for working on this, but please have a look at our TracDev/CodingStyle first. In particular, it seems you have a mix of tabs and spaces, use spaces only. Also, use more appropriate variable names (e.g.
sel
instead ofe
for the <select>).
I'll have a look at it.
comment:9 by , 14 years ago
Replying to Erik Andersson <kirean@…>:
Are you working on
Would be great to only show current/active milestones in the dropdown as default but also, if needed, through a checkbox be able to show all milestones.
orPut milestones in select groups like ticket view.
? Or a mix of both?
I think the proper solution is a mix of both: Hide optionally the completed milestones and show grouped and ordered the active ones. I'm only doing Put milestones in select groups like ticket view.
Don't mind if this patch is discarded in the end, but it can be a solution patch for the meantime, or some start point for the desired solution.
comment:10 by , 14 years ago
Cc: | added |
---|
follow-up: 12 comment:11 by , 14 years ago
Replying to Ismael de Esteban <ismael@…>:
Replying to cboos:
Thanks for working on this, but please have a look at our TracDev/CodingStyle first. In particular, it seems you have a mix of tabs and spaces, use spaces only. Also, use more appropriate variable names (e.g.
sel
instead ofe
for the <select>).I'll have a look at it.
About the e
for <select>
, I got it from: http://trac.edgewall.org/browser/trunk/trac/htdocs/js/query.js#L99
How should I proceed?
follow-up: 13 comment:12 by , 14 years ago
Replying to Ismael de Esteban <ismael@…>:
… How should I proceed?
Use sel
in the new code, don't change the unrelated code. Or better, look at unifying your new createSelectGroup
with createSelect
, if possible.
by , 14 years ago
Attachment: | order_milestones_custom_query_view_V3.patch added |
---|
Bugfix: Not showing group by Milestone. Following coding standards.
comment:13 by , 14 years ago
Replying to cboos:
Replying to Ismael de Esteban <ismael@…>:
… How should I proceed?
Use
sel
in the new code, don't change the unrelated code. Or better, look at unifying your newcreateSelectGroup
withcreateSelect
, if possible.
That's feasible but will obfuscate the code a little I think.
by , 14 years ago
Attachment: | 7895-group-milestones-r10139.patch added |
---|
Group milestones in the ticket query selectors.
comment:14 by , 14 years ago
Nice patch, thanks! Adding a whole new "optgroup" field type was not the simplest solution, however. Adding an "optgroup" key to "select" fields makes the code much simpler, and we already do the same on the ticket page. The result is in 7895-group-milestones-r10139.patch.
One difference with the previous behavior is that only milestones for which the user has MILESTONE_VIEW
are shown in the selector. Previously, all milestones were shown. This is now consistent with the ticket page.
Please test and let me know if the result is what you expect.
comment:15 by , 14 years ago
Patch applied in [10153].
For the "only show active milestones, and closed milestones with a checkbox", I'm still waiting for UI suggestions / sample implementations.
comment:16 by , 14 years ago
Priority: | high → normal |
---|
follow-up: 18 comment:17 by , 14 years ago
comment:18 by , 14 years ago
comment:19 by , 14 years ago
Possibly. If req
is None
, the generated milestone data isn't used anyway, so this won't make a difference. I didn't look much further either, because template_data()
mixes plain data generation and side-effects, and would be in need of a good refactoring.
I'll make the change tonight.
comment:21 by , 14 years ago
Milestone: | 0.13 → unscheduled |
---|---|
Owner: | removed |
No suggestions for the UI of "only show active milestones, and closed milestones with a checkbox", so this moves back to unscheduled.
Sorry, wrong milestone.