Author Topic: Creating tasks from template Query failed with message 'Out of range value  (Read 2224 times)

andy.hoyle

  • Newbie
  • *
  • Posts: 30
    • View Profile
Trying to add value 246 to og_project_tasks.from_template_id which is tinyint(1)

Full error dump:

========================

Query failed with message 'Out of range value for column 'from_template_id' at row 1'
Error params:
File: C:\Web\opengoo\environment\library\database\adapters\AbstractDBAdapter.class.php 
Line: 386 
Sql: INSERT INTO `og_project_tasks` (`parent_id`, `text`, `assigned_to_user_id`, `assigned_to_company_id`, `completed_on`, `due_date`, `start_date`, `completed_by_id`, `created_on`, `created_by_id`, `updated_on`, `updated_by_id`, `order`, `milestone_id`, `title`, `is_private`, `started_on`, `priority`, `state`, `project_id`, `started_by_id`, `assigned_on`, `assigned_by_id`, `time_estimate`, `is_template`, `from_template_id`, `trashed_on`, `trashed_by_id`) VALUES ('252', '', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '2009-04-15 15:45:27', '1', '2009-04-15 15:45:27', '1', '1', '0', '- Set language to Arabic', '0', '0000-00-00 00:00:00', '200', '0', '47', '0', '2009-04-15 15:45:27', '1', '0', '0', '246', '0000-00-00 00:00:00', '0') 
Error number: 1264 
Error message: Out of range value for column 'from_template_id' at row 1 
Backtrace:
#0 C:\Web\opengoo\environment\library\database\adapters\AbstractDBAdapter.class.php(272): AbstractDBAdapter->prepareAndExecute('INSERT INTO `og...', NULL)
#1 C:\Web\opengoo\environment\library\database\DB.class.php(145): AbstractDBAdapter->execute('INSERT INTO `og...', NULL)
#2 C:\Web\opengoo\environment\classes\dataaccess\DataObject.class.php(571): DB::execute('INSERT INTO `og...')
#3 C:\Web\opengoo\environment\classes\dataaccess\DataObject.class.php(418): DataObject->doSave()
#4 C:\Web\opengoo\application\models\ApplicationDataObject.class.php(125): DataObject->save()
#5 C:\Web\opengoo\application\models\ProjectDataObject.class.php(1124): ApplicationDataObject->save()
#6 C:\Web\opengoo\application\models\project_tasks\ProjectTask.class.php(1000): ProjectDataObject->save()
#7 C:\Web\opengoo\application\models\project_tasks\ProjectTasks.class.php(476): ProjectTask->save()
#8 C:\Web\opengoo\application\controllers\TemplateController.class.php(237): ProjectTasks->copySubTasks(Object(ProjectTask), Object(ProjectTask), false)
#9 C:\Web\opengoo\environment\classes\controller\Controller.class.php(75): TemplateController->instantiate()
#10 C:\Web\opengoo\environment\classes\controller\PageController.class.php(62): Controller->execute('instantiate')
#11 C:\Web\opengoo\environment\classes\Env.class.php(133): PageController->execute('instantiate')
#12 C:\Web\opengoo\init.php(146): Env::executeAction('template', 'instantiate')
#13 C:\Web\opengoo\index.php(9): require('C:\Web\opengoo\...')
#14 {main}
Autoglobal varibles:
$_GET: Array (
  ['active_project'] => (string) '47'
  ['ajax'] => (string) 'true'
  ['c'] => (string) 'template'
  ['a'] => (string) 'instantiate'
  ['id'] => (string) '8'
  ['current'] => (string) 'tasks-panel'
  ['_dc'] => (string) '1239810327520'

$_POST: 
$_COOKIE: Array (
  ['id'] => (string) '1'
  ['token'] => (string) '2ee7a71e5008223ae4ff4ff0d6557951cbdef243'
  ['PHPSESSID'] => (string) '8scfniagc1jtlc0c10smrcflh3'

$_SESSION: Array (
  ['cal_version'] => true
  ['month'] => (string) '4'
  ['year'] => (string) '2009'
  ['day'] => (string) '15'

Execution time:
Total execution time: 0.188774 seconds

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Hi Andy,

It is a bug in the table definition. It will be corrected on version 1.4. You can correct it with this SQL:

Code: [Select]
ALTER TABLE `og_project_tasks` MODIFY COLUMN `from_template_id` int(10) NOT NULL default '0';
ALTER TABLE `og_project_milestones` MODIFY COLUMN `from_template_id` int(10) NOT NULL default '0';

You may need to change the table prefix if you changed it during installation.

 

anything