Edgewall Software

Ticket #1440 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 weeks ago

Remove reached milestones from edit ticket list

Reported by: anonymous Owned by: mgood
Priority: high Milestone: 0.11
Component: ticket system Version: devel
Severity: minor Keywords:
Cc: trac@…, pkou@…, kirean@…, jon.kowal@…

Description

This is related to #1078, except on the edit ticket screen. You should not be able to set the milestone to one that has already been reached.

Attachments

Ticket-r1668.py.patch (0.6 KB) - added by Tim Pease <tpease (at) ball (dot) com> 4 years ago.
Patch for Ticket.py (revision 1668)
Ticket-r1668.py.2.patch (0.6 KB) - added by Tim Pease <tpease (at) ball (dot) com> 4 years ago.
Typo in the first patch (damn!). Use this one instead
Remove-Milestones.patch (1.0 KB) - added by lists@… 2 years ago.
Patch against 0.10.2 which excludes completed milestones from the ticket edit form when the user does not have TICKET_ADMIN permission.
milestone_optgroups.diff (3.1 KB) - added by mgood 21 months ago.
group open/closed milestones
milestone_optgroups.2.diff (5.3 KB) - added by mgood 16 months ago.
new patch for trunk
milestone_optgroups.3.diff (5.5 KB) - added by cboos 13 months ago.
Updated patch for current trunk (r6139)

Change History

  Changed 4 years ago by cmlenz

So what if you want to retrospectively assign an already completed ticket to a different milestone (for example, if the original milestone was incorrect).

Maybe a corner case, and maybe should only be available to TICKET_ADMIN folks.

  Changed 4 years ago by jonathon.jongsma@…

restricting to TICKET_ADMIN seems like a reasonable solution.

  Changed 4 years ago by Tim Pease <tpease (at) ball (dot) com>

Attached is a patch file to Ticket.py (revision 1668) that prevents normal users from selecting a completed milestone, but allows a ticket adminstrator to do so. This is an implementation of the suggestion from jonathon.jongsma@….

This is the same patch for new tickets implemented for #1078, but with the added logic for determining if a user is a ticket administrator.

Changed 4 years ago by Tim Pease <tpease (at) ball (dot) com>

Patch for Ticket.py (revision 1668)

Changed 4 years ago by Tim Pease <tpease (at) ball (dot) com>

Typo in the first patch (damn!). Use this one instead

follow-up: ↓ 7   Changed 3 years ago by anonymous

#3085 is marked as duplicate.

  Changed 2 years ago by anonymous

  • status changed from new to closed
  • resolution set to fixed

  Changed 2 years ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted

in reply to: ↑ 4   Changed 2 years ago by anonymous

Replying to anonymous:

#3085 is marked as duplicate.

test

  Changed 2 years ago by cboos

Before you go further with this, note that this is not a test system.

  Changed 2 years ago by trac@…

  • cc trac@… added

I want notifications for this ticket. Hopefully Automattic's SPAM detection behaves now with a comment?

  Changed 2 years ago by ThurnerRupert <rupert.thurner@…>

  • priority changed from normal to high

why an admin should be bothered by closed milestones? especially with systems with many milestones in it it is extremely inpractical that all the milestones show up for a tiny cornercase.

a much better solution would be: if a ticket got added to a wrong milestone, it is no problem to open the milestone again and THEN reassign the ticket to it.

  Changed 2 years ago by ThurnerRupert <rupert.thurner@…>

  • milestone set to 0.10.1

set milestone, as its a very small change helping admin's of longer running projects with many completed milestones.

follow-up: ↓ 13   Changed 2 years ago by ThurnerRupert <rupert.thurner@…>

  • status changed from reopened to closed
  • resolution set to fixed

sorry for confusion .. checkt with 0.10.1. it is solved there.

in reply to: ↑ 12   Changed 2 years ago by mgood

  • status changed from closed to reopened
  • resolution fixed deleted
  • milestone changed from 0.10.1 to 0.10.3

Replying to ThurnerRupert <rupert.thurner@gmail.com>:

sorry for confusion .. checkt with 0.10.1. it is solved there.

Actually this has not yet been implemented in Trac. Maybe you've made some local changes to fix this on your end?

  Changed 2 years ago by mgood

  • owner changed from jonas to mgood
  • status changed from reopened to new

Changed 2 years ago by lists@…

Patch against 0.10.2 which excludes completed milestones from the ticket edit form when the user does not have TICKET_ADMIN permission.

  Changed 2 years ago by ThurnerRupert

you are right - i must be suffering of latent blindness - i applied the patch and removed the exception for admins.

