"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/controllers/issues_controller.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.

issues_controller.rb  (redmine-4.1.0):issues_controller.rb  (redmine-4.1.1)
skipping to change at line 580 skipping to change at line 580
@allowed_statuses = @issue.new_statuses_allowed_to(User.current) @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
end end
# Saves @issue and a time_entry from the parameters # Saves @issue and a time_entry from the parameters
def save_issue_with_child_records def save_issue_with_child_records
Issue.transaction do Issue.transaction do
if params[:time_entry] && (params[:time_entry][:hours].present? || params[ :time_entry][:comments].present?) && User.current.allowed_to?(:log_time, @issue. project) if params[:time_entry] && (params[:time_entry][:hours].present? || params[ :time_entry][:comments].present?) && User.current.allowed_to?(:log_time, @issue. project)
time_entry = @time_entry || TimeEntry.new time_entry = @time_entry || TimeEntry.new
time_entry.project = @issue.project time_entry.project = @issue.project
time_entry.issue = @issue time_entry.issue = @issue
time_entry.author = User.current
time_entry.user = User.current time_entry.user = User.current
time_entry.spent_on = User.current.today time_entry.spent_on = User.current.today
time_entry.safe_attributes = params[:time_entry] time_entry.safe_attributes = params[:time_entry]
@issue.time_entries << time_entry @issue.time_entries << time_entry
end end
call_hook(:controller_issues_edit_before_save, { :params => params, :issue => @issue, :time_entry => time_entry, :journal => @issue.current_journal}) call_hook(:controller_issues_edit_before_save, { :params => params, :issue => @issue, :time_entry => time_entry, :journal => @issue.current_journal})
if @issue.save if @issue.save
call_hook(:controller_issues_edit_after_save, { :params => params, :issu e => @issue, :time_entry => time_entry, :journal => @issue.current_journal}) call_hook(:controller_issues_edit_after_save, { :params => params, :issu e => @issue, :time_entry => time_entry, :journal => @issue.current_journal})
else else
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

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