[Tickets #12406] No notification message for newly created tickets

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Jun 24 20:16:55 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12406
------------------------------------------------------------------------------
  Ticket             | 12406
  Created By         | heinz at htl-steyr.ac.at
  Summary            | No notification message for newly created tickets
  Queue              | Whups
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


heinz at htl-steyr.ac.at (2013-06-24 20:16) wrote:

For new tickets a message to all queue users should be sent
Code in whups/lib/Ticket.php, function notify():

if (empty($listeners)) {
             if ($conf['mail']['incl_resp'] ||
                 !count(current($whups_driver->getOwners($this->_id)))) {
                 /* Include all responsible.  */
                 $listeners = $whups_driver->getListeners(
                     $this->_id, true, true, true);
                     ....

Problem:
$whups_driver->getOwners($this->_id) returns an empty array for new  
ticket (that's OK)
current (..) returns false on empty arrays
count (..) returns 1 (because false as argument) and therefore 1 owner  
is assumed and no notification is sent!

The current()-call should be omitted!

Same construct in function Whups_Ticket::delete







More information about the bugs mailing list