evcz Posted August 7, 2019 Share Posted August 7, 2019 Hi I'm looking for some ideas to alter ticket subject during submission (want to append custom data to it based on IP that is submitting the ticket, only for a specific department) is there a hook I can use that can "filter" the ticket before submitting it into the DB? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 7, 2019 Share Posted August 7, 2019 Just now, evcz said: is there a hook I can use that can "filter" the ticket before submitting it into the DB? TicketOpen would run when a client creates a ticket; TicketOpenAdmin would run if an admin opens the tickets - either could be used to get the current ticket subject and department id or name; if applicable dept, append subject with your additional info and then save it back to the database. 0 Quote Link to comment Share on other sites More sharing options...
evcz Posted August 7, 2019 Author Share Posted August 7, 2019 Ok, thank you. So I need to intercept, alter and save updated. cannot alter on the fly before saving (and before notifications are sent) Will give it a try, thank you Brian 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 7, 2019 Share Posted August 7, 2019 7 minutes ago, evcz said: cannot alter on the fly before saving (and before notifications are sent) you could try EmailPreSend as that would run before any templated emails (e.g the Ticket Created email template) are sent. 0 Quote Link to comment Share on other sites More sharing options...
evcz Posted August 8, 2019 Author Share Posted August 8, 2019 for now hooked to `TicketOpen` and worked great. updating subject and also adding a note with additional infos from other systems. 0 Quote Link to comment Share on other sites More sharing options...
evcz Posted August 8, 2019 Author Share Posted August 8, 2019 actually there's something (WHMCS api bug?) if the ticket submitted has an attachment when doing AddTicketNote the same attachment is also attached as a note (despite not populating that value when doing the local API call) 0 Quote Link to comment Share on other sites More sharing options...
andp97 Posted September 19, 2019 Share Posted September 19, 2019 On 8/8/2019 at 8:32 PM, evcz said: actually there's something (WHMCS api bug?) if the ticket submitted has an attachment when doing AddTicketNote the same attachment is also attached as a note (despite not populating that value when doing the local API call) I found the same error! 0 Quote Link to comment Share on other sites More sharing options...
evcz Posted September 23, 2019 Author Share Posted September 23, 2019 On 9/19/2019 at 11:30 AM, andp97 said: I found the same error! it is a confirmed bug still not fixed in the latest version available. once you will see CORE-13584 mentioned in the changelog it means it has been fixed 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 23, 2019 Share Posted September 23, 2019 (edited) 8 hours ago, evcz said: once you will see CORE-13584 mentioned in the changelog it means it has been fixed or possibly more accurately, WHMCS believe it to be fixed. 😛 it's in the v7.8.3 changelog. Quote CORE-13584 - Prevent duplicate attachments when invoking AddTicketNote during TicketOpen hook Edited September 23, 2019 by brian! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.