I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2279

A Section Name bigger than 20 characters creates and exception when saving

Added by Christopher Caruk almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Major
Assignee:
Category:
-
Target version:
Start date:
23 Jan 2014
Due date:
31 May 2014
% Done:

100%

Redmine version:
2.4.2
External issue:

Description

I am using Project Sections on an Redmine installation using Postgres. When I try to save a new section with an identifier or name longer than 20 characters I get an exception. It looks like the field, when created in pPostgres has a default length of 20.

This is the error that I get:

Started POST "/sections/create” for 85.240.218.11 at 2014-01-23 19:46:15 +0000
Processing by ProjectSectionsController#create as HTML
Parameters: {“utf8"⇒“✓“, “authenticity_token"⇒“nd0XT1Z9mqhG9AueaWL8byVLZuYRIcrUeTEliO0zEvQ=”, “project_section"⇒{“name"⇒“Infrastructure Projects”, “parent_id"⇒“”, “identifier"⇒“infrastructure-projects”}, “continue"⇒“Create and continue”}
Current user: admin (id=1)
Completed 500 Internal Server Error in 14.3ms

ActiveRecord::StatementInvalid (PG::StringDataRightTruncation: ERROR:  value too long for type character varying(20)
: INSERT INTO "project_sections" ("identifier", "lft", "name", "parent_id", "path", "rgt") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"):
activerecord (3.2.16) lib/active_record/connection_adapters/postgresql_adapter.rb:1176:in `get_last_result'
activerecord (3.2.16) lib/active_record/connection_adapters/postgresql_adapter.rb:1176:in `exec_cache'
activerecord (3.2.16) lib/active_record/connection_adapters/postgresql_adapter.rb:661:in `block in exec_query'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
activesupport (3.2.16) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
activerecord (3.2.16) lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract/database_statements.rb:63:in `exec_insert'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract/database_statements.rb:90:in `insert'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert'
activerecord (3.2.16) lib/active_record/relation.rb:66:in `insert'
activerecord (3.2.16) lib/active_record/persistence.rb:367:in `create'
activerecord (3.2.16) lib/active_record/timestamp.rb:58:in `create'
activerecord (3.2.16) lib/active_record/callbacks.rb:268:in `block in create'
activesupport (3.2.16) lib/active_support/callbacks.rb:414:in `_run__3807103129576216773__create__4235643354487699760__callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.16) lib/active_support/callbacks.rb:385:in `_run_create_callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:81:in `run_callbacks'
activerecord (3.2.16) lib/active_record/callbacks.rb:268:in `create'
activerecord (3.2.16) lib/active_record/persistence.rb:348:in `create_or_update'
activerecord (3.2.16) lib/active_record/callbacks.rb:264:in `block in create_or_update'
activesupport (3.2.16) lib/active_support/callbacks.rb:447:in `_run__3807103129576216773__save__4235643354487699760__callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.16) lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:81:in `run_callbacks'
activerecord (3.2.16) lib/active_record/callbacks.rb:264:in `create_or_update'
activerecord (3.2.16) lib/active_record/persistence.rb:84:in `save'
activerecord (3.2.16) lib/active_record/validations.rb:50:in `save'
activerecord (3.2.16) lib/active_record/attribute_methods/dirty.rb:22:in `save'
activerecord (3.2.16) lib/active_record/transactions.rb:259:in `block (2 levels) in save'
activerecord (3.2.16) lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
activerecord (3.2.16) lib/active_record/transactions.rb:208:in `transaction'
activerecord (3.2.16) lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
activerecord (3.2.16) lib/active_record/transactions.rb:259:in `block in save'
activerecord (3.2.16) lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
activerecord (3.2.16) lib/active_record/transactions.rb:258:in `save'
plugins/project_section/app/controllers/project_sections_controller.rb:22:in `create'
actionpack (3.2.16) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.16) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.16) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.16) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.16) lib/active_support/callbacks.rb:546:in `_run__322622752181771818__process_action__2394927555537231817__callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.16) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.16) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.16) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.16) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.16) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.16) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.16) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.16) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.16) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
activerecord (3.2.16) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (3.2.16) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.16) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.16) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.16) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.16) lib/action_dispatch/routing/route_set.rb:608:in `call'
rack-openid (1.4.2) lib/rack/openid.rb:98:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.5) lib/rack/etag.rb:23:in `call'
rack (1.4.5) lib/rack/conditionalget.rb:35:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.16) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.16) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.16) lib/active_support/callbacks.rb:405:in `_run__2383793324603363633__call__4235643354487699760__callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.16) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.16) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.16) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.16) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.16) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.16) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.16) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.16) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.16) lib/action_dispatch/middleware/static.rb:63:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.16) lib/rails/engine.rb:484:in `call'
railties (3.2.16) lib/rails/application.rb:231:in `call'
railties (3.2.16) lib/rails/railtie/configurable.rb:30:in `method_missing'
passenger (4.0.33) lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
passenger (4.0.33) lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
passenger (4.0.33) lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
passenger (4.0.33) lib/phusion_passenger/request_handler.rb:440:in `block (3 levels) in start_threads'


Related issues

Duplicates Project Sections - Bug #2253: Project Section id truncated when saved. Closed 10 Oct 2013 31 May 2014

Associated revisions

Revision 18 (diff)
Added by Andriy Lesyuk over 10 years ago

Renamed CSS file, applied community patches (#2252, #2253, #2275 and #2279)

History

#1 Updated by Andriy Lesyuk over 10 years ago

  • Status changed from New to Open
  • Assignee set to Andriy Lesyuk
  • Priority changed from Normal to Major
  • Target version set to 0.0.2

#2 Updated by Andriy Lesyuk over 10 years ago

  • Due date set to 31 May 2014
  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF

Terms of use | Privacy policy