When I try to create a timetracking on any task/ticket, i get the following error:

User warning: Unknown column 'ticket_nid' in 'field list' query: INSERT INTO stormtimetracking (vid, nid, organization_nid, organization_title, project_nid, project_title, task_nid, task_title, task_stepno, ticket_nid, ticket_title, trackingdate, timebegin, timeend, duration) VALUES (7, 7, 1, 'Tinderbox', 2, 'PABA', 5, 'task_1', '', 0, '', 1216108200, '07:50', '07:52', 0.02) in /var/www/ocdevel/includes/database.mysql.inc on line 172.

I've played with all the field values and time formats, but nothing. In the end, the timetracking isn't created.

Comments

Roberto Gerola’s picture

Status: Active » Fixed

Fixed and committed, thanks.

In meantime, if you want to fix it on your installation, create a new page with PHP filter and insert this code :

  switch ($GLOBALS['db_type']) {
  case 'mysql':
  case 'mysqli':
    db_query("ALTER TABLE {stormtimetracking} ADD COLUMN ticket_nid INT(10)");
    db_query("ALTER TABLE {stormtimetracking} ADD COLUMN ticket_title VARCHAR(128)");
  break;
  case 'pgsql':
    db_query("ALTER TABLE {stormtimetracking} ADD COLUMN ticket_nid INT");
    db_query("ALTER TABLE {stormtimetracking} ADD COLUMN ticket_title VARCHAR(128)");
  break;
  }

and save the page.
Delete the page.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.