From 5f9b1b0e0b3fa7cd7f8e32aa4d53f796d9b2c178 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 3 Dec 2008 23:18:07 +0000 Subject: [PATCH] Added :controller_issues_edit_before_save hook git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2086 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 156933d5d..0254a6d83 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -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) -- 2.39.5