6.0.0-alpha14
7/3/25

[#12406] No notification message for newly created tickets
Summary No notification message for newly created tickets
Queue Whups
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester heinz (at) htl-steyr (dot) ac (dot) at
Created 06/24/2013 (4392 days ago)
Due
Updated 07/15/2013 (4371 days ago)
Assigned 07/02/2013 (4384 days ago)
Resolved 07/15/2013 (4371 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/15/2013 07:18:05 PM Jan Schneider State ⇒ Resolved
 
07/15/2013 07:17:57 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit aeb89e9d03e021ffbc9da1d972fb7fa5d5d9fe0c
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jul 15 21:16:30 2013 +0200

     [jan] Fix counting of responsible users (Bug #12406).

  whups/docs/CHANGES                  |    1 +
  whups/lib/Ticket.php                |   10 +++++++---
  whups/lib/Whups.php                 |    9 ++++-----
  whups/package.xml                   |    2 ++
  whups/templates/ticket/watchers.inc |    6 +++---
  5 files changed, 17 insertions(+), 11 deletions(-)

http://git.horde.org/horde-git/-/commit/aeb89e9d03e021ffbc9da1d972fb7fa5d5d9fe0c
07/02/2013 10:35:10 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
06/24/2013 08:16:55 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ Whups
Summary ⇒ No notification message for newly created tickets
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
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


Saved Queries