From 010dad2136e57b8984200ac98165b2580197cdab Mon Sep 17 00:00:00 2001 From: Stefan Hanauska Date: Thu, 11 Apr 2024 19:49:45 +0200 Subject: [PATCH] Fix --- classes/boardmanager.php | 4 ++-- db/upgrade.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/boardmanager.php b/classes/boardmanager.php index b5c5af96..b8637223 100644 --- a/classes/boardmanager.php +++ b/classes/boardmanager.php @@ -966,12 +966,12 @@ public function update_card(int $cardid, array $data): void { } $assignees = []; - $column = $this->get_column($cardupdate['kanban_column']); + $column = $this->get_column($card['kanban_column']); $options = json_decode($column->options); $wiplimit = $options->wiplimit ?? 0; if ($wiplimit > 0) { - self::check_wiplimit($cardupdate['kanban_column'], $cardid, $wiplimit, $toinsert); + self::check_wiplimit($card['kanban_column'], $cardid, $wiplimit, $toinsert); } foreach ($toinsert as $assignee) { diff --git a/db/upgrade.php b/db/upgrade.php index 5a4ac9da..7faaf331 100755 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -37,6 +37,11 @@ function xmldb_kanban_upgrade($oldversion) { $table = new xmldb_table('kanban_card'); $field = new xmldb_field('repeat_enable', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'timemodified'); + // Conditionally launch add field repeat_enable. + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + // Conditionally launch add field repeat_enable. $field = new xmldb_field('repeat_interval', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, '0', 'repeat_enable');