mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 03:14:52 +00:00
FEATURE - Ticket Watchers - Initial Commit for DB Structure for ticker wathers
This commit is contained in:
@@ -337,7 +337,8 @@ if ($emails) {
|
|||||||
$attachments = $parser->getAttachments();
|
$attachments = $parser->getAttachments();
|
||||||
|
|
||||||
$message = $parser->getMessageBody('text');
|
$message = $parser->getMessageBody('text');
|
||||||
//$message .= $parser->getMessageBody('htmlEmbedded');
|
// If below is enabled and up above is enabled text based emails get cut out
|
||||||
|
//$message = $parser->getMessageBody('htmlEmbedded');
|
||||||
|
|
||||||
// Check if we can identify a ticket number (in square brackets)
|
// Check if we can identify a ticket number (in square brackets)
|
||||||
if (preg_match("/\[$config_ticket_prefix\d+\]/", $subject, $ticket_number)) {
|
if (preg_match("/\[$config_ticket_prefix\d+\]/", $subject, $ticket_number)) {
|
||||||
|
|||||||
@@ -1156,11 +1156,27 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.4'");
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.4'");
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (CURRENT_DATABASE_VERSION == '0.6.4') {
|
if (CURRENT_DATABASE_VERSION == '0.6.4') {
|
||||||
//Insert queries here required to update to DB version 0.6.5
|
//Insert queries here required to update to DB version 0.6.5
|
||||||
|
|
||||||
|
mysqli_query($mysqli, "CREATE TABLE `ticket_watchers` (
|
||||||
|
`watcher_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`watcher_name` varchar(255) NULL DEFAULT NULL,
|
||||||
|
`watcher_email` varchar(255) NOT NULL,
|
||||||
|
`watcher_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`watcher_ticket_id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`watcher_id`)
|
||||||
|
)");
|
||||||
|
|
||||||
// Then, update the database to the next sequential version
|
// Then, update the database to the next sequential version
|
||||||
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.5'");
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.5'");
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (CURRENT_DATABASE_VERSION == '0.6.5') {
|
||||||
|
//Insert queries here required to update to DB version 0.6.6
|
||||||
|
|
||||||
|
// Then, update the database to the next sequential version
|
||||||
|
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.6'");
|
||||||
//}
|
//}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -5,4 +5,4 @@
|
|||||||
* It is used in conjunction with database_updates.php
|
* It is used in conjunction with database_updates.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DEFINE("LATEST_DATABASE_VERSION", "0.6.4");
|
DEFINE("LATEST_DATABASE_VERSION", "0.6.5");
|
||||||
|
|||||||
19
db.sql
19
db.sql
@@ -1419,6 +1419,23 @@ CREATE TABLE `ticket_views` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `ticket_watchers`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ticket_watchers`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `ticket_watchers` (
|
||||||
|
`watcher_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`watcher_name` varchar(255) DEFAULT NULL,
|
||||||
|
`watcher_email` varchar(255) NOT NULL,
|
||||||
|
`watcher_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`watcher_ticket_id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`watcher_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `tickets`
|
-- Table structure for table `tickets`
|
||||||
--
|
--
|
||||||
@@ -1621,4 +1638,4 @@ CREATE TABLE `vendors` (
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2023-07-15 15:32:02
|
-- Dump completed on 2023-08-01 13:03:12
|
||||||
|
|||||||
Reference in New Issue
Block a user