PDA

View Full Version : make "close ticket" box default status configurable


sblaisot
01-24-2008, 08:32 AM
The following patch adds a configuration item to manage if the "close ticket" box should selected by default or not in the reply form (adding a message to a ticket).

The developper choose to make it checked by default. My need is to have it unchecked by default to avoid closing a ticket by mistake, so there is clearly 2 point of view and this should definitively be configurable.

attached is the proposed patch against 1.6RC2

WARNING : adding a config option modify the database schema. the default schema has been updated for new installation. On an existing installation, you have to upgrade your database schema using the following mysql command before applying the patch :

ALTER TABLE `ost_config` ADD `close_box_checked` TINYINT UNSIGNED NOT NULL DEFAULT '1';

wcwoodson
01-24-2008, 12:14 PM
I had a similar end in mind. However, I'm a butcherer of code, not a creator. My solution may appeal to those looking for a quick (definitely less intelligent fix).

In viewticket.inc.php at approximately line 300 change:

<input type="checkbox" name="ticket_status" value="Close" <?=$checked?> > Close on Reply

to:

<input type="checkbox" name="ticket_status" value="Close" > Close on Reply

peter
01-24-2008, 12:23 PM
The upcoming release will have the status unchecked by default. I don't think it should be configurable at all at the system level. May be as a staff preference. In my opinion, it comes down to personal habit.

The issue was already discussed here http://www.osticket.com/forums/showthread.php?t=64

sblaisot
01-24-2008, 12:49 PM
aggree with personnal habits.

I will post a patch moving the system-wide configuration option to user level.