Edgewall Software
Modify

Opened 18 years ago

Closed 4 years ago

#3754 closed enhancement (fixed)

retarget open tickets to other milestone of choice - Webadmin

Reported by: jl Owned by: Ryan J Ollos
Priority: normal Milestone: 1.5.1
Component: admin/web Version: none
Severity: normal Keywords: milestone patch review
Cc: t.riedel@… Branch:
Release Notes:

Open tickets can be retargeted from the Ticket Admin > Milestones page.

API Changes:
Internal Changes:

Description

This would be the same functionality as #2743 for the main trac (r3372 & r3732). I prefer to work with the webadmin and I would like to see this feature also in the webadmin.

Closing a milestone manually should retarget open tickets to other milestone of choice. This should be very similar to deleting a milestone.

Attachments (4)

MilestoneDeleteConfirm.png (11.8 KB ) - added by Ryan J Ollos 11 years ago.
MilestoneEditPage.png (41.4 KB ) - added by Ryan J Ollos 10 years ago.
AdminMilestoneEditPage.png (40.1 KB ) - added by Ryan J Ollos 10 years ago.
T3754_milestone_retarget.patch (5.2 KB ) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (28)

comment:1 by sid, 17 years ago

Keywords: needinfo added

This ticket is confusing. #2743 does exactly what this ticket wants except it does it in the Roadmap when you are closing a milestone.

