mirror of https://github.com/itflow-org/itflow
Removed Task Descriptions as the name says it all
This commit is contained in:
parent
e6e6c38db2
commit
e3ff8854f9
|
|
@ -1835,10 +1835,18 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.2'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.2.2') {
|
||||
// // Insert queries here required to update to DB version 1.2.3
|
||||
if (CURRENT_DATABASE_VERSION == '1.2.2') {
|
||||
|
||||
mysqli_query($mysqli, "ALTER TABLE `tasks` DROP `task_description`");
|
||||
mysqli_query($mysqli, "ALTER TABLE `task_templates` DROP `task_template_description`");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.3'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.2.3') {
|
||||
// // Insert queries here required to update to DB version 1.2.4
|
||||
// // Then, update the database to the next sequential version
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.3");
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.2.4");
|
||||
// }
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
* It is used in conjunction with database_updates.php
|
||||
*/
|
||||
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.2.2");
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.2.3");
|
||||
|
|
|
|||
6
db.sql
6
db.sql
|
|
@ -941,7 +941,7 @@ DROP TABLE IF EXISTS `project_template_ticket_templates`;
|
|||
CREATE TABLE `project_template_ticket_templates` (
|
||||
`ticket_template_id` int(11) NOT NULL,
|
||||
`project_template_id` int(11) NOT NULL,
|
||||
`ticket_template_order` int(11) NOT NULL,
|
||||
`ticket_template_order` int(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`ticket_template_id`,`project_template_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
|
@ -1527,7 +1527,6 @@ DROP TABLE IF EXISTS `task_templates`;
|
|||
CREATE TABLE `task_templates` (
|
||||
`task_template_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`task_template_name` varchar(200) NOT NULL,
|
||||
`task_template_description` text DEFAULT NULL,
|
||||
`task_template_order` int(11) NOT NULL DEFAULT 0,
|
||||
`task_template_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`task_template_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
|
|
@ -1547,7 +1546,6 @@ DROP TABLE IF EXISTS `tasks`;
|
|||
CREATE TABLE `tasks` (
|
||||
`task_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`task_name` varchar(255) NOT NULL,
|
||||
`task_description` text DEFAULT NULL,
|
||||
`task_status` varchar(255) DEFAULT NULL,
|
||||
`task_order` int(11) NOT NULL DEFAULT 0,
|
||||
`task_completed_at` datetime DEFAULT NULL,
|
||||
|
|
@ -1896,4 +1894,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-04-06 18:36:53
|
||||
-- Dump completed on 2024-04-06 22:06:56
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ if (isset($_POST['add_task'])) {
|
|||
|
||||
$ticket_id = intval($_POST['ticket_id']);
|
||||
$task_name = sanitizeInput($_POST['name']);
|
||||
$task_description = sanitizeInput($_POST['description']);
|
||||
|
||||
// Get Client ID from tickets using the ticket_id
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_id = $ticket_id");
|
||||
|
|
@ -18,7 +17,7 @@ if (isset($_POST['add_task'])) {
|
|||
$client_id = intval($row['ticket_client_id']);
|
||||
|
||||
|
||||
mysqli_query($mysqli, "INSERT INTO tasks SET task_name = '$task_name', task_description = '$task_description', task_ticket_id = $ticket_id");
|
||||
mysqli_query($mysqli, "INSERT INTO tasks SET task_name = '$task_name', task_ticket_id = $ticket_id");
|
||||
|
||||
$task_id = mysqli_insert_id($mysqli);
|
||||
|
||||
|
|
@ -36,14 +35,13 @@ if (isset($_POST['edit_task'])) {
|
|||
|
||||
$task_id = intval($_POST['task_id']);
|
||||
$task_name = sanitizeInput($_POST['name']);
|
||||
$task_description = sanitizeInput($_POST['description']);
|
||||
|
||||
// Get Client ID
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM tasks LEFT JOIN tickets ON ticket_id = task_ticket_id WHERE task_id = $task_id");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$client_id = intval($row['ticket_client_id']);
|
||||
|
||||
mysqli_query($mysqli, "UPDATE tasks SET task_name = '$task_name', task_description = '$task_description' WHERE task_id = $task_id");
|
||||
mysqli_query($mysqli, "UPDATE tasks SET task_name = '$task_name' WHERE task_id = $task_id");
|
||||
|
||||
// Logging
|
||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Task', log_action = 'Edit', log_description = '$session_name edited task $task_name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $task_id");
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="modal-dialog">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-tasks mr-2"></i>Editing task: <strong><?php echo $task_name; ?></strong></h5>
|
||||
<h5 class="modal-title"><i class="fa fa-fw fa-tasks mr-2"></i>Editing task</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
|
|
@ -20,16 +20,6 @@
|
|||
<input type="text" class="form-control" name="name" placeholder="Name the task" value="<?php echo $task_name; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-angle-right"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="description" placeholder="Description of the task" value="<?php echo $task_description; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -805,7 +805,11 @@ if (isset($_GET['ticket_id'])) {
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
|
||||
require "task_edit_modal.php";
|
||||
} ?>
|
||||
</table>
|
||||
</div>
|
||||
<!-- End Tasks Card -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue