Edgewall Software
Home
Trac
Trac Hacks
Genshi
Babel
Bitten
Home
Download
Documentation
Mailing Lists
License
FAQ
Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
Browse Source
View Tickets
New Ticket
Search
Context Navigation
+0
Start Page
Index
History
Editing TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.IMilestoneChangeListener
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
== Extension Point : ''IMilestoneChangeListener'' == ||'''Interface'''||''IMilestoneChangeListener''||'''Since'''||[wiki:TracDev/ApiChanges/0.12#IMilestoneChangeListener 0.12]|| ||'''Module'''||''trac.ticket.api''||'''Source'''||[source:trunk/trac/ticket/api.py#/IMilestoneChangeListener api.py]|| The ''IMilestoneChangeListener'' allows components to listen for and to react to milestone events. == Purpose == The [TracRoadmap Trac milestone system] helps planning and managing the future development of a project. Plugins can hook into the milestone system to trigger their own actions when milestones are created, deleted or changed. The main purpose for this interface is to allow plugins to stay informed about the existing milestones and trigger appropriate actions elsewhere (e.g. sending notifications, starting indexing services, updating supplementary data structures etc.) == Usage == Implementing the interface follows the standard guidelines found in [wiki:TracDev/ComponentArchitecture] and of course [wiki:TracDev/PluginDevelopment]. When a user creates a new milestone the `milestone_created` method is called. Similarly methods are called when a user deletes a milestone (`milestone_deleted`) or changes some milestone properties (`milestone_changed`). The milestone model object is passed to each handler. So the milestone properties can be accessed as usual (i.e. `milestone.name`, `milestone.due`, `milestone.completed`, `milestone.description`) and the milestone can be updated etc. In `milestone_changed` the changed properties are available by indexing e.g. `old_values['name']`. == Examples == See [source:trunk/sample-plugins/milestone_to_version.py MilestoneToVersion] sample plugin. == Available Implementations == * [source:trunk/sample-plugins/milestone_to_version.py MilestoneToVersion] sample plugin == Additional Information and References == * [http://www.edgewall.org/docs/trac-trunk/epydoc/trac.ticket.api.IMilestoneChangeListener-class.html epydoc] * [http://www.edgewall.org/docs/trac-trunk/html/api/trac_ticket_api.html#trac.ticket.api.IMilestoneChangeListener API Reference] * See [../trac.ticket.api.ITicketChangeListener trac.ticket.api.ITicketChangeListener], [../trac.versioncontrol.api.IRepositoryChangeListener trac.versioncontrol.api.IRepositoryChangeListener], [../trac.attachment.IAttachmentChangeListener trac.attachment.IAttachmentChangeListener], [../trac.wiki.api.IWikiChangeListener trac.wiki.api.IWikiChangeListener] * [TracDev/DatabaseSchema/TicketSystem#Tablemilestone Milestone database schema] * Related tickets: * Generic change listener replacement: #8834, #11148, #6543, Trac-dev:7737 * This interface has also been implemented [changeset:4846 twice] [changeset:4913 before] in a branch but got [changeset:4942 removed] before merging. === API History * [wiki:TracDev/ApiChanges/0.12#IMilestoneChangeListener 0.12] introduced the interface (changeset:8828, #6543)
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.