This MOD leverages the Canned responses system to automatically populate the subject & issue field along with the already auto-Filled Response field on newly created staff tickets. This MOD adds a "subject" & "issue" text field to the Canned response Area so you can quickly Populate these fields for common issues!! ( autofill password resets anyone? )

I've added the Changes below if you would like to modify the files yourself, otherwise you can find the Altered Files in the Zip file Below. You can do a search for " //RJS " in the Modded Files to find out exactly what was changed.

Here are my changes:

MyPHPAdmin

ALTER TABLE `ost_canned_response` ADD `subject` TEXT NULL DEFAULT NULL

ALTER TABLE `ost_canned_response` ADD `issue` TEXT NULL DEFAULT NULL

include/class.canned.php

Below ',response='.db_input($vars).

',subject='.db_input($vars). //RJS

',issue='.db_input($vars). //RJS

and add...

function getSubject() {

return $this->ht;

} //RJS

function getIssue() {

return $this->ht;

} //RJS

include/staff/cannedresponse.inc.php - Line 73 ish - ADD

<br><br><div><b>Subject</b><span class="error">*&nbsp;<?php echo $errors; ?></span></div>

<input type="text" size="70" name="subject" value="<?php echo $info; ?>">

<br><br><div><b>Issue:</b> <font class="error">*&nbsp;<?php echo $errors; ?></font></div>

<textarea name="issue" cols="21" rows="12" style="width: 80%;"><?php echo $info; ?></textarea>

scp/js/scp.js - Line 190 - Add lines commented with //RJS

//Canned response.

if(canned.response) {

if($('#append',fObj).is('') && $('#response',fObj).val())

$('#response',fObj).val($('#response',fObj).val()+"\n\n"+canned.response+"\n");

else

$('#response',fObj).val(canned.response);

$('#subject',fObj).val(canned.subject); // RJS

$('#issue',fObj).val(canned.issue); //RJS

Include/staff/Ticket-open.inc.php - Line 216 / 219 ish

Add to existing Text Fields for Subject & issue

id="issue"

id="subject"

I've attached all the modded files from a fresh 1.7 install as well as a few screenshots. Please Comment below if you Found this MOD Helpful or Need help troubleshooting the install.

~Cheers

---------------------------------------------------------------------------------------------------------------------

Check out My (1.7 Setup & MODS Guide)

Autofill_from_Canned.jpg

ADD_New_resposne.jpg

[Canned Response Autofill (2).zip](https://forum.osticket.com/assets/files/migrated/d/dddd76b2407a479f47c603ed44f82b6.zip)

Write a Reply...