diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 27e4a0afe186e550db4ae74051f9fea50fa40b09..a2bef2a62da7e27e60559d17c4f7bece216fe8ab 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -271,7 +271,7 @@ class TicketForm extends DynamicForm { } } // Add fields from the standard ticket form to the ticket filterable fields -Filter::addSupportedMatches('Custom Fields', function() { +Filter::addSupportedMatches('Ticket Data', function() { $matches = array(); foreach (TicketForm::getInstance()->getFields() as $f) { if (!$f->hasData()) diff --git a/include/class.filter.php b/include/class.filter.php index d295c240c981ef853186a204f1fd4f81d9c55325..8854ea89e03095d003f2cb3bea407c8b5e062a91 100644 --- a/include/class.filter.php +++ b/include/class.filter.php @@ -19,11 +19,11 @@ class Filter { var $ht; static $match_types = array( - 'Basic Fields' => array( + 'User Information' => array( 'name' => 'Name', 'email' => 'Email', - 'subject' => 'Subject', - 'body' => 'Body/Text', + ), + 'Email Meta-Data' => array( 'reply-to' => 'Reply-To Email', 'reply-to-name' => 'Reply-To Name', ), diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php index 37ac6c69925bf4dc15711f0a76767803aeacc66a..74e72106859d68501fbc6e490d79a9ddf90a4869 100644 --- a/include/staff/filter.inc.php +++ b/include/staff/filter.inc.php @@ -121,7 +121,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); for($i=1; $i<=$n; $i++){ ?> <tr id="r<?php echo $i; ?>"> <td colspan="2"> - <div style="width:700px; float:left;"> + <div> <select name="rule_w<?php echo $i; ?>"> <option value="">— Select One ‐</option> <?php @@ -143,15 +143,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); } ?> </select> - <input type="text" size="30" name="rule_v<?php echo $i; ?>" value="<?php echo $info["rule_v$i"]; ?>"> + <input type="text" size="60" name="rule_v<?php echo $i; ?>" value="<?php echo $info["rule_v$i"]; ?>"> <span class="error"> <?php echo $errors["rule_$i"]; ?></span> - </div> <?php if($info["rule_w$i"] || $info["rule_h$i"] || $info["rule_v$i"]){ ?> <div style="float:right;text-align:right;padding-right:20px;"><a href="#" class="clearrule">(clear)</a></div> <?php } ?> - <div class="clear"></div> + </div> </td> </tr> <?php diff --git a/include/upgrader/streams/core/f1ccd3bb-f5692e24.patch.sql b/include/upgrader/streams/core/f1ccd3bb-f5692e24.patch.sql index ddf764696d9b25c17607bd3dd5fdb91968eee5f8..fab41f1bc758901bfc0a7537643556a1a90dadb9 100644 --- a/include/upgrader/streams/core/f1ccd3bb-f5692e24.patch.sql +++ b/include/upgrader/streams/core/f1ccd3bb-f5692e24.patch.sql @@ -22,6 +22,24 @@ ALTER TABLE `%TABLE_PREFIX%filter_rule` ALTER TABLE `%TABLE_PREFIX%ticket_collaborator` CHANGE `isactive` `isactive` tinyint(1) NOT NULL DEFAULT '1'; +-- There is no `subject` available in the filter::apply method for anything but email +UPDATE `%TABLE_PREFIX%filter_rule` + SET `what` = CONCAT('field.', ( + SELECT field.`id` FROM `%TABLE_PREFIX%form_field` field + JOIN `%TABLE_PREFIX%form` form ON (field.form_id = form.id) + WHERE field.`name` = 'subject' AND form.`type` = 'T' + )) + WHERE `what` = 'subject'; + +-- There is no `body` available in the filter::apply method for anything but emails +UPDATE `%TABLE_PREFIX%filter_rule` + SET `what` = CONCAT('field.', ( + SELECT field.`id` FROM `%TABLE_PREFIX%form_field` field + JOIN `%TABLE_PREFIX%form` form ON (field.form_id = form.id) + WHERE field.`name` = 'message' AND form.`type` = 'T' + )) + WHERE `what` = 'body'; + -- Finished with patch UPDATE `%TABLE_PREFIX%config` SET `value` = 'f5692e24c7afba7ab6168dde0b3bb3c8'