redmine/redmine — pull request #33 by aklevtsov (2014-04-11 23:35:12+00:00)
Title: 2.4.5 stable

After upgrade from 2.4-dev to 2.4.5 started in some projects encounter errors:

```
Started POST "/projects/olis-lxg-travel/issues" for 127.0.0.1 at 2014-04-12 03:27:15 +0400
Processing by IssuesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"ZXCK8o3KwTSvtpmj9XbQSfSxXMUt2f0hUdVyHHUuE08=", "issue"=>{"is_private"=>"0", "tracker_id"=>"1", "subject"=>"test", "description"=>"", "status_id"=>"1", "priority_id"=>"4", "assigned_to_id"=>"", "fixed_version_id"=>"", "parent_issue_id"=>"", "start_date"=>"2014-04-12", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{"1"=>"", "2"=>"Все"}}, "commit"=>"Создать", "project_id"=>"olis-lxg-travel"}
[1m[35m (0.1ms)[0m SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings`
[1m[36mUser Load (0.1ms)[0m [1mSELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`status` = 1 AND `users`.`id` = 1 LIMIT 1[0m
Current user: kaa (id=1)
[1m[35mProject Load (0.1ms)[0m SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'olis-lxg-travel' LIMIT 1
[1m[36mSQL (0.1ms)[0m [1mSELECT `enabled_modules`.`name` FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 39[0m
[1m[35mIssueStatus Load (0.1ms)[0m SELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`is_default` = 1 LIMIT 1
[1m[36mCACHE (0.0ms)[0m [1mSELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`is_default` = 1 LIMIT 1[0m
[1m[35mIssuePriority Load (0.1ms)[0m SELECT `enumerations`.* FROM `enumerations` WHERE `enumerations`.`type` IN ('IssuePriority') AND `enumerations`.`is_default` = 1 ORDER BY enumerations.position ASC LIMIT 1
[1m[36mProject Load (0.1ms)[0m [1mSELECT `projects`.* FROM `projects` WHERE `projects`.`id` = 39 LIMIT 1[0m
[1m[35mTracker Load (0.2ms)[0m SELECT `trackers`.* FROM `trackers` INNER JOIN `projects_trackers` ON `trackers`.`id` = `projects_trackers`.`tracker_id` WHERE `projects_trackers`.`project_id` = 39 AND `trackers`.`id` = 1 ORDER BY trackers.position LIMIT 1
[1m[36mCACHE (0.0ms)[0m [1mSELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`is_default` = 1 LIMIT 1[0m
[1m[35mRole Load (0.1ms)[0m SELECT `roles`.* FROM `roles`
[1m[36mWorkflowTransition Load (0.1ms)[0m [1mSELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowTransition') AND `workflows`.`old_status_id` = 1 AND (role_id IN (1,2,3,4,5,6,7,8) AND tracker_id = 1 AND ((author = 0 AND assignee = 0) OR author = 1))[0m
[1m[35mIssueStatus Load (0.1ms)[0m SELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`id` IN (5, 4, 3, 2, 6)
[1m[36mSQL (0.1ms)[0m [1mSELECT `enabled_modules`.`name` FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 39[0m
[1m[35mCACHE (0.0ms)[0m SELECT `roles`.* FROM `roles`
[1m[36mWorkflowPermission Load (0.1ms)[0m [1mSELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowPermission') AND `workflows`.`tracker_id` = 1 AND `workflows`.`old_status_id` = 1 AND `workflows`.`role_id` IN (1, 2, 3, 4, 5, 6, 7, 8)[0m
[1m[35mTracker Load (0.2ms)[0m SELECT `trackers`.* FROM `trackers` WHERE `trackers`.`id` = 1 LIMIT 1
[1m[36mCACHE (0.0ms)[0m [1mSELECT `roles`.* FROM `roles` [0m
[1m[35mCACHE (0.0ms)[0m SELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowPermission') AND `workflows`.`tracker_id` = 1 AND `workflows`.`old_status_id` = 1 AND `workflows`.`role_id` IN (1, 2, 3, 4, 5, 6, 7, 8)
[1m[36mCACHE (0.0ms)[0m [1mSELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`is_default` = 1 LIMIT 1[0m
[1m[35mCACHE (0.0ms)[0m SELECT `roles`.* FROM `roles`
[1m[36mCACHE (0.0ms)[0m [1mSELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowTransition') AND `workflows`.`old_status_id` = 1 AND (role_id IN (1,2,3,4,5,6,7,8) AND tracker_id = 1 AND ((author = 0 AND assignee = 0) OR author = 1))[0m
[1m[35mCACHE (0.0ms)[0m SELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`id` IN (5, 4, 3, 2, 6)
[1m[36mCACHE (0.0ms)[0m [1mSELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`is_default` = 1 LIMIT 1[0m
[1m[35mCACHE (0.0ms)[0m SELECT `roles`.* FROM `roles`
[1m[36mCACHE (0.0ms)[0m [1mSELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowTransition') AND `workflows`.`old_status_id` = 1 AND (role_id IN (1,2,3,4,5,6,7,8) AND tracker_id = 1 AND ((author = 0 AND assignee = 0) OR author = 1))[0m
[1m[35mCACHE (0.0ms)[0m SELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`id` IN (5, 4, 3, 2, 6)
[1m[36mCACHE (0.0ms)[0m [1mSELECT `roles`.* FROM `roles` [0m
[1m[35mCACHE (0.0ms)[0m SELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowPermission') AND `workflows`.`tracker_id` = 1 AND `workflows`.`old_status_id` = 1 AND `workflows`.`role_id` IN (1, 2, 3, 4, 5, 6, 7, 8)
[1m[36mIssueCustomField Load (0.2ms)[0m [1mSELECT `custom_fields`.* FROM `custom_fields` INNER JOIN `custom_fields_trackers` ON `custom_fields`.`id` = `custom_fields_trackers`.`custom_field_id` WHERE `custom_fields`.`type` IN ('IssueCustomField') AND `custom_fields_trackers`.`tracker_id` = 1[0m
[1m[35mIssueCustomField Load (0.1ms)[0m SELECT `custom_fields`.* FROM `custom_fields` WHERE `custom_fields`.`type` IN ('IssueCustomField') AND (is_for_all = 1 OR id IN (SELECT DISTINCT cfp.custom_field_id FROM custom_fields_projects cfp WHERE cfp.project_id = 39)) ORDER BY custom_fields.position ASC
[1m[36mCACHE (0.0ms)[0m [1mSELECT `roles`.* FROM `roles` [0m
[1m[35mCACHE (0.0ms)[0m SELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowPermission') AND `workflows`.`tracker_id` = 1 AND `workflows`.`old_status_id` = 1 AND `workflows`.`role_id` IN (1, 2, 3, 4, 5, 6, 7, 8)
[1m[36mCACHE (0.0ms)[0m [1mSELECT `roles`.* FROM `roles` [0m
[1m[35mCACHE (0.0ms)[0m SELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowPermission') AND `workflows`.`tracker_id` = 1 AND `workflows`.`old_status_id` = 1 AND `workflows`.`role_id` IN (1, 2, 3, 4, 5, 6, 7, 8)
[1m[36mCACHE (0.0ms)[0m [1mSELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`is_default` = 1 LIMIT 1[0m
[1m[35mCACHE (0.0ms)[0m SELECT `roles`.* FROM `roles`
[1m[36mCACHE (0.0ms)[0m [1mSELECT `workflows`.* FROM `workflows` WHERE `workflows`.`type` IN ('WorkflowTransition') AND `workflows`.`old_status_id` = 1 AND (role_id IN (1,2,3,4,5,6,7,8) AND tracker_id = 1 AND ((author = 0 AND assignee = 0) OR author = 1))[0m
[1m[35mCACHE (0.0ms)[0m SELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`id` IN (5, 4, 3, 2, 6)
[1m[36mCACHE (0.0ms)[0m [1mSELECT `issue_statuses`.* FROM `issue_statuses` WHERE `issue_statuses`.`is_default` = 1 LIMIT 1[0m
[1m[35mUser Load (0.2ms)[0m SELECT DISTINCT `users`.* FROM `users` INNER JOIN `members` ON `members`.`user_id` = `users`.`id` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`status` = 1 AND (members.project_id = 39)
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.0ms)[0m ROLLBACK
Completed 500 Internal Server Error in 273.3ms

NoMethodError (undefined method `>' for nil:NilClass):
app/models/custom_field.rb:355:in `validate_field_value_format'
app/models/custom_field.rb:334:in `validate_field_value'
app/models/custom_field_value.rb:46:in `validate_value'
lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:126:in `each'
lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:126:in `validate_custom_field_values'
app/controllers/issues_controller.rb:146:in `create'
```

```
Environment:
Redmine version 2.4.5.stable
Ruby version 2.0.0-p451 (2014-02-24) [i686-linux]
Rails version 3.2.17
```