Skip to content

Commit 0f2378c

Browse files
committed
Reverts r21958 and r21959 (#1739).
git-svn-id: https://svn.redmine.org/redmine/trunk@21960 e93f8b46-1217-0410-a6f0-8f06a7374b81
1 parent 44c72fe commit 0f2378c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3
-200
lines changed

app/helpers/issues_helper.rb

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def show_detail(detail, no_html=false, options={})
534534
old_value = format_date(detail.old_value.to_date) if detail.old_value
535535

536536
when 'project_id', 'status_id', 'tracker_id', 'assigned_to_id',
537-
'priority_id', 'category_id', 'fixed_version_id', 'author_id'
537+
'priority_id', 'category_id', 'fixed_version_id'
538538
value = find_name_by_reflection(field, detail.value)
539539
old_value = find_name_by_reflection(field, detail.old_value)
540540

@@ -778,23 +778,4 @@ def projects_for_select(issue)
778778
projects
779779
end
780780
end
781-
782-
def author_options_for_select(issue, project)
783-
users = issue.assignable_users.select {|m| m.is_a?(User) && m.allowed_to?(:add_issues, project) }
784-
785-
if issue.new_record?
786-
if users.include?(User.current)
787-
principals_options_for_select(users, issue.author)
788-
else
789-
principals_options_for_select([User.current] + users)
790-
end
791-
elsif issue.persisted?
792-
if users.include?(issue.author)
793-
principals_options_for_select(users, issue.author)
794-
else
795-
author_principal = Principal.find(issue.author_id)
796-
principals_options_for_select([author_principal] + users, author_principal)
797-
end
798-
end
799-
end
800781
end

app/models/issue.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ class Issue < ActiveRecord::Base
111111
before_validation :clear_disabled_fields
112112
before_save :close_duplicates, :update_done_ratio_from_issue_status,
113113
:force_updated_on_change, :update_closed_on
114-
before_create :set_author_journal
115114
after_save do |issue|
116115
if !issue.saved_change_to_id? && issue.saved_change_to_project_id?
117116
issue.send :after_project_change
@@ -520,9 +519,6 @@ def estimated_hours=(h)
520519
safe_attributes(
521520
'deleted_attachment_ids',
522521
:if => lambda {|issue, user| issue.attachments_deletable?(user)})
523-
safe_attributes(
524-
'author_id',
525-
:if => lambda {|issue, user| user.allowed_to?(:change_issue_author, issue.project)})
526522

527523
def safe_attribute_names(user=nil)
528524
names = super
@@ -2024,14 +2020,6 @@ def create_parent_issue_journal
20242020
end
20252021
end
20262022

2027-
def set_author_journal
2028-
return unless new_record?
2029-
return unless self.author.present? && User.current.present? && self.author != User.current
2030-
2031-
self.init_journal(User.current)
2032-
self.current_journal.__send__(:add_attribute_detail, 'author_id', User.current.id, self.author.id)
2033-
end
2034-
20352023
def send_notification
20362024
if notify? && Setting.notified_events.include?('issue_added')
20372025
Mailer.deliver_issue_add(self)

app/views/issues/_attributes.html.erb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
<div class="splitcontent">
44
<div class="splitcontentleft">
55
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
6-
<% if User.current.allowed_to?(:change_issue_author, @project) %>
7-
<p><%= f.select :author_id, author_options_for_select(@issue, @project), :include_blank => false, :required => true %></p>
8-
<% end %>
96
<p>
107
<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
118
:onchange => "updateIssueFrom('#{escape_javascript(update_issue_form_path(@project, @issue))}', this)" %>

config/locales/ar.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,4 +1478,3 @@ ar:
14781478
all references to them. This cannot be undone. Often, locking users instead of deleting
14791479
them is the better solution.
14801480
text_users_bulk_destroy_confirm: To confirm, please enter "%{yes}" below.
1481-
permission_change_issue_author: Change issue author

config/locales/az.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1570,4 +1570,3 @@ az:
15701570
all references to them. This cannot be undone. Often, locking users instead of deleting
15711571
them is the better solution.
15721572
text_users_bulk_destroy_confirm: To confirm, please enter "%{yes}" below.
1573-
permission_change_issue_author: Change issue author

config/locales/bg.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,4 +1426,3 @@ bg:
14261426
all references to them. This cannot be undone. Often, locking users instead of deleting
14271427
them is the better solution.
14281428
text_users_bulk_destroy_confirm: To confirm, please enter "%{yes}" below.
1429-
permission_change_issue_author: Change issue author

config/locales/bs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,4 +1491,3 @@ bs:
14911491
all references to them. This cannot be undone. Often, locking users instead of deleting
14921492
them is the better solution.
14931493
text_users_bulk_destroy_confirm: To confirm, please enter "%{yes}" below.
1494-
permission_change_issue_author: Change issue author

config/locales/ca.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,4 +1468,3 @@ ca:
14681468
all references to them. This cannot be undone. Often, locking users instead of deleting
14691469
them is the better solution.
14701470
text_users_bulk_destroy_confirm: To confirm, please enter "%{yes}" below.
1471-
permission_change_issue_author: Change issue author

config/locales/cs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,4 +1461,3 @@ cs:
14611461
all references to them. This cannot be undone. Often, locking users instead of deleting
14621462
them is the better solution.
14631463
text_users_bulk_destroy_confirm: To confirm, please enter "%{yes}" below.
1464-
permission_change_issue_author: Change issue author

config/locales/da.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,4 +1495,3 @@ da:
14951495
all references to them. This cannot be undone. Often, locking users instead of deleting
14961496
them is the better solution.
14971497
text_users_bulk_destroy_confirm: To confirm, please enter "%{yes}" below.
1498-
permission_change_issue_author: Change issue author

0 commit comments

Comments
 (0)