Ticket #10733 (assigned defect)

Opened 5 months ago

Last modified 1 week ago

Ghostly milestones

Reported by: anti.danilevski@gmail.com Assigned to: falkb (accepted)
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (Last modified by rjollos)

When create new ticket, in milestones dropdown menu deleted previously milestones available.

How to reproduce (trac 1.0, postgresql):

  1. Create milestone A and attach it to the project B
  2. Delete milestone A
  3. Create new ticket
  4. Chose project B from dropdown menu
  5. Click milestones dropdown and you will see deleted previously milestone A

Attachments

Change History

12/28/12 18:47:41 changed by rjollos

  • description changed.

02/27/13 10:04:06 changed by falkb

Looks like it's a sibling of #10885

04/23/13 08:10:16 changed by falkb

  • owner changed from crossroad to falkb.

05/13/13 11:56:48 changed by falkb

  • status changed from new to assigned.

Reproduced. The problem is you used the Admin panel for deleting the milestone, but we deleted only via /roadmap page and forget to handle the Admin panel case.

05/13/13 12:01:09 changed by falkb

(In [13111]) refs #10733: now deletion of milestones and versions works via Admin panel also (open issue: silent deletion of milestones which became ghosts already)

05/13/13 13:31:12 changed by falkb

(In [13112]) refs #10733, refs #10885:

  • now renaming of milestones and versions works via Admin panel
  • now deleting and renaming of components works via Admin panel also

05/13/13 14:08:12 changed by falkb

anti.danilevski, please try and test

(follow-up: ↓ 9 ) 05/15/13 00:53:57 changed by rjollos

For milestones, another option would be to implement IMilestoneChangeListener. As to what immediate advantages that might offer, I'm speaking without having done a full code review of SimpleMultiProjectPlugin, but I think it would cover you in the case that a milestone is deleted from the command line using trac-admin, or over XmlRpc. If you have separate code handling a milestone deleted from the Milestone page and the admin panel, you could isolate that code to a single location, and you'd be protected regardless of the location that a milestone is deleted from. Documentation can be found here.

Unfortunately there doesn't currently exist a ChangeListener for Components and Versions, but that seems to be the subject of t:#11148.

(in reply to: ↑ 8 ; follow-up: ↓ 10 ) 05/15/13 08:47:04 changed by falkb

Replying to rjollos:

... it would cover you in the case that a milestone is deleted from the command line...

Oops... I haven't consider that either :)

For milestones, another option would be to implement IMilestoneChangeListener.

Good idea, I'm going to have a look...

I'm speaking without having done a full code review of SimpleMultiProjectPlugin

It's the work of mainly thomasd and me as patcher and bugfixer, and we were very new in this realm of Trac and Python programming. Everything was driven by an internal feature request in our company, and related time limits. That is why reviewing would likely reveal some things a guru-programmer would dislike. :)

(in reply to: ↑ 9 ; follow-up: ↓ 11 ) 05/15/13 09:15:36 changed by rjollos

Replying to falkb:

That is why reviewing would likely reveal some things a guru-programmer would dislike. :)

I'm just learning the API myself, but try to chime in when I see something that fits a good pattern that I've seen employed before. It's sort of a misappropriation of a popular phrase in the US, If you see something, say something ;)

(in reply to: ↑ 10 ) 05/15/13 09:37:07 changed by falkb

Replying to rjollos:

... but try to chime in when I see something that fits a good pattern that I've seen employed before. It's sort of a misappropriation of a popular phrase in the US, If you see something, say something ;)

Hehehe... in this world of programming interception is often useful


Add/Change #10733 (Ghostly milestones)




Change Properties
Action