wiki:WatchlistPlugin

Watchlist for Wikis and Tickets

Description

This plugin adds a watchlist for Trac wikis and tickets. Every logged-in user can watch any wiki page and ticket. The watchlist is provided under [/watchlist] which is also added to the main navigation bar.

To insert a watchlist style table into wikis use the ListOfWikiPagesMacro.

A special ticket report which only shows watched tickets is also provided.

Navigation bar items for an unwatched wiki page, note the 'Watch' link:

Screenshot navigation bar holding items of WatchlistPlugin and modified item of AnnouncerPlugin.

Once the watchlist under [/watchlist] is activated and wiki pages and tickets have been added, it looks as follows:

Screenshot of watchlist as of [6913].

Bugs/Feature Requests

Existing bugs and feature requests for WatchlistPlugin are here.

If you have any issues, create a new ticket.

defect

32 / 32

enhancement

12 / 13

Download

Download the zipped source of the develop version from here.

The release files are also available on the Python Package Index (currently out-of-date).

Source

You can check out WatchlistPlugin for Trac version 0.11, 0.12 or 1.0; or browse the source with Trac.

A normal check-out is done as follows:

svn co https://trac-hacks.org/svn/watchlistplugin/<trac version> watchlistplugin

To export the sources, replace co with export in the line above.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Enable the plugin in the trac.ini configuration file or in the Web admin interface:

[components]
tracwatchlist.* = enabled

Then update your Trac database:

trac-admin /path/to/trac/environment upgrade

To uninstall this plugin an uninstaller (a Python script) is provided to remove all created database tables (Direct download).

The plugin itself can be uninstalled by removing the Python egg file.

Its usage is as follows:

$ python uninstall.py /path/to/trac/environment [-t <tables>] [-u <username>]

<tables> stands for a comma-separated list of one or more of the database tables watchlist, watchlist_settings and system. The first two are database tables created by the plugin, while the last holds the watchlist version. Only the given tables are deleted: the system table is not deleted of course, only the watchlist_version entry is removed. By default all three tables are affected.

The watchlist data of only a single user can be deleted using the -u option which takes the username as argument.

Rename user names

A script is provided to rename a user in the database tables created by the plugin (Direct download).

Please note that no other tables or settings are affected. Renaming to an already existing username will result in an error if both watchlists share identical content.

Its usage is as follows:

$ python rename_user.py /path/to/trac/environment <oldname> <newname>

Using it together with the AnnouncerPlugin

If the AnnouncerPlugin is used to receive change notifications the watchlist allows the user to easily change notification setting of watched wiki pages and tickets. If this feature (#4744) is enabled, an extra column appears in the watchlist, which informs the user about the current setting (On/Off) and allows him/her to change it. Watching and notifications can be independent, ie users can have themselves notified about changes of a wiki page which is not on their watchlist or vice versa, but can also be linked together as shown below.

To enable notification settings in the watchlist install the AnnouncerPlugin in revision [6916] or later and write the following into your Trac configuration file conf/trac.ini:

[announcer]
# Rename announcers context navigation items (empty list removes them):
ctxtnav_names =

[watchlist]
notifications = true
display_notify_navitems = true

To enable notifications by default for all entries in the watchlist (see #6052) also add:

# still in [watchlist]
notify_by_default = true

Configuration

The following configuration file options are currently supported. Per-user configuration settings is to be implemented. The (legacy) default settings are:

[watchlist]
notifications = false                             # Notification support on/off, see above
notify_by_default = false                         # Enable notifications about all watchlist entries, see above 
display_notify_navitems = false                   # Display own notification menu items
display_notify_column = true                      # Display notification column in watchlist tables

stay_at_resource = false                          # Stay at wiki or ticket page after watch/unwatch etc., otherwise go to watchlist page
show_messages_on_resource_page = true             # If stay_at_resource is true show action messages on resource page
show_messages_on_watchlist_page = true            # If stay_at_resource is false show action messages on watchlist page
show_messages_while_on_watchlist_page = true      # Show messages about changes done on the watchlist page

Watchlist Report

A ticket report can be added to list all watched tickets of the current user. This is not done automatically at the moment. However, the SQL code for a manual installation can be taken from this file.

Usage

Browse any wiki or ticket and click Watch in the context navigation bar. To unwatch a wiki or ticket browse to it and click Unwatch in the context navigation bar or click the corresponding Unwatch link in the watchlist.

In order to see the watchlist click on the Watchlist button on the main navigation bar. This button will only be displayed for logged in users. The watchlist will be displayed under the location /watchlist. Therefore it can be linked to from a wiki page using [/watchlist].

Recent Changes

15713 by rjollos on 2016-08-18 10:07:48
3.0.0dev: Replace use of deprecated Context class

Change is based on a patch by mwehr.

Fixes #8380.

15712 by rjollos on 2016-08-18 09:57:45
2.0.0/3.0.0dev: Make babel optional
15711 by rjollos on 2016-08-18 09:17:03
3.0.0dev: Fix indentation, whitespace and file headers

Refs #8380.

(more)

Author/Contributors

Author: martin_s
Maintainer: Martin Scharrer
Contributors: hasienda (i18n, German l10n)

Last modified 4 days ago Last modified on Dec 4, 2016, 8:54:07 PM

Attachments (2)

Download all attachments as: .zip