Project

General

Profile

Task Update Time Problem

Added by walter trapa almost 14 years ago

Hi,

After a few weeks using Redmine 1.0.3 we can not update “Spent Task Time”. We can update other task’s parameters.

Log file shows a problem with Role parameter “NULL”.

ActiveRecord::StatementInvalid (Mysql::Error: Column ‘role’ cannot be null: INSERT INTO `time_entries`

Same issue then we try to enter a new entry in Log Time (Task option)

What can I do?

I update to 1.0.4 to fix the problem but still it is here.

Thank you.


Replies (8)

RE: Task Update Time Problem - Added by walter trapa almost 14 years ago

After migrated the BBDD to other server the problem remains….

Why role is null when it try to Insert new time_entry?¿

Any clue?

RE: Task Update Time Problem - Added by walter trapa almost 14 years ago

Extended LOG:

ActiveRecord::StatementInvalid in IssuesController#update
Mysql::Error: Column 'role' cannot be null: INSERT INTO `time_entries` (`comments`, `created_on`, `cost`, `project_id`, `issue_id`, `tmonth`, `activity_id`, `role`, `spent_on`, `updated_on`, `user_id`, `hours`, `tyear`, `tweek`) VALUES
RAILS_ROOT: C:/Program Files/BitNami Redmine Stack/apps/redmine

Application Trace | Framework Trace | Full Trace
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `insert_sql'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:333:in `insert_sql'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:18:in `insert'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/base.rb:2908:in `create_without_timestamps'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/timestamp.rb:53:in `create_without_callbacks'
C:/Program Files/BitNami Redmine Stack/apps/redmine/vendor/rails/activerecord/lib/active_record/callbacks.rb:266:in `create'

RE: Task Update Time Problem - Added by Stefan H Singer almost 14 years ago

I get this too. It might be after I tried out the CMI plugin, have you installed that?

RE: Task Update Time Problem - Added by walter trapa almost 14 years ago

Yep, finally i saw there are new columms in time_entry table, Role and Cost. After uninstall CMI plugin, i remove these columms and everything works fine again. these fields are created by this Plugin, don't belong to original redmine table config.

RE: Task Update Time Problem - Added by José M. Prieto almost 14 years ago

Just writing here to let you know that this problem is being taken care of (I'm a CMI developer).

PS: You can also drop the history_user_profiles and history_profiles_costs tables.

RE: Task Update Time Problem - Added by Manuel Padrón Martínez over 13 years ago

One better (I thought) solution that works for me (José M. Prieto fixme if i'm wrong)

  1. Stop webserver (webrick, apache, whatever...)
  2. rake db:migrate:plugin NAME=redmine_cmi RAILS_ENV=production VERSION=0
  3. Remove redmine_cmi plugin
  4. Restart webserver

ps: Change RAILS_ENV=production to your enviroment (demo, development, production, test, whatever ...)

RE: Task Update Time Problem - Added by José M. Prieto over 13 years ago

True. In fact, some time ago, I added an uninstall section to both the readme and the plugin's page with the exact same tip.

    (1-8/8)