Currently, there are no features to manipulate the roadmap or milestones using WebAdmin. Is that the feature requested in this ticket? Could this be accomplished using batch ticket modification instead (see #525)?

comment:2 by Christopher Lenz, 17 years ago

Keywords: needinfo removed
Milestone: 0.10.30.11
Status: newassigned

Actually, the current WebAdmin plugin (and the integrated admin in trunk) does support milestone management. And indeed, the issue raised here is the only feature missing.

The reason it's not been implemented yet is that WebAdmin generally allows deleting multiple items at once, and I'm not sure how to integrate that with retargetting tickets at deletion time. But once this does get added, the traditional milestone management via the roadmap will probably be removed completely (because it'd be redundant.

comment:3 by ThurnerRupert, 17 years ago

i am not sure if traditional milestone management is not more intuitive. you also do not manage wiki pages via web-admin, or attachment deletions.

in reply to:  3 comment:4 by Christian Boos, 15 years ago

Milestone: 0.11-retriage0.13
Owner: Christopher Lenz removed
Status: assignednew

Replying to ThurnerRupert:

i am not sure if traditional milestone management is not more intuitive. you also do not manage wiki pages via web-admin, or attachment deletions.

I tend to agree, I don't think it makes sense to remove milestone management in the traditional milestone editor. Actually, it would be more interesting to simply be able to reuse that editor in the admin panel context, when editing one milestone.

However, when doing a deletion of several milestones at once, it should be possible to select a milestone to be the new milestone to associate to tickets that belonged to the milestones that are going to be deleted.

by Ryan J Ollos, 11 years ago

Attachment: MilestoneDeleteConfirm.png added

comment:5 by Ryan J Ollos, 11 years ago

Milestone: next-major-releasesnext-dev-1.1.x
Owner: set to Ryan J Ollos
Status: newassigned

This was recently discussed on the mailing list, and I'll plan to implement following #5658 and #4582 with the following goals for the milestone admin page:

  • Provide a select for retargeting on milestone deletion. One possibility is to have a confirm page, like you see when deleting a milestone from the Roadmap.
  • Investigate reuse of milestone_edit.html in milestone admin. The Milestone edit page /milestone/milestone1?action=edit and Admin milestone edit page differ very slightly, with the latter only lacking the functionality to retarget tickets.

Milestone edit page

Admin Milestone edit page

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:6 by anonymous, 11 years ago

Keywords: milestone added

by Ryan J Ollos, 10 years ago

Attachment: MilestoneEditPage.png added

by Ryan J Ollos, 10 years ago

Attachment: AdminMilestoneEditPage.png added

in reply to:  5 ; comment:7 by Ryan J Ollos, 10 years ago

Replying to rjollos:

  • Investigate reuse of milestone_edit.html in milestone admin. The Milestone edit page /milestone/milestone1?action=edit and Admin milestone edit page differ very slightly, with the latter only lacking the functionality to retarget tickets.

This is also slightly related to #1233. In #1233, it is proposed to add Milestone-like pages for viewing and managing Components and Versions. If we can successfully include the same form within milestone_edit.html and admin_milestone_edit.html, then it should translate to the possibility of extracting the form from admin_component.html for reuse in component_edit.html, and likewise for the Versions edit pages.

comment:8 by Ryan J Ollos, 10 years ago

Milestone: next-dev-1.1.x1.1.2

comment:9 by Ryan J Ollos, 10 years ago

Milestone: 1.1.21.1.3

in reply to:  7 comment:10 by Ryan J Ollos, 10 years ago

Replying to rjollos:

If we can successfully include the same form within milestone_edit.html and admin_milestone_edit.html, then it should translate to the possibility of extracting the form from admin_component.html for reuse in component_edit.html, and likewise for the Versions edit pages.

These changes are pretty extensive, so I've made a new ticket #11499.

comment:11 by Ryan J Ollos, 9 years ago

Milestone: 1.1.3next-dev-1.1.x
Owner: Ryan J Ollos removed
Status: assignednew

comment:12 by Ryan J Ollos, 8 years ago

Milestone: next-dev-1.1.xnext-dev-1.3.x

comment:13 by Torge <t.riedel@…>, 7 years ago

Cc: t.riedel@… added

comment:14 by Ryan J Ollos, 7 years ago

comment:73:ticket:5658 notes the need for a batch notification when deleting a milestone.

comment:15 by anonymous, 6 years ago

When closing a milestone retarget tickets in same way as on roadmap:

  • trac/ticket/admin.py

    diff -r a3e91091080a trac/ticket/admin.py
    a b  
    1818from trac.resource import ResourceNotFound
    1919from trac.ticket import model
    2020from trac.ticket.api import TicketSystem
    21 from trac.ticket.roadmap import MilestoneModule
     21from trac.ticket.roadmap import MilestoneModule, \
     22                                get_num_tickets_for_milestone, \
     23                                group_milestones
    2224from trac.util import as_int, getuser
    2325from trac.util.datefmt import format_date, format_datetime, \
    2426                              get_datetime_format_hint, parse_date, user_time
     
    249251                elif 'cancel' in req.args:
    250252                    req.redirect(req.href.admin(cat, page))
    251253
     254            milestones = [m for m in model.Milestone.select(self.env)
     255                          if m.name != milestone.name
     256                          and 'MILESTONE_VIEW' in req.perm(m.resource)]
     257            milestone_groups = group_milestones(milestones,
     258                                                'TICKET_ADMIN' in req.perm)
     259            num_open_tickets = \
     260                get_num_tickets_for_milestone(self.env, milestone,
     261                                              exclude_closed=True)
     262
    252263            chrome = Chrome(self.env)
    253264            chrome.add_wiki_toolbars(req)
    254265            chrome.add_auto_preview(req)
    255266            data = {'view': 'detail',
    256267                    'milestone': milestone,
    257                     'default_due': milestone_module.get_default_due(req)}
     268                    'default_due': milestone_module.get_default_due(req),
     269                    'milestone_groups': milestone_groups,
     270                    'num_open_tickets': num_open_tickets,
     271                    'retarget_to': milestone_module.default_retarget_to}
    258272
    259273        # List view
    260274        else:

comment:16 by anonymous, 5 years ago

Keywords: patch review added

Please can you let me know what is missing in the patch above for Trac? It would be very helpful. Thanks! 🎅

in reply to:  16 comment:17 by Ryan J Ollos, 5 years ago

Replying to anonymous:

Please can you let me know what is missing in the patch above for Trac? It would be very helpful. Thanks! 🎅

I'll review soon. Thanks for the patch. It will need unit tests, per TracDev/SubmittingPatches.

by anonymous, 5 years ago

comment:18 by anonymous, 5 years ago

Thanks!

I found the existing unit tests for milestone admin in trac.ticket.tests.admin.MilestoneAdminPanelTestCase, and functional tests in trac.ticket.tests.functional.admin.TestAdminMilestoneCompleted*. They still succeed but don't test the retargeting feature yet.

Unit tests for the roadmap are in trac.ticket.tests.roadmap.MilestoneModuleTestCase, but I could not find anything related to the retargeting feature there. Functional tests for the roadmap *do* test the retargeting feature in trac.ticket.tests.functional.main.TestMilestoneClose.

Is it sufficient to copy that functional test to a new trac.ticket.tests.functional.admin.TestAdminMilestoneCompletedRetargeting, and adjusting it to use the admin panel instead of the roadmap? → I did that in T3754_milestone_retarget.patch.

comment:19 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.3.xnext-dev-1.5.x

Milestone renamed

in reply to:  18 comment:20 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.5.x1.5.1
Owner: set to Ryan J Ollos
Status: newassigned

Replying to anonymous:

Is it sufficient to copy that functional test to a new trac.ticket.tests.functional.admin.TestAdminMilestoneCompletedRetargeting, and adjusting it to use the admin panel instead of the roadmap? → I did that in T3754_milestone_retarget.patch.

Sorry for the delay. Looks good to me. I'll add some unit test coverage and commit the changes.

comment:21 by anonymous, 5 years ago

Thanks! 🥮

comment:22 by Ryan J Ollos, 4 years ago

Release Notes: modified (diff)

Added some test coverage: [f99f91400/rjollos.git]

Nice that this was pretty simple to do after #11499 (comment:7). I hope to work on #1233 soon.

comment:23 by anonymous, 4 years ago

Nice 🎀

comment:24 by Ryan J Ollos, 4 years ago

Resolution: fixed
Status: assignedclosed

Related changed in r17352 on 1.4-stable, merged in r17353.

Fixed in r17354.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.