ACCORD5
Add a reply

ACCORD5 Company Forums » Trellis Desk » Peer-to-Peer Support

Core Hack: Email replies go to assigned person

 
  • Started 1 year ago by Prototype
  • 2 posts in this topic
  • Latest reply from brandon
  1. User has not uploaded an avatar

    Prototype

    offline
    Member

    So it's irritated me for a while that when you assigned a ticket that 1) The person didn't get an email letting them know and 2) Subsequent replies to the ticket were not emailed to the person that was assigned to the ticket. Assigning someone to a ticket was basically pointless. After paying my $10 to get support on the topic I was told that it would be in Version 2 --- and let dangling at that point. So I fixed it myself and want to share with everyone else that may have suffered my same frustration.

    If you need the fix to get emails sent when the ticket is assigned, check out this thread (thanks to abeltran):

    http://forums.accord5.com/topic/email-to-assigned-staff-member

    Once you've done that, do this to get the email replies going to the person assigned to the ticket:

    Open the file sources\tickets.php and modify this line of code (around line 1545):

    $this->ifthd->send_email( $sm['id'], 'staff_reply_ticket', $replace, array( 'from_email' => $this->ifthd->core->cache['depart'][ $t['did'] ]['incoming_email'] ), 1 );

    ## CHANGE THE LINE TO THIS ##

    $this->ifthd->send_email( $t['amid'], 'staff_reply_ticket', $replace, array( 'from_email' => $this->ifthd->core->cache['depart'][ $t['did'] ]['incoming_email'] ), 1 );

    So you will be switching $sm['id'] to $t['amid']. That will make all future ticket replies go to the person who is assigned to the ticket.

    Enjoy!

    Posted 1 year ago #
  2. User has not uploaded an avatar

    brandon

    offline
    Member

    This mod is great! thanks!

    I was expecting this mod to send an email whenever someone assigned the ticket to a new person. This doesn't happen because the sources/tickets.php code isn't executed when a ticket is assigned to a new person using the ACP. You have to put the above code into the Admin/manage/ad_tickets.php file under the assign_ticket function. I put the code after:

    #=============================
    # Update Ticket
    #=============================

    $this->ifthd->core->db->construct( array(
    'update' => 'tickets',
    'set' => array( 'amid' => $assign_mid, 'amname' => $assign_mname ),
    'where' => array( 'id', '=', $t['id'] ),
    ) );

    $this->ifthd->core->db->execute();

    Posted 8 months ago #

RSS feed for this topic

Reply to this topic

You must log in to post.