We're using the support module and project module on the same site. I noticed that the support module was sending out emails when people posted comments to project nodes. It also emails when comments are posted to other types. The best solution appears to be to stop support_comment() from acting on nodes that are of type support_ticket.

Patch attached. It's from today's HEAD.

CommentFileSizeAuthor
support-hook_comment_only_for_tickets.patch832 bytesslip

Comments

jeremy’s picture

Status: Active » Fixed

I'm surprised this hasn't been reported before! A rather obvious bug! My fix is a little different then yours in that I go ahead and load the node to determine the content type -- we reuse it later at times. If node_load is a performance hit for you, there are patches out there to cache them...

Fix committed:
http://drupal.org/cvs?commit=294210

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.