Feature #43997 » 0001-Add-setting-to-always-include-issue-authors-in-assig.patch
| app/models/issue.rb | ||
|---|---|---|
|
return [] if project.nil?
|
||
|
users = project.assignable_users(tracker).to_a
|
||
|
users << author if author && author.active?
|
||
|
if Setting.always_include_issue_author_in_assignee_list? && author&.active?
|
||
|
users << author
|
||
|
end
|
||
|
if assigned_to_id_was.present? && assignee = Principal.find_by_id(assigned_to_id_was)
|
||
|
users << assignee
|
||
|
end
|
||
| app/views/settings/_issues.html.erb | ||
|---|---|---|
|
<p><%= setting_check_box :issue_group_assignment %></p>
|
||
|
<p><%= setting_check_box :always_include_issue_author_in_assignee_list %></p>
|
||
|
<p><%= setting_check_box :default_issue_start_date_to_creation_date %></p>
|
||
|
<p><%= setting_check_box :display_subprojects_issues %></p>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
|
||
|
setting_gantt_months_limit: Maximum number of months displayed on the gantt chart
|
||
|
setting_issue_group_assignment: Allow issue assignment to groups
|
||
|
setting_always_include_issue_author_in_assignee_list: Always show issue authors in the assignee list
|
||
|
setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues
|
||
|
setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
|
||
|
setting_unsubscribe: Allow users to delete their own account
|
||
| config/settings.yml | ||
|---|---|---|
|
default: 1
|
||
|
issue_group_assignment:
|
||
|
default: 0
|
||
|
always_include_issue_author_in_assignee_list:
|
||
|
default: 1
|
||
|
default_issue_start_date_to_creation_date:
|
||
|
default: 0
|
||
|
notified_events:
|
||
| test/unit/issue_test.rb | ||
|---|---|---|
|
assert issue.assignable_users.include?(non_project_member)
|
||
|
end
|
||
|
test "#assignable_users should not include non member author when disabled by settings" do
|
||
|
non_project_member = User.generate!
|
||
|
issue = Issue.generate!(:author => non_project_member)
|
||
|
with_settings :always_include_issue_author_in_assignee_list => '0' do
|
||
|
assert_not_include non_project_member, issue.assignable_users
|
||
|
end
|
||
|
end
|
||
|
def test_assignable_users_should_not_include_anonymous_user
|
||
|
issue = Issue.generate!(:author => User.anonymous)
|
||