RE: E-Mail Notification on Ticket Chagnes
Mike Bydalek <[email protected]>
| Newsgroups | gmane.comp.horde.whups |
|---|---|
| Message-ID | <[email protected]> |
> Quoting Mike Bydalek <[email protected]>: > > > I noticed that the notify*() functions seemed to all combine into > > notifyTicket(). Is there no more reason to send state > change, comment > > update, etc. notifications to either both the client and/or "tech"? > > http://bugs.horde.org/details.php?id=46 > > Not done yet. This makes sense...but by deleting the notify*() methods and leaving just the notifyTicket() one, are you going to use this to to differentiate between New Ticket, New Comment, New Attachment, etc.? I'm just curious as to which way you are thinking of going. > > > Then again, I can still see some risidual affects of the > code change > > that I've had to clean up (one big one being the comments being put > > into the new ticket e-mail). Let me know what your thoughts are on > > this so I can go all out for patch submission, or just need > to hack it > > up enough for internal usage. > > Not really sure what you think are "residual effects". Try to > be a bit more specific and a bit less "are you really being dumb?" Oof - I'd think you'd give me a little more credit than that. Based on the answer for the first part dictated the answer for the 2nd because I know that you weren't quite done yet. So what's the point of pointing out what's broke if you know it already is (as seen in the bugs link)? But since you requested a specific, one is in either _formatComments (Driver.php) or permissionsFilter (Whups.php) - depending on how you think it should be addressed. Basically _formatComments tried to call $comments['comment_text'] when it's not even set by the permissionsFilter. So, for now, I just added a couple lines in the permissionsFilter to create this key. And, to avoid the ever-so-famous "patch?" - I attached what I did. I thought the permissionsFilter was more appropriate since in order to accomplish this in the formatComments, it basically required the same code. -Mike -- Whups mailing list - Join the hunt: http://horde.org/bounties/#whups Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]
Whups.php.patch
(application/octet-stream, 1.1 KB)
*** Whups.php.orig Fri Jul 16 15:30:04 2004
--- Whups.php Tue Jul 20 11:13:23 2004
***************
*** 226,234 ****
--- 226,240 ----
if ($change['type'] != 'comment' ||
!$perms->exists('whups:comments:' . $change['value'])) {
$out[$key][$rkey][$i] = $change;
+ if (isset($change['comment'])) {
+ $out[$key]['comment_text'] = $change['comment'];
+ }
} elseif ($admin || $perms->hasPermission('whups:comments:' . $change['value'], $userId, PERMS_READ)) {
$change['private'] = true;
$out[$key][$rkey][$i] = $change;
+ if (isset($change['comment'])) {
+ $out[$key]['comment_text'] = $change['comment'];
+ }
}
}
} else {