<--
PLEASE DO NOT EDIT THIS TOPIC
It is automatically generated from the subversion repository, and any changes
you make will simply be overwritten the next time a release is generated.
Instead, you could check your fix in, raise a bug in the Bugs web, or mail thge author.
-->
It takes the skills of a juggler to keep track of all the demands that modern life makes on us. Wouldn't it be great if we could capture what we have to do at the time we think of it, and be able to get a to-do list on demand? No more fighting with post-it notes, no more forgetting actions from the minutes of obscure meetings, and remember your partners birthday every year into the bargain!
This plugin provides support for tracking actions embedded in TWiki topics. Actions captured this way can then be tracked from anywhere you want.
This is particularly useful for meeting minutes. As you write the minutes during the meeting, you simply enter the actions into the text and as soon as the topic is saved, the actions "go live". For example, at a recent meeting of the British Cabinet:
GordonBrown agreed to a zero tax rate for all self-employed software engineers, to make up for past unfair treatment.
%ACTION{who="GordonBrown" due="1st April 2008"}% Repay all unfairly levied taxes
%ACTION{who="AlistairDarling" due="25th Dec 2007"}% Contact Santa to find out who is going to pay for it
AlistairDarling observed that this might adversely impact the government hors d'ouvres budget.
But that's not the only application. The action tracker can also be used for:
personal to-do lists
highlighting things for attention
reminding you of important events
Actions are nicely formatted for display, and automatic notification of actions is supported using 'cron'.
WARNING: TWiki-4 only. If you want to use this plugin with an earlier version of TWiki, please use revision 22 of the zip.
Actions can be assigned to individuals, or to predefined groups.
Fully configurable.
Syntax Rules
Actions
Write the command %ACTION{attributes}% anywhere in a TWiki topic. All the text following the final % up to the next end-of-line is taken as the action description. Standard attributes are
%ACTION{ who="TWikiGuest" due="2 Jan 2004" state="open" notify="AttillaTheHun" }% An action for TWikiGuest
If the action description doesn't all fit on one line you can use shell-style here-document syntax to grab the next few lines. For example,
%ACTION{ who="LittleOysters" due="2 Jan 1884" state="open" }% <<EOF
The time has come, the walrus said,
To speak of many things.
Of shoes, and ships, and sealing wax,
Of cabbages and kings.
EOF
The delimiter must be a sequence of alphanumeric characters, and the closing delimiter must be on a line of its own.
The fields with an entry in the 'Auto-completed' column are automatically filled in, if they are missing, whenever someone saves the topic containing the action. The default values are as indicated in the table. You can override this behaviour by providing values for any of these attributes when you type the action. Note: you must not provide a value for the uid (see UIDs) field!
Note that the due field is not auto-completed. If you don't specify a due date for an action, the action is treated as due on a 'to be decided' (TBD) date. TBD actions are always shown in action searches, to help encourage you to timeframe them.
Action searches
Write the command %ACTIONSEARCH{attributes}% anywhere in a TWiki topic. Standard attributes are
Set to late to search for late actions; set to any any legal state value to search for actions in that state. See Settings for details on how to extend the state set. You can also use a Perl regular expression, which must match the entire state name e.g. state="open|closed" will match either open or closed states, but no other states, and state="(?!closed).*" will match every state except closed. Google for perlre for help with Perl regular expressions.
within
a number of days
Search for actions that are within a number of days of their due date. Usually used in conjunction with other attributes, such as state="open". If you give it a simple number N, it will match actions that are due within N days either side of the current date. If you give N with a leading '+', this restricts the search to N days in the future. If you give N with a leading '-', it matches only actions that fell due in the last N days.
web
Perl regular expression
A regular expression that matches the names of all the webs to search. If this attribute is omitted, the default is to search only the current web. Searching many webs is much slower, especially in a large installation. Webs marked NOSEARCHALL will not be searched.
topic
Perl regular expression
A regular expression that matches the names of all the topics to search. If this attribute is omitted, the default is to search all the topics in the selected webs.
due
Absolute or relative date expression. See Date Formats
Fields to sort the matched actions by. For example, sort="$who,$due" will sort by who first and then due. This field is optional; by default the table will be sorted by due date.
For example,
%ACTIONSEARCH{ who="me" state="late" }%
%ACTIONSEARCH{ who="me" open late }%
%ACTIONSEARCH{ who="TWikiGuest" state="open" within="7" }%
%ACTIONSEARCH{ web=".*" who="Genghis.Khan@mongol.empire.org" state="open" within="7" }%
When you are searching for fields containing dates (such as closed, created and due) you can prepend one of the conditions >, <, >= and <= to the date. For example, closed=">1-Jan-1999" will match all actions that have been closed at any time since 1-Jan-1999, and created=">= 1-Jan-2000" will match all actions created this century. You can also specify dates relative to the current date and time. See Date Formats for details of how to specify relative dates.
For example,
%ACTIONSEARCH{ state="closed" closed="> 7 days ago"}%
will search for all actions closed in the last 7 days.
Date formats
Absolute date formats
Absolute dates are required in action specifications. Date formats must be as recognised by Time::ParseDate.
The following absolute date formats are recognised. Dates containing spaces must be enclosed in double-quotes.
Dow, dd Month yy
Dow, dd Month yyyy
Dow, dd Month
dd Month yy
dd Month yyyy
Month day{st,nd,rd,th}, year
Month dd yyyy
yyyy/mm/dd
yyyy/mm
mm/dd/yy
mm/dd/yyyy
mm/yy
yy/mm (only if year > 12)
yy/mm/dd (only if year > 12 and day < 32)
You are strongly recommended never to use the 'mm/dd/yyyy or mm/dd/yyyy' formats, to avoid confusing users in Europe (like me). Note that due to limitations in the Time::Parsedate module, dates before 1970 will not work as expected.
Relative date formats
When you are searching for fields containing dates (such as closed, created and due) you can specify dates relative to the current date and time. For example:
Valid units are minutes, hours, days, weeks, years.
People
People are identified to the action tracker using a wikiname (e.g. Main.WilliamWallace or simply WilliamWallace) or an e-mail address (e.g. a_einstein@pto.co.ch). The e-mail address is useful if you want to notify people who aren't registered in the wiki, but bear in mind that if they are outside your firewall, they'll get action notifications but the chances are they won't be able to edit pages and close actions. Very annoying!
E-mail addresses of people are found by the process described below.
You can also use the shorthand me for the currently logged-in user (this is TWikiGuest unless you have been prompted for a username and password). In actions, this will automatically be expanded when the topic is saved, and in searches it will match the currently logged in user.
Groups
You can assign an action to a group defined using a TWiki group topic (see TWikiDocumentation). Alternatively you can give a list of people as the value of the attribute. For example,
Note in general you should not use these mechanisms for assigning actions, because the actions so created are not specific. Actions should be assigned to one person only, so that it's clear who is responsible for them.
UIDs
For administrators only:
Each action is assigned a Unique Identifier (UID) when it is created. This UID is a six-digit number, and is generated when the action is first saved by incrementing a number in a special file (pub/_work_areas/ActionTrackerPlugin/UIDRegister under the TWiki installation). If this file is accidentally deleted, or is not writable, then you will have problems and you may get duplicate UIDs. Normally this won't matter a hoot, as UIDs only have to be unique within a single topic, but if the file is persistantly inaccessible it could be a bit of a nuisance.
Notification
ActionTrackerPlugin comes with a notifier script, like the mailnotify script used for WebNotify (see MonitoringSiteActivity? for more information on setting up mailnotify). This script allows you to:
examine all the actions in all webs (except those specified NOSEARCHALL) and notify owners of the state of actions,
find actions that have changed state, and notify people who have registered an interest in that action.
The frequency with which actions are notified depends on how you set up your cron (or equivalent) jobs on the server.
The actionnotify script interprets its parameters as a search expression of the same type as that used in %ACTIONSEARCH%. All actions which match that expression will be notified to their owners.
For example:
actionnotify "header=\"| Assigned to | Due ||\"" format=\"'| $who | $due | $edit |'\" state="open"
Note that the actionnotify script must be run from the bin directory. This is so it can pick up the TWiki path configuration file, setlib.cfg.
For example, you could set up the cron jobs as follows:
(If you don't know cron, the first 5 fields are minute, hour, day of month, month and day of week. * means 'every'). This crontab will notify actions according to the schedule:
Actions that are late will be notified every hour, on the hour
Actions that are still open within three days of their due date will be notified twice a day, at 8am and 4pm
Actions that are still open within seven days of their due date will be notified once a day, at midnight.
Actions that are still open within thirty days of their due date will be notified once a week, at midnight on monday.
A rather aggressive schedule!
Note: At Wind River they notify folks three times a week on Mon, Wed and Fri for open action items due within 8 days.
Crontab entry for geeks:
You can configure the fields which are scanned to detect state changes; see Settings.
Translating names to e-mail addresses
The wikiname of the user to be notified is translated to a mail address according to the following rules:
If the user has a personal page, and that personal page contains a line or lines matching spaces * Email: email address or spaces * E-mail: email address Alternatively if the topic is a group definition (the name ends in 'Group') then the line spaces * Set GROUP = is used to determine the wikinames of the people in the group. These are resolved to email addresses recursively. If that fails,
If they appear in anyWebNotify in any web, in the form of a line that gives an email address, then that address is used.
If this fails and the 'who' name is a valid e-mail address, for example person@domain.co.uk, then that name is used.
Note: If a name cannot be translated to an e-mail address using the mechanisms described above, a warning will be output to data/warning.txt..
The actionnotify script is also used to notify users who have registered an interest in being notified when an action changes. This function of the script is activated when you use the changedsince parameter. changedsince is used to specify the time period within which changed actions are interesting. Any action which has changed in the given period will be notified to all users who have registered an interest in that action using notify. The changedsince value is a relative date string, which uses the following formats
yesterday
lastdow
last week
now - countunits
-countunits
countunitsago
where units may be minutes, days, hours, weeks, months or even years. count is just an integer. dow is the name of a day of the week. For example:
Obviously you have to be careful to synchronise your changedsince expression with the activation of your cron job. The ideal is to specify the same delta as the gap between cron activations. For example,
will notify registered users of action changes that occurred in the last 24 hours. Note the use of single quotes to prevent expansion in the shell.
Notes:
Not all action changes get notified, only changes to certain sensitive fields. You can change the set of fields that are sensitive to changes by setting the NOTIFYCHANGES parameter, as described in Settings, below.
Unlike all other search terms, changedsince works as an OR term rather than an AND term. If you use a compound expression like late,changedsince=yesterday, this will not give you all late actions that changed since yesterday. Instead, it will give you all late actions and all actions that changed since yesterday.
If you give the parameter DEBUG to the actionnotify script, it will print out the mails that would have been sent to STDOUT. This is useful for debugging, and may be useful if you have some other processing in mind (such as piping to an alternative mail program).
changedsince requires RCS, and will not work with RcsLite.
Customisation
Formatting search tables
The header, footer, =format, separator and orient parameters of %ACTIONSEARCH{}% support formatting of the action table using a similar syntax to that described in FormattedSearch. For example:
The header and format parameters can also be used with the actionnotify script.
A default format for actions and action search results can be defined in this topic or the WebPreferences topic of the current web. See Settings for more details.
Non-standard Attributes
As well as the standard attributes you can add non-standard attributes to actions, and use them in searches. For example:
%ACTION{ who="EmperorHadrian" due="1 Jan 0053" state="closed" legion="7th" cohort="6th" maniple="3rd" }% Build a wall to keep the Scots out of England
Non-standard attributes must be lower-case words. The following names may not be used for non-standard attributes:
closed, closer, created, creator, dollar, due, edit, format, header, late, n, nop, notify, percnt, quot, sort, state, text, topic, uid, web, who, within.
To define non-standard attributes you need to set the value of EXTRAS in this topic (or to the WebPreferences topic of each web) - see Settings below. All attributes must be given a type, which is used by the formatter, the search engine and the action editor. For example,
* Set EXTRAS = |plaintiffs,names,16|decision,text,16|sentencing,date|sentence,select,"life","5 years","community service"|
Can take one of the string values option1, option2,.... etc.
names
names, size
One or more wikinames or e-mail addresses.
text
text, size
An arbitrary text field
date
date, size
A date in one of the formats described above. See Date Formats
In the above, size is a single number, which is the width (in characters) of the text box in the action editor for text, names and date, and the number of options to show in select..
Note that there is one exception to the "no redefinition" rule above; the state attribute can be extended to take extra states. However if you want the closure functionality (closed, closer, and late actions) to work, the closed state must be retained. To extend the set of states, simply include a definition of state in the EXTRAS definition:
* Set EXTRAS = |state,select,1,"open","fried","boiled","poached","closed"|
Searching for non-standard attributes
You can of course search for values of non-standard attributes. For example:
%ACTIONSEARCH{ sentence="life" }%
If a non-standard attribute is declared as type text you can use perl regular expressions in the search. Searches for values of type names will match any-to-any. For example,
Set SHORTDESCRIPTION = Adds support for action tags in topics, and automatic notification of action statuses
-->
You can override the defaults for these values in Main.TWikiPreferences, the WebPreferences topic of the current web, or in individual topics. Use the standard TWiki 'Set' syntax e.g:
* Set ACTIONTRACKERPLUGIN_EDITORIENT = rows
Formatting how actions are displayed
The format of an action output. The following fields can be output: web, topic, text, who, due, notify, uid, creator, state, edit, and any ACTIOPNTRACKERPLUGIN_EXTRAS you may have. These settings can be overridden in an ACTIONSEARCH command using the format and header attributes. TABLEHEADER defines the column headings, TABLEFORMAT defines the contents of the columns, and if TABLEORIENT is set to rows, action tables will be aligned as rows of values instead of the default columns of values.
ACTIONTRACKERPLUGIN_TABLEHEADER | Assigned to | Due date | Description | State | Notify ||
The alternative text format of an action, as seen by a mail recipient who doesn't accept HTML in mail. Used when mailing action or change notifications.
ACTIONTRACKERPLUGIN_TEXTFORMAT Action for $who, due $due, $state$n$text$n
Full URL of the CSS to use in formatting actions. This file is also called from the mail generated by the actionnotify script, so you have to use an absolute URL here, and the URL has to be visible to anyone who might receive an action notification.
If an action has no due date defined when it is created, then it is treated (for sorting etc) as if it was due at this time. This is a number of seconds since 1st Jan 1970, and should be 0 to sort actions that have no due date to the start of a list, or a very large number to sort them to the end.
ACTIONTRACKERPLUGIN_DEFAULTDUE 9999999999
Formatting actions for editing
The format of the fields in the action editor.
ACTIONTRACKERPLUGIN_EDITHEADER | Assigned to | Due date | State | Notify |
You can also override the default EDITBOXWIDTH and EDITBOXHEIGHT settings just for the action editor:
ACTIONTRACKERPLUGIN_EDITBOXWIDTH 70
ACTIONTRACKERPLUGIN_EDITBOXHEIGHT 22
If you prefer the action editor to use the same browser window to edit an action, or you don't have Javascript, set this to 0. If set to 1 will edit an action in a separate browser window.
ACTIONTRACKERPLUGIN_USENEWWINDOW 1
If you want the action editor to offer a 'Preview Changes' button, instead of the usual 'Save Changes', set this to 0. If this is set, and USENEWWINDOW is 1, the subwindow should close on save, but it won't because I haven't worked out how to do this safely in JavaScript.
ACTIONTRACKERPLUGIN_NOPREVIEW 1
The fields to scan to detect changes for actionnotify. Changes in other fields are ignored.
If set to 1, the action tracker will show action states using a drop-down menu, to allow viewers to quickly and easily change action states. You can disable this feature by setting this to 0.
ACTIONTRACKERPLUGIN_ENABLESTATESHORTCUT 1
Note that each state has an associated CSS class (e.g. atpStateopen) that is used to render the HTML 'select' element when ENABLESTATESHORTCUT is on. If you extend the range of states, you will need to add new CSS classes as well.
Debugging
Set to 1 to enable debug features, including the undocumented %ACTIONNOTIFICATIONS{}% and %ACTIONTRACKERPREFS% features.
ACTIONTRACKERPLUGIN_DEBUG 0
Plugin Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.
Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the BuildContrib.
If you have TWiki 4.1 or later, you can install from the configure interface (Go to Plugins->Find More Extensions)
The webserver user has to have permission to write to all areas of your installation for this to work.
If you have a permanent connection to the internet, you are recommended to use the automatic installer script
Just download the ActionTrackerPlugin_installer perl script and run it.
Notes:
The installer script will:
Automatically resolve dependencies,
Copy files into the right places in your local install (even if you have renamed data directories),
check in new versions of any installed files that have existing RCS histories files in your existing install (such as topics).
If the $TWIKI_PACKAGES environment variable is set to point to a directory, the installer will try to get archives from there. Otherwise it will try to download from twiki.org or cpan.org, as appropriate.
(Developers only: the script will look for twikiplugins/ActionTrackerPlugin/ActionTrackerPlugin.tgz before downloading from TWiki.org)
If you don't have a permanent connection, you can still use the automatic installer, by downloading all required TWiki archives to a local directory.
Point the environment variable $TWIKI_PACKAGES to this directory, and the installer script will look there first for required TWiki packages.
$TWIKI_PACKAGES is actually a path; you can list several directories separated by :
If you don't want to use the installer script, or have problems on your platform (e.g. you don't have Perl 5.8), then you can still install manually:
Download and unpack one of the .zip or .tgz archives to a temporary directory.
Manually copy the contents across to the relevant places in your TWiki installation.
Check in any installed files that have existing ,v files in your existing install (take care not to lock the files when you check in)
Manually edit LocalSite.cfg to set any configuration variables.
Run configure and enable the module, if it is a plugin.
Repeat from step 1 for any missing dependencies.
Note if you are installing this extension in TWiki version < 4.2, please add these definitions to your Main.WebPreferences, if they are not already there:
Set SYSTEMWEB = %TWIKIWEB%
Set USERSWEB = %MAINWEB%
If the plugin is installed and enabled correctly you should see a formatted action below:
Another great TWiki extension from the WikiRing - Working together to improve your wiki experience!
Thanks are due to the following sponsors, who have helped make this plugin possible:
Bugs:Item4427, Bugs:Item4591 add the ability to search for multiple states using a regular expression Bugs:Item4574 fix interaction with TinyMCEPlugin
31 Aug 2007
Bugs:Item4528 - Support $formfield in ACTIONSEARCH (same semantics as for formatted search) Bugs:Item4529 - Remove link from description of action in the $text field of format. Sponsored by Goldstar Events.
13 Aug 2007
Bugs:Item4086 - header and format parameters give more control over formatting, improved mail sent for notifications (Richard Vinke) Bugs:Item4373 - added support for TBD action dates; in the process, changed default date store format to ISO for consistency with TWiki. (Crawford Currie) Bugs:Item4374 - support AJAX-like state changes from the view screen (Crawford Currie) Bugs:Item4442 - moved preference defaults out of the plugin topic, and verified correct function (Crawford Currie, sponsored by Goldstar Events)
putting styles.css file at the top of the html header so that skins have a chance to override the defaults; fixed generation of css classes; added aptOpen and aptClose; render actions correctly in twiki lists (TWiki:Main/MichaelDaum)
12652
Fixes for Bugs:Item3446, Bugs:Item2127. Updates to tests and templates for recent core changes.
11556
QBE topic made much friendlier using TWiki-4 features; minor bugfixes
10919
Bugs:Item2606 actionnotify can now read email addresses from password manager as well as new TWiki4 style user topics. actionnotify requires TWiki-4.0.4 + hotfix-4.0.4-1
8385
Bugs:Item1443 style sheet bug makes yellow warning not show
8372
Bugs:Item1434 moved actionnotify from bin into tools
8304
Bugs:Item1305 removing dotted style from AT. Looks horrible in IE
8090
Bugs:Item1304 removed unnecessary warning that may be breaking some sites
8089
Bugs:Item1305 changed dotted to solid gray, as requested
26 Mar 2005
2.022 Corrected JSCalendar problems, and cleaned up lazy-loading of libraries. Added relative date specs to searches.
8 Feb 2005
2.021 Documentation fixes.
19 Nov 2004
2.020 Added conditions for date matching, and fixed config so that tests pass again.
13 Oct 2004
2.013 If a user cuts and pastes an action with a uid in it, the action editor would get confused. This update ensures all action UIDs are unique within a topic when it is saved.
16 Aug 2004
2.012 Dependency automation and Cairo readiness, further change to within behaviour (bidirectionality)
3 Feb 2004
Fixes for internationalisation, name matching, QBE, within= behaviour, documentation.
21 May 2003
Non-standard fields. Configurability of tables and action editor. Non-standard attributes. Eliminated chdir. Multi-line actions. Optimisation of notifies.
30 Apr 2003
Version 2.0; Large sections rewritten to take advantage of improvements in Plugin support, eliminating two scripts in bin. Added UIDs and formattable action searches
30 Jan 2003
Query-by-example action search with notify field; notification of change emails and actions email are sent as one; notify field was added to topic view and edit; various bug fixes by TWiki:Main/PaulineCheung
26 Sep 2002
Added changedsince notify support, added support for editing in a seperate window, incorporated attribute syntax corrections contributed by PeterThoeny? , sorted ACTIONSEARCH output and action notifications
14 Feb 2002
Sorted ACTIONSEARCH results by due date; Fixed bugs editaction kills form data, Actions flagged as late the day before, TWiki table and bullet formatting doesn't work within action text
11 Jan 2002
Added ACTIONSEARCH for selected webs and topics; Changed action editor to use a template; Eliminated UNIX dependencies; Fixed formatting of actions in bulleted lists
Optional, used if installed. Used to display a neat calendar popup when editing actions. Available from the TWiki:Plugins/JSCalendarContrib repository.
Further development of this code is welcomed. It is recommended that you unpack the distribution into a development directory and use the supplied build file which provides targets to run the test suite, and install and uninstall your development code into a test installation. Please, please, please run, and extend if necessary, the test set!
Developer discussion is in TWiki:Plugins/ActionTrackerPluginDev.
Copyright
This code is an original development of Motorola Inc. and is protected by the following copyrights:
As required for the publication of all extensions to TWiki, this
software is published under the terms of the GNU General Public
License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details, published at
http://www.gnu.org/copyleft/gpl.html
META FILEATTACHMENT
attr="" comment="Stylesheet for actions" name="styles.css"
This site is powered by the TWiki collaboration platform. All material on this collaboration platform is the property of the contributing authors. All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.