btw most people here work as admins, as they should be able to edit the ticket description - so the above patch would not help a lot.

and, it is (to me in any case) completely counter-intuitive to change a closed milestone (i.e. assigning tickets to it), be it by an admin or not. you could assign an open ticket to a closed milestone, which imo is logically wrong.

follow-up: ↓ 17   Changed 2 years ago by cboos

You're right, I think targeting closed milestone should be possible only for closed tickets, as a way to "fix" a wrongly set milestone.

in reply to: ↑ 16   Changed 2 years ago by mgood

  • status changed from new to assigned

Replying to cboos:

You're right, I think targeting closed milestone should be possible only for closed tickets, as a way to "fix" a wrongly set milestone.

You may also want to set it to a closed milestone when closing a ticket which was fixed in a past release, but you forgot to close. To avoid complicating this too much I'll stick to the current idea of requiring TICKET_ADMIN permission, but maybe once the WorkFlow stuff is merged it could be handled more robustly.

  Changed 2 years ago by mgood

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r4296 and r4298. Thanks for the patch.

follow-up: ↓ 20   Changed 2 years ago by ThurnerRupert

i'd be very glad if you could remove the admin exception. it bothers admin's for a very rare edge case. if you forgot to close the ticket for a milestone, where is the problem to open the milestone and then fix the error?

but normally you made your release notes, you plublished maybe some documents, you delivered even software. so opening the milestone if you want to correct this is a minor overhead.

the usual "fault" on our site is, that the first ticket description is wrong/insufficient. this provokes excessive ticket-admins ... and then they all get confused by these closed milestones .... and even more errors are made.

may i reopen the ticket?

in reply to: ↑ 19 ; follow-up: ↓ 21   Changed 2 years ago by cboos

Replying to ThurnerRupert:

... the usual "fault" on our site is, that the first ticket description is wrong/insufficient. this provokes excessive ticket-admins ... and then they all get confused by these closed milestones .... and even more errors are made.

So that's the real problem I think. I'm currently working on #2945. Once this is complete, I think we could reasonably make the description editable by normal TICKET_CHGPROP users.

TICKET_ADMIN should correspond to some "ticket supervisor" person, which should have the right to easily correct what's wrong in a ticket, without much hassle. That could eventually extend to fixing the resolution without having to reopen the ticket, and that certainly covers fixing the milestone information.

For your particular needs, you can easily modify the by removing the admin check, but for the general case, I think my proposal is better.

in reply to: ↑ 20   Changed 2 years ago by ThurnerRupert <rupert.thurner@…>

Replying to cboos:

Replying to ThurnerRupert:

... the usual "fault" on our site is, that the first ticket description is wrong/insufficient. this provokes excessive ticket-admins ... and then they all get confused by these closed milestones .... and even more errors are made.

So that's the real problem I think. I'm currently working on #2945. Once this is complete, I think we could reasonably make the description editable by normal TICKET_CHGPROP users. TICKET_ADMIN should correspond to some "ticket supervisor" person, which should have the right to easily correct what's wrong in a ticket, without much hassle. That could eventually extend to fixing the resolution without having to reopen the ticket, and that certainly covers fixing the milestone information. For your particular needs, you can easily modify the by removing the admin check, but for the general case, I think my proposal is better.

yes. less admins is general a very good idea. we'll check if we can live without admin.

  Changed 22 months ago by simon

As a compromise what about about distinguishing between the open and closed milestones in the drop down by crossing out the closed milestones? (similar to closed tickets)

  Changed 22 months ago by ThurnerRupert

  • status changed from closed to reopened
  • type changed from defect to enhancement
  • resolution fixed deleted
  • milestone changed from 0.10.3 to 0.11

we have now first experiences. our milestone number is high, and for ticket admins it is unusable as it is. admins tend to do a lot of work in trac, and wrongly assigned milestones are rare. so admins keep scrolling through 40 milestones to find the correct one, 30 of them pointless old ones.

deleting the milestones is also not an option, as the milestone gets removed from the tickets as well and we loose the track record.

also sorting of milestones in the dropdown is improveable, i.e. the "usual milestones" set to tickets are the next ones in time.

so the more we work with it the following improvements seem to be good:

  • only open milestones show up in the dropdown
  • if you have wrongly assigned tickets the following seems most practical:
    • a personal setting "show closed milestones"
    • or let the admin reopen the milestone to correct it
  • sort open milestones by due date in the dropdown

the solution of "changing it in the code just for us" is not really upgrade friendly.

fixing the resolution like proposed by cboos seems appealing. there we have a much higher error rate.

