Skip to content

Commit 64c81f4

Browse files
committed
Fix add column in good entity
1 parent f3b4912 commit 64c81f4

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

ajax/kanban.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
$params = $_POST['params'] ?? [];
244244
$column_item->add([
245245
'name' => $_POST['column_name'],
246+
'entities_id' => $_SESSION['glpiactive_entity'],
246247
] + $params);
247248
} elseif (($_POST['action'] ?? null) === 'save_column_state') {
248249
if (!isset($_POST['state'])) {

src/TaskState.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ public function showForm($ID, $options = [])
160160
$possible_values[$datatype['id']] = $datatype['name'];
161161
}
162162
}
163-
$values = json_decode($this->fields['tasktypes']);
163+
$values = [];
164+
if ($this->fields['tasktypes'] != null) {
165+
$values = json_decode($this->fields['tasktypes']);
166+
}
167+
164168
if (!is_array($values)) {
165169
$values = [];
166170
}

0 commit comments

Comments
 (0)