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 #ISSUE-17

SVN integration: Commit with new issue-id does not work

Added by daniel wieselwind about 6 years ago. Updated about 6 years ago.

Status:
Under Verification
Priority:
Major
Assignee:
Target version:
Start date:
20 Jul 2018
Due date:
% Done:

50%

Redmine version:
External issue:

Description

Committiong a revision with refers #ISSUE-1234 does not work. The revision is not linked to the issue.

Associated revisions

Revision 40 (diff)
Added by Andriy Lesyuk over 4 years ago

Fixed crash in changeset handling (#ISSUE-17)

History

#1 Updated by Andriy Lesyuk about 6 years ago

  • Tracker changed from Omission to Bug
  • Status changed from New to Under Verification
  • Assignee set to Andriy Lesyuk
  • Priority changed from Normal to Major
  • Target version set to 0.0.3
  • Start date set to 20 Jul 2018
  • % Done changed from 0 to 50

daniel, r39 can fix this issue. Please test (you’ll need to update code from SVN/Git).

#2 Updated by daniel wieselwind about 6 years ago

Hi,

I have tried several commit messages, and am able to break all commits with a (malformed) “refs 2802” here:

/var/www/redmine/plugins/redmine_issue_checklist/init.rb:24: warning: key :issue_checklist is duplicated and overwritten on line 24
rake aborted!
NoMethodError: undefined method `include?' for 2802:Integer
/var/www/redmine/plugins/issue_id/lib/issue_changeset_patch.rb:38:in `find_referenced_issue_by_id_with_full_id'
/var/www/redmine/app/models/changeset.rb:134:in `block (2 levels) in scan_comment_for_issue_ids'
/var/www/redmine/app/models/changeset.rb:133:in `each'
/var/www/redmine/app/models/changeset.rb:133:in `block in scan_comment_for_issue_ids'
/var/www/redmine/app/models/changeset.rb:129:in `scan'
/var/www/redmine/app/models/changeset.rb:129:in `scan_comment_for_issue_ids'
/var/www/redmine/plugins/issue_id/lib/issue_changeset_patch.rb:77:in `scan_comment_for_issue_ids_with_full_ids'
/var/www/redmine/plugins/redmine_code_review/lib/code_review_changeset_patch.rb:167:in `scan_comment_for_issue_ids_with_code_review'
/var/www/redmine/app/models/changeset.rb:102:in `scan_for_issues'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:432:in `block in make_lambda'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:228:in `block in halting_and_conditional'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:506:in `block in call'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:506:in `each'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:506:in `call'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_create_callbacks'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/callbacks.rb:306:in `_create_record'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/timestamp.rb:57:in `_create_record'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/persistence.rb:504:in `create_or_update'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/callbacks.rb:302:in `block in create_or_update'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_save_callbacks'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/callbacks.rb:302:in `create_or_update'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/persistence.rb:120:in `save'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/validations.rb:37:in `save'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:286:in `block (2 levels) in save'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:220:in `transaction'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:286:in `block in save'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:285:in `save'
/usr/local/rvm/gems/ruby-2.4.1/gems/protected_attributes-1.1.4/lib/active_record/mass_assignment_security/persistence.rb:46:in `create'
/var/www/redmine/app/models/repository/subversion.rb:72:in `block (2 levels) in fetch_changesets'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:220:in `transaction'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/transactions.rb:277:in `transaction'
/var/www/redmine/app/models/repository/subversion.rb:71:in `block in fetch_changesets'
/var/www/redmine/app/models/repository/subversion.rb:70:in `reverse_each'
/var/www/redmine/app/models/repository/subversion.rb:70:in `fetch_changesets'
/var/www/redmine/app/models/repository.rb:346:in `block (2 levels) in fetch_changesets'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:46:in `each'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:46:in `each'
/var/www/redmine/app/models/repository.rb:344:in `block in fetch_changesets'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:46:in `each'
/usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-4.2.8/lib/active_record/relation/delegation.rb:46:in `each'

I have patched this with

if id.present? && id.to_s.include?('-')

and bypassed this issue.

However, our programmers don’t always write uppercase, we need to change issue_changeset_patch.rb(17)!:

ISSUE_ID_RE = %r{[A-Za-z][a-zA-Z0-9]*-\d+}

Also available in: Atom PDF

Terms of use | Privacy policy