This enhancement is divided in three parts:
These changes are tested with the unit tests. The unit tests did gave errors, before these modifications are made. These modifications did not change these errors. The output of
svn diff > ATP_RichardVinke.diff
are attached to this topic:
ATP_RichardVinke.diff.
More control over actionnotify ouput format
Now it is possible to use
actionnotify "header=\"| Assigned to | Due Date ||\"" format=\"'| $who | $due | $edit |'\"
. The table in the mail is now controlled by the
header
and
format
attribute.
Changes are made in:
~twiki/lib/TWiki/Plugins/ActionTrackerPlugin/ActionNotify.pm
: Original Line 67:73
my $hdr =
TWiki::Func::getPreferencesValue( 'ACTIONTRACKERPLUGIN_TABLEHEADER' )
|| '| Assigned to | Due date | Description | State | Notify ||';
my $bdy =
TWiki::Func::getPreferencesValue( 'ACTIONTRACKERPLUGIN_TABLEFORMAT' )
|| '| $who | $due | $text | $state | $notify | $edit |';
Changed to
my $hdr = $attrs->{header} # if the header attribute exists: take this.
|| TWiki::Func::getPreferencesValue( 'ACTIONTRACKERPLUGIN_TABLEHEADER' )
|| '| Assigned to | Due date | Description | State | Notify ||';
delete $attrs->{header}; # Delete this attribute, because it mashes up the ActionSearch.
my $bdy = $attrs->{format} # if the format attribute exists: take this.
|| TWiki::Func::getPreferencesValue( 'ACTIONTRACKERPLUGIN_TABLEFORMAT' )
|| '| $who | $due | $text | $state | $notify | $edit |';
delete $attrs->{format}; # Delete this attribute, because it mashes up the ActionSearch.
Combine within and late in one mail
Calling the actionnotify script with
within="7"
all actions which are due
before (now + 7 days) are mailed to the owner of the action. So also actions wich are late are mailed.
Changes are made in:
~twiki/lib/Plugins/ActionTrackerPlugin/Action.pm
Original lines 505:509:
if ($val > 0) {
return ($slack <= 0) if ($secs > 0);
} else {
return ($slack >= 0) if ($secs < 0);
}}
to
if ($val > 0) {
return ($slack <= 0);
}
Graphical nicer mailing
The mail send by the actionnotify script is not nice. By adding a link to the css file and modifying this css file the table of actions looks the same as in your internet client.
Changes are made in:
-
~twiki/templates/actionnotify.tmpl
- Just after the
<html>
insert <link rel="stylesheet" href="%ACTIONTRACKERPLUGIN_CSS%" type="text/css" />
.
-
~twiki/pub/TWiki/ActionTrackerPlugin/styles.css
.
- Line 2 change
.atpDef {
in .atpDef, .atpChanges {
.
- Line 7 change
.atpDef th {
in .atpDef th,.atpChanges th {
.
--
TWiki:Main/RichardVinke - 17 May 2007
I accepted all the changes except the middle one; it's too much of a departure from the existing semantics. instead, I supported signed days, which allows you to specify -7, 7, or +7 for the last 7 days, 7 days either side of today, or the next 7 days.
--
TWiki:Main.CrawfordCurrie - 19 Jul 2007