Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard delete tasks on disable module #230

Merged
merged 2 commits into from May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Events.php
Expand Up @@ -192,7 +192,7 @@ public static function onIntegrityCheck($event)
foreach (TaskItem::find()->all() as $taskItem) {
if ($taskItem->task === null) {
if ($integrityController->showFix("Deleting task item id " . $taskItem->id . " without existing task!")) {
$taskItem->delete();
$taskItem->hardDelete();
}
}
}
Expand Down Expand Up @@ -330,4 +330,4 @@ public static function onRestApiAddRules()
], 'tasks');
}

}
}
4 changes: 2 additions & 2 deletions Module.php
Expand Up @@ -75,7 +75,7 @@ public function getConfigUrl()
public function disable()
{
foreach (Task::find()->all() as $task) {
$task->delete();
$task->hardDelete();
}

foreach (TaskList::find()->all() as $taskList) {
Expand All @@ -96,7 +96,7 @@ public function disableContentContainer(ContentContainerActiveRecord $container)
parent::disableContentContainer($container);

foreach (Task::find()->contentContainer($container)->all() as $task) {
$task->delete();
$task->hardDelete();
}

foreach (TaskList::findByContainer($container)->all() as $taskList) {
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
@@ -1,6 +1,10 @@
Changelog
=========

1.8.1 (Unreleased)
----------------------
- Fix #230: Hard delete tasks on disable module

1.8.0 (April 28, 2023)
----------------------
- Enh #225: Guest Mode - Do not show TopMenu Entry
Expand Down
2 changes: 1 addition & 1 deletion module.json
Expand Up @@ -3,7 +3,7 @@
"name": "Tasks",
"description": "Simple taskmanager for your spaces.",
"keywords": ["task", "todo"],
"version": "1.8.0",
"version": "1.8.1",
"homepage": "https://github.com/humhub/tasks",
"humhub": {
"minVersion": "1.14"
Expand Down