mirror of
https://github.com/redmine/redmine.git
synced 2026-05-08 23:37:46 +02:00
Merged r14795 and r14796 (#21150).
git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14838 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -69,7 +69,7 @@ class TimeEntry < ActiveRecord::Base
|
||||
if attrs
|
||||
attrs = super(attrs)
|
||||
if issue_id_changed? && issue
|
||||
if user.allowed_to?(:log_time, issue.project)
|
||||
if issue.visible?(user) && user.allowed_to?(:log_time, issue.project)
|
||||
if attrs[:project_id].blank? && issue.project_id != project_id
|
||||
self.project_id = issue.project_id
|
||||
end
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
<% end %>
|
||||
<p>
|
||||
<%= f.text_field :issue_id, :size => 6 %>
|
||||
<span id="time_entry_issue"><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></span>
|
||||
<% if @time_entry.issue.try(:visible?) %>
|
||||
<span id="time_entry_issue"><%= "#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}" %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
|
||||
<p><%= f.text_field :hours, :size => 6, :required => true %></p>
|
||||
|
||||
Reference in New Issue
Block a user