Skip to content
Snippets Groups Projects
Commit 32fa1a4e authored by Jean-Philippe Lang's avatar Jean-Philippe Lang
Browse files

Do not silently ignore timelog validation failure on issue edit.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1603 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1424b0f2
No related merge requests found
......@@ -175,7 +175,7 @@ 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)}
if @issue.save
if (@time_entry.hours.nil? || @time_entry.valid?) && @issue.save
# Log spend time
if current_role.allowed_to?(:log_time)
@time_entry.save
......
......@@ -4,6 +4,7 @@
:class => nil,
:multipart => true} do |f| %>
<%= error_messages_for 'issue' %>
<%= error_messages_for 'time_entry' %>
<div class="box">
<% if @edit_allowed || !@allowed_statuses.empty? %>
<fieldset class="tabular"><legend><%= l(:label_change_properties) %>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment