Modify

Opened 19 months ago

Last modified 15 months ago

#10733 assigned defect

Ghostly milestones

Reported by: anti.danilevski@… Owned by: falkb
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 (0)

Change History (11)

comment:1 Changed 19 months ago by rjollos

  • Description modified (diff)

comment:2 Changed 17 months ago by falkb

Looks like it's a sibling of #10885

comment:3 Changed 15 months ago by falkb

  • Owner changed from crossroad to falkb

comment:4 Changed 15 months ago 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.

comment:5 Changed 15 months ago 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)

comment:6 Changed 15 months ago 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

comment:7 Changed 15 months ago by falkb

anti.danilevski, please try and test

comment:8 follow-up: Changed 15 months ago 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.

comment:9 in reply to: ↑ 8 ; follow-up: Changed 15 months ago 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. :)

comment:10 in reply to: ↑ 9 ; follow-up: Changed 15 months ago 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 ;)

comment:11 in reply to: ↑ 10 Changed 15 months ago 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 Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.