Actions
Defect #15483
closedError 500 on Issue Update (postgres)
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
Symptom:
Update a issue description with more then 255 chars causes a HTTP 500.
$ tail -f current/log/*
> current/log/production.log <
ActiveRecord::StatementInvalid (PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)
: INSERT INTO "journal_details" ("journal_id", "old_value", "prop_key", "property", "value") VALUES ($1, $2, $3, $4, $5) RETURNING "id"):
app/models/journal.rb:54:in `save'
app/models/issue.rb:1506:in `create_journal'
app/models/issue.rb:163:in `create_or_update'
app/controllers/issues_controller.rb:470:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:458:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:184:in `update'
Cause:
$ grep -A5 'create_table "journal_details"' db/schema.rb
create_table "journal_details", :force => true do |t|
t.integer "journal_id", :default => 0, :null => false
t.string "property", :limit => 30, :default => "", :null => false
t.string "prop_key", :limit => 30, :default => "", :null => false
t.string "old_value"
t.string "value"
The last 2 need a larger datatype than the default `varchar(255)`.
$ psql --version
psql (PostgreSQL) 8.4.17
$ ruby script/about
sh: darcs: command not found
sh: hg: command not found
sh: cvs: command not found
sh: bzr: command not found
Environment:
Redmine version 2.4.0.stable
Ruby version 1.8.7-p358 (2012-02-08) [x86_64-linux]
Rails version 3.2.15
Environment production
Database adapter PostgreSQL
SCM:
Subversion 1.6.12
Git 1.7.2.5
Filesystem
Redmine plugins:
kramdown_formatter 0.0.1
redmine_redcarpet_formatter 2.0.1
Related issues
Actions