Cannot add comments nor subtasks after update to 1.2.19

Hi,

I have recently updated / migrated to 1.2.19. It now seems that I can create new tasks, but a) no comments and b) no subtasks.

Two points to mention:

  1. During the process, I changed the location of the installation from <domain>/kanboard to kanboard.<domain>
  2. Before the update, I had to manually update the tasks table in SQLite to remove two leftover columns created by plugins that had blocked the database migration. I used sqlitebrowser 3.11.2-1 to do that (i.e., copy the tasks table etc.).

Do you have an idea how to solve this issue, or where to look in my installation?

Thanks a lot!
Joachim

can you enable debug mode and check if you get an error in the log?

Thanks, much appreciated – I had not thought of that. In fact, the debug log gives me:

Integrity constraint violation: 19 FOREIGN KEY constraint failed

That sounds like something went awry when I tried to update the tasks table.
I had tried this:


PRAGMA foreign_keys=off;

BEGIN TRANSACTION;

ALTER TABLE tasks RENAME TO _tasks_old;

CREATE TABLE tasks (
            id INTEGER PRIMARY KEY,
            title TEXT NOCASE NOT NULL,
            description TEXT,
            date_creation INTEGER,
            color_id TEXT,
            project_id INTEGER,
            column_id INTEGER,
            owner_id INTEGER DEFAULT '0',
            position INTEGER,
            is_active INTEGER DEFAULT 1, date_completed INTEGER, score INTEGER, date_due INTEGER, category_id INTEGER DEFAULT 0, creator_id INTEGER DEFAULT '0', date_modification INTEGER DEFAULT '0', reference TEXT DEFAULT '', date_started INTEGER, time_spent NUMERIC DEFAULT 0, time_estimated NUMERIC DEFAULT 0, swimlane_id INTEGER DEFAULT 0, date_moved INTEGER DEFAULT 0, recurrence_status INTEGER NOT NULL DEFAULT 0, recurrence_trigger INTEGER NOT NULL DEFAULT 0, recurrence_factor INTEGER NOT NULL DEFAULT 0, recurrence_timeframe INTEGER NOT NULL DEFAULT 0, recurrence_basedate INTEGER NOT NULL DEFAULT 0, recurrence_parent INTEGER, recurrence_child INTEGER, priority INTEGER DEFAULT 0, external_provider TEXT, external_uri TEXT, 
            FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
            FOREIGN KEY(column_id) REFERENCES columns(id) ON DELETE CASCADE
        );

INSERT INTO tasks (id,	title,	description,	date_creation,	color_id,	project_id,	column_id,	owner_id,	position,	is_active,	date_completed,	score,	date_due,	category_id,	creator_id,	date_modification,	reference,	date_started,	time_spent,	time_estimated,	swimlane_id,	date_moved,	recurrence_status,	recurrence_trigger,	recurrence_factor,	recurrence_timeframe,	recurrence_basedate,	recurrence_parent,	recurrence_child,	priority,	external_provider,	external_uri)
  SELECT id,	title,	description,	date_creation,	color_id,	project_id,	column_id,	owner_id,	position,	is_active,	date_completed,	score,	date_due,	category_id,	creator_id,	date_modification,	reference,	date_started,	time_spent,	time_estimated,	swimlane_id,	date_moved,	recurrence_status,	recurrence_trigger,	recurrence_factor,	recurrence_timeframe,	recurrence_basedate,	recurrence_parent,	recurrence_child,	priority,	external_provider,	external_uri
  FROM _tasks_old;

COMMIT;

PRAGMA foreign_keys=on;

Good morning,

it really seems that my initial SQL statement messed up foreign keys in a number of other tables (because the were still referring to the old/ renamed table). I worked through the affected tables that I could identify, and I am very pleased that I can now add comments and subtasks again.

Will keep an eye on the error log for the next coupls of days. Thanks again, that was most helpful!

Joachim