ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Changeset find_commiter_user (Bug #956)


Added by Robert Mitwicki at 2012-03-27 12:22 pm. Updated at 2012-05-19 05:41 pm.


Status:Open Start date:2012-03-27
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Remote issue URL: Affected version:

Description

What steps will reproduce the problem?
1. Add user with first name: John
2. Add user with login: john
3. run test: test_auto_user_mapping_by_email(RepositoryTest) [test/unit/repository_test.rb:153]

What is the expected output?
Pass test

What do you see instead?
Test fail

I think it happen because of those lines (app/models/repository.rb):

187       elsif committer.strip =~ /^([^<]+)(<(.*)>)?$/
188         username, email = $1.strip, $3
189         u = User.find_by_login(username)
190         u ||= User.find_by_mail(email) unless email.blank?
191         user = u

and wrong commiterr value, which is: 'john <>'
as I understand that, the test have just wrong value (because before email should be not username but login) and after adding user with the same login it just can't find proper user.

If someone can confirm that I can prepare a patch to fix that.


Associated revisions

Revision cd64338a
Added by Jean-Philippe Lang at 2008-03-30 10:19 am

Fixed: Priorities not ordered when displayed as a filter in issue list (#956).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1309 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Updated by Felix Schäfer at 2012-05-19 05:41 pm

Tests should be run with RAILS_ENV=test, esp. with a clean database.

Also available in: Atom PDF