Opened 12 years ago
Closed 10 years ago
#10733 closed defect (fixed)
Ghostly milestones
Reported by: | Owned by: | falkb | |
---|---|---|---|
Priority: | normal | Component: | SimpleMultiProjectPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description (last modified by )
When create new ticket, in milestones dropdown menu deleted previously milestones available.
How to reproduce (trac 1.0, postgresql):
- Create milestone A and attach it to the project B
- Delete milestone A
- Create new ticket
- Chose project B from dropdown menu
- Click milestones dropdown and you will see deleted previously milestone A
Attachments (0)
Change History (12)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 11 years ago by
Owner: | changed from Christopher Paredes to falkb |
---|
comment:4 Changed 11 years ago by
Status: | new → 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 11 years ago by
comment:6 Changed 11 years ago by
comment:8 follow-up: 9 Changed 11 years ago by
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 follow-up: 10 Changed 11 years ago by
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 follow-up: 11 Changed 11 years ago by
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 Changed 11 years ago by
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
Looks like it's a sibling of #10885