Project

General

Profile

Patch #17900 ยป patch_time_entry_edit_on_update_issues-git.diff

Tieu-Philippe Khim, 2014-09-17 16:33

View differences:

app/controllers/issues_controller.rb
471 471
        time_entry.user = User.current
472 472
        time_entry.spent_on = User.current.today
473 473
        time_entry.attributes = params[:time_entry]
474
        @issue.time_entries << time_entry
475 474
      end
476 475

  
477 476
      call_hook(:controller_issues_edit_before_save, { :params => params, :issue => @issue, :time_entry => time_entry, :journal => @issue.current_journal})
477
      @issue.time_entries << time_entry if time_entry
478 478
      if @issue.save
479 479
        call_hook(:controller_issues_edit_after_save, { :params => params, :issue => @issue, :time_entry => time_entry, :journal => @issue.current_journal})
480 480
      else
    (1-1/1)