[whups] change to Driver.php

Bo Daley bo at tilda.com.au
Thu Mar 20 15:10:42 PST 2003

Hi there,

I ran into a situation in which I wanted to be able to have email bug
notifications sent only to the owner and the requester. The current options only
allow 'all' (ie. all users responsible for the module), 'owner' or 'requester'.

The following patch adds a new configuration option for email notifications:
'owner,requester'. Actually this option could be better off as an array. If so I
can make the change and resubmit the patch. (either way there should also be a
change to the comments in conf.php to reflect the new option.)

The patch also adds some extra formatting to the email notification to break up
long lists of comments and make them a bit more readable.


Index: Driver.php
RCS file: /repository/whups/lib/Driver.php,v
retrieving revision 1.40
diff -u -r1.40 Driver.php
--- Driver.php  4 Feb 2003 21:33:09 -0000       1.40
+++ Driver.php  20 Mar 2003 04:08:12 -0000
@@ -188,6 +188,10 @@
             $this->_mail($ticket_id, $this->getListeners($ticket_id, true,
false, false),
                          $subject, $message, $from);
+        case 'owner,requester':
+            $this->_mail($ticket_id, $this->getListeners($ticket_id, true,
true, false), 
+                        $subject, $message, $from);
+            break;
@@ -200,6 +204,7 @@
             $text .= "\n" . $this->_splitMessage($comment['comment_text']) . "\n";
+            $text .= "\n--------------------\n";
         return $text;

More information about the whups mailing list