Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Add Check Box to Toggle Sending of Email during Reply

Sometimes I want to add a progress note that the customer should see in the end, but is not something that needs to be emailed.

"SPAMMY"

I would like to be able to uncheck a box to allow the "reply" to be added to the web page but not emailed.

ALSO:...
It would be important to make sure that IF the email is not sent, the ticket is not flagged as "Answered".

Comments

  • Don't have the time right now to do this, however, I'd welcome this mod, too. Shouldn't be too hard, might even exist already?
  • Internal Notes.

    This is a duplicate thread, here's my response to the other:
    Internal Notes do this. The customer can see them if logged in, but "Reply" sends a reply to the customer.
  • michael.therrien;12636 said:
    Internal Notes do this. The customer can see them if logged in
    I don't think so. Not with my 1.6 RC5. Is there a setting that I do not know of? Or did you change your installation(s)?
  • No, that is not correct. Internal notes CANNOT be seen by clients - only staff.
  • Payment Offer
    xrat;12622 said:
    Don't have the time right now to do this, however, I'd welcome this mod, too. Shouldn't be too hard, might even exist already?
    Would it help if I offered payment for your time ?
    :)

    If so, please quote.
    Please also show examples of previous Mods or ther work.

    Regards
    Gav
  • I don't think it would be too hard to make changes such that staff are presented with an option "Email Client" like exists when a staff member creates a ticket from within the staff panel. It would then be up to staff to tick the box when they submit a response for which the client needs to get an email, and untick it when they create a response for which an email should not be sent.

    Do you have any experience making these changes yourself?
  • Progress
    PRedmond;12806 said:
    ... Do you have any experience making these changes yourself?
    Thanks PRedmond,

    No I don't have enough experience.

    I am able to read but not write !!!

    I provide solutions to the end customer and would rather pay someone to make these mods so I can focus on what I do best.

    Just so you know, xrat is having a look at this job at the moment for me.

    I'll keep you posted on progress through this thread.
  • It's on the way.
    gavbond;12829 said:
    Thanks PRedmond,

    ...shortened...

    Just so you know, xrat is having a look at this job at the moment for me.

    I'll keep you posted on progress through this thread.

    xrat will be posting this mod soon.
  • [MOD] Comment feature: Toggle sending mail for replies (based on osTicket 1.6 RC5)

    Here is the requested mod/add-on. Actually, the code as in osTicket 1.6 RC5 makes this very easy (once one knows how to do it) :p

    1. Add HTML code checkbox to toggle sending mail

    In file include/staff/viewticket.inc.php search for
    [HTML][/HTML] (should be around line 329). Before this line insert the following lines
    [HTML]    [/HTML]
    Of course, text ("Just comment (no mail)") and formatting are a matter of taste. The rest is crucial, though.

    2. Code in scp/tickets.php to handle the HTML checkbox

    In file scp/tickets.php we evaluate the HTML checkbox and pass on the parameter. Look for the text (should be around line 83)
    //If no error...do the do.


    Before this text insert the following
    // isComment hack by xrat
    if(isset($_POST['myiscomment']) && ($_POST['myiscomment'] == 1)) {
    $isComment = TRUE; $mycanalert = false;
    } else {
    $isComment = FALSE; $mycanalert = true;
    }


    2 lines below osTicket calls postReponse() where we need to add our 2 variables. Change line
    if(!$errors && ($respId=$ticket->postResponse($_POST['msg_id'],$_POST['response'],$_POST['signature'],$_FILES['attachment']))){

    to
    if(!$errors && ($respId=$ticket->postResponse($_POST['msg_id'],$_POST['response'],$_POST['signature'],$_FILES['attachment'],$mycanalert,$isComment))){


    Eventually, 9 lines further below just before the
    } else {
    we need to insert these 2 lines
    // Mark unanswered if it was just a comment -- isComment hack by xrat
    if($isComment) $ticket->markUnAnswered();


    3. Code to mark replies as comments

    Finally, in file include/class.ticket.php go to (around line 685)
    //Insert Staff Reply
    function postResponse($msgid,$response,$signature='none',$attachment=false,$canalert=true){
    global $thisuser,$cfg;

    if(!$thisuser || !$thisuser->getId() || !$thisuser->isStaff()) //just incase
    return 0;

    and change this to (2 changes!)
    //Insert Staff Reply
    function postResponse($msgid,$response,$signature='none',$attachment=false,$canalert=true,$isComment=FALSE){
    global $thisuser,$cfg;

    if(!$thisuser || !$thisuser->getId() || !$thisuser->isStaff()) //just incase
    return 0;

    // isComment hack by xrat
    if($isComment) $response = \"[Comment (no mail was sent)]\n\n$response\";


    Again, here the text "[Comment ...]" can be changed as required. That's it.

    Background story (for the technically inclined)

    What makes this mod rather simple is the fact that function postResponse() evaluates a 5th parameter: It's internally named $canalert and toggles sending alert mails. Thus, the above presented mod could even be reduced to less: The introduced 6th parameter $isComment is not essential.

    Thanks

    This mod was requested, supported and pressed ahead by gavbond. Say thanks to him. xrat only did the coding and barking. Also all mistakes are his.

    Disclaimer

    Comes without warranty. Use at your own risk. Might put cats on fire.
  • 2 more notes about the above mod

    While one is editing include/staff/viewticket.inc.php one might want to also fix a small but related bug about the use of
  • Wow, xrat. 3 years later I log back on and see that you came through with the goods.
    Sorry! I was somewhat sidetracked!
    Are you still out there?
    gav
  • I believe that what you are describing in the initial post is what "internal notes" are for.
Sign In or Register to comment.