"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/models/time_entry_import.rb" between
redmine-4.1.0.tar.gz and redmine-4.1.1.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

time_entry_import.rb  (redmine-4.1.0):time_entry_import.rb  (redmine-4.1.1)
skipping to change at line 88 skipping to change at line 88
object.author = user object.author = user
activity_id = nil activity_id = nil
if activity if activity
activity_id = activity.id activity_id = activity.id
elsif activity_name = row_value(row, 'activity') elsif activity_name = row_value(row, 'activity')
activity_id = allowed_target_activities.named(activity_name).first.try(:id ) activity_id = allowed_target_activities.named(activity_name).first.try(:id )
end end
user_id = nil user_id = nil
if User.current.allowed_to?(:log_time_for_other_users, project) if user.allowed_to?(:log_time_for_other_users, project)
if user_value if user_value
user_id = user_value user_id = user_value
elsif user_name = row_value(row, 'user_id') elsif user_name = row_value(row, 'user_id')
user_id = Principal.detect_by_keyword(allowed_target_users, user_name).t ry(:id) user_id = Principal.detect_by_keyword(allowed_target_users, user_name).t ry(:id)
end end
else else
user_id = user.id user_id = user.id
end end
attributes = { attributes = {
:project_id => project.id, :project_id => project.id,
:activity_id => activity_id, :activity_id => activity_id,
:author_id => user.id,
:user_id => user_id, :user_id => user_id,
:issue_id => row_value(row, 'issue_id'), :issue_id => row_value(row, 'issue_id'),
:spent_on => row_date(row, 'spent_on'), :spent_on => row_date(row, 'spent_on'),
:hours => row_value(row, 'hours'), :hours => row_value(row, 'hours'),
:comments => row_value(row, 'comments') :comments => row_value(row, 'comments')
} }
attributes['custom_field_values'] = object.custom_field_values.inject({}) do |h, v| attributes['custom_field_values'] = object.custom_field_values.inject({}) do |h, v|
value = value =
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)