Hide the retarget select when the milestone has no associated tickets
— at Version 3
Reported by: |
Ryan J Ollos |
Owned by: |
Ryan J Ollos |
Priority:
|
normal
|
Milestone:
|
1.1.2
|
Component:
|
roadmap
|
Version:
|
|
Severity:
|
normal
|
Keywords:
|
milestone retarget
|
Cc:
|
|
Branch:
|
|
Release Notes:
|
The retarget elements are not shown and a hint is shown in their place when there are no tickets associated with the milestone.
|
API Changes:
|
|
Internal Changes:
|
|
It was previously discussed starting in comment:38:ticket:5658 that the retarget select should be hidden when there are no retargetable tickets associated with the milestone. This applies to the Milestone edit page and the Milestone delete page. For the Milestone edit action, any open tickets are retargetable. For the Milestone delete action, any tickets associated with the milestone are retargetable.
When I started working this ticket, I was thinking that it might not be very good practice to have elements conditionally appear on the form, as comment:description suggests should be implemented. However, that is what we are currently doing for the case that there are no milestones to which the tickets can be retargeted: tags/trac-1.0.1/trac/ticket/templates/milestone_edit.html@:82#L71. That behavior is also undesirable because the user doesn't have a choice to retarget the tickets to None vs leaving them associated with the milestone that is being closed.
I experimented with the idea of always showing the retarget elements when there are tickets associated with the milestone, even when the only choice in the selet is to retarget the tickets to the None milestone, and showing a hint when there are no tickets associated with the milestone.
Here are some screen captures. The associated changes can be found in log:rjollos.git:t11336. What do you think about replacing the retarget form elements with a hint?
Milestone delete: Tickets associated with the milestone
Milestone delete: Tickets associated with the milestone (no hint)
Milestone delete: Tickets associated with the milestone (hint)
Milestone edit: Tickets associated with the milestone
Milestone edit: Tickets associated with the milestone