allow me to reopen pls ....

  Changed 21 months ago by anonymous

#4811 marked as duplicate.

  Changed 21 months ago by anonymous

See also #4910 - providing an ajax autocomplete for milestones would solve this problem.

  1. List only open milestones
  2. If you wish to search for an old milestone, you just have to type its name.

Changed 21 months ago by mgood

group open/closed milestones

  Changed 21 months ago by mgood

I think the biggest problem is that the closed milestones are sorted at the top, so you have to scroll past all of them to get to the open milestones. This patch would help that by splitting them into <optgroup>s with the open milestones at the top.

  Changed 20 months ago by pkou@…

  • cc pkou@… added

Another idea is expanding meaning of closed milestones. When milestone is closed, it can mean "completed" and in addition it can mean "archived" (or "expired"). This will require adding new date field to a milestone (when milestone is archived).

This approach resolves the issue with displaying closed milestones in tickets:

  • Display open milestones first (in the roadmap order);
  • Display completed but not archived milestones second (in reverse order of their completeness) - possible for closed tickets only but this is not critical.

When a milestone is marked as completed, users will be able to specify when it becomes archived (by default current date + N days - configurable).

This correlates with #2588 - in addition to the option "Display completed milestones" on the roadmap view there can be an option "Display recently completed milestones", which excludes archived milestones.

Also, this approach works without information loss when a ticket needs to be reassigned to very old milestone: De-archive the milestone by setting some archived date in future and reassign tickets. The milestone will disappear from the tickets view automatically.

Having experience with long-lived projects with many milestones, this idea/use case looks very logical.

Probably, this needs to be discussed in mail list.

  Changed 20 months ago by cboos

#4910 was closed as duplicate. It proposed auto-completion for milestone names, as an alternative way to deal with long list of milestones.

  Changed 17 months ago by anonymous

#5645 duplicate

  Changed 17 months ago by cboos

I'll have a look at reviving mgood's patch.

  Changed 16 months ago by mgood

I've updated the patch to work with trunk. If this seems ok to people I'll commit it.

Changed 16 months ago by mgood

new patch for trunk

  Changed 16 months ago by cboos

  • milestone changed from 0.11.1 to 0.11

Works great.

The idea for the original order between the "per type settings" block was that there could be some named fields which could override the behavior given by their type, but I understand why you made the change (eventually append the current milestone value to the list of options if it's not any longer there).

  Changed 15 months ago by ThurnerRupert

could you pls commit it?

  Changed 15 months ago by paulo@…

Did someone commit it?

  Changed 14 months ago by anonymous

Will this work with 10.4 when it's committed or is it only for 0.11?

  Changed 14 months ago by kirean@…

Hi

I just verified that milestone_optgroups.2.diff is not in trunk. I applied it locally and it looks great.

Can we please have this in trunk?

Cheers / Erik

  Changed 13 months ago by anonymous

  • cc kirean@… added

follow-up: ↓ 39   Changed 13 months ago by kirean@…

There was a discussion in #trac about this ticket on to close this ticket again. I think that would be a pity since it looks real good from my side..

I'll add it to my local svk branch instead then..

in reply to: ↑ 38   Changed 13 months ago by nkantrowitz

Replying to kirean@gmail.com:

There was a discussion in #trac about this ticket on to close this ticket again. I think that would be a pity since it looks real good from my side.. I'll add it to my local svk branch instead then..

I never suggested to close it, just that few admins notice the first part of this implementation is already done (only visible to TICKET_ADMINs) as they don't login as normal users.

Changed 13 months ago by cboos

Updated patch for current trunk (r6139)

  Changed 13 months ago by cboos

Matt, I'm not sure you're still monitoring this ticket. I'm going to apply your patch, updated for trunk (attachment:milestone_optgroups.3.diff) unless you're willing to do it yourself.

  Changed 12 months ago by cboos

  • status changed from reopened to closed
  • resolution set to fixed

Latest patch applied in r6171.

  Changed 10 months ago by osimons

#3734 closed as duplicate.

  Changed 3 weeks ago by jon.kowal@…

I got here from duplicate #7779, thanks cboos.

Is there a way to hide completed milestones from users with TICKET_ADMIN? Looking at the source it doesn't seem like it. I face the same problems as stated in comment:23 having 80% of the milestones in the dropdown being completed. In our usage scenario they will never be assigned to any ticket again and there should be a way to hide those even from TICKET_ADMIN users.

  Changed 3 weeks ago by jon.kowal@…

  • cc jon.kowal@… added

Add/Change #1440 (Remove reached milestones from edit ticket list)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from mgood. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.