]> source.dussan.org Git - redmine.git/commitdiff
Added :controller_issues_edit_before_save hook
authorEric Davis <edavis@littlestreamsoftware.com>
Wed, 3 Dec 2008 23:18:07 +0000 (23:18 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Wed, 3 Dec 2008 23:18:07 +0000 (23:18 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2086 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 156933d5db585939bd4a182901d55d2ba9814c8d..0254a6d837f87e3ff8a7babe0b8f786c9960baa0 100644 (file)
@@ -176,6 +176,9 @@ class IssuesController < ApplicationController
       @time_entry.attributes = params[:time_entry]
       attachments = attach_files(@issue, params[:attachments])
       attachments.each {|a| journal.details << JournalDetail.new(:property => 'attachment', :prop_key => a.id, :value => a.filename)}
+      
+      call_hook(:controller_issues_edit_before_save, { :params => params, :issue => @issue, :time_entry => @time_entry, :journal => journal})
+
       if (@time_entry.hours.nil? || @time_entry.valid?) && @issue.save
         # Log spend time
         if current_role.allowed_to?(:log_time)