Actions
Defect #21071
closedfind_referenced_issue_by_id fails with RangeError for large numbers
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
When a commit message contains a large number like #2010021810000121 it becomes impossible to open the repository view.
On the log we get the error:
A RangeError occurred in repositories#show: 2010021810000121 is out of range for ActiveRecord::ConnectionAdapters::SQLServer::Type::Integer with limit 4 app/models/changeset.rb:203:in `find_referenced_issue_by_id' app/models/changeset.rb:134:in `block (2 levels) in scan_comment_for_issue_ids' app/models/changeset.rb:133:in `each' app/models/changeset.rb:133:in `block in scan_comment_for_issue_ids' app/models/changeset.rb:129:in `scan' app/models/changeset.rb:129:in `scan_comment_for_issue_ids' app/models/changeset.rb:102:in `scan_for_issues' app/models/repository/git.rb:218:in `save_revision' app/models/repository/git.rb:207:in `block (2 levels) in save_revisions' app/models/repository/git.rb:204:in `block in save_revisions' app/models/repository/git.rb:203:in `each' app/models/repository/git.rb:203:in `save_revisions' app/models/repository/git.rb:153:in `fetch_changesets' app/controllers/repositories_controller.rb:114:in `show' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Our system is running with following versions (but it also affects the current redmine trunk):
Environment: Redmine version 3.1.0.devel Ruby version 2.2.3-p173 (2015-08-18) [i386-linux-gnu] Rails version 4.2.3 Environment production Database adapter SQLServer SCM: Subversion 1.8.8 Mercurial 2.8.2 Cvs 1.12.13 Git 1.9.1 Filesystem
Actions