Project

General

Profile

Feature #43997 ยป 0001-Add-setting-to-always-include-issue-authors-in-assig.patch

Go MAEDA, 2026-04-27 06:27

View differences:

app/models/issue.rb
1017 1017
    return [] if project.nil?
1018 1018

  
1019 1019
    users = project.assignable_users(tracker).to_a
1020
    users << author if author && author.active?
1020
    if Setting.always_include_issue_author_in_assignee_list? && author&.active?
1021
      users << author
1022
    end
1021 1023
    if assigned_to_id_was.present? && assignee = Principal.find_by_id(assigned_to_id_was)
1022 1024
      users << assignee
1023 1025
    end
app/views/settings/_issues.html.erb
13 13

  
14 14
<p><%= setting_check_box :issue_group_assignment %></p>
15 15

  
16
<p><%= setting_check_box :always_include_issue_author_in_assignee_list %></p>
17

  
16 18
<p><%= setting_check_box :default_issue_start_date_to_creation_date %></p>
17 19

  
18 20
<p><%= setting_check_box :display_subprojects_issues %></p>
config/locales/en.yml
497 497
  setting_gantt_items_limit: Maximum number of items displayed on the gantt chart
498 498
  setting_gantt_months_limit: Maximum number of months displayed on the gantt chart
499 499
  setting_issue_group_assignment: Allow issue assignment to groups
500
  setting_always_include_issue_author_in_assignee_list: Always show issue authors in the assignee list
500 501
  setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues
501 502
  setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
502 503
  setting_unsubscribe: Allow users to delete their own account
config/settings.yml
196 196
  default: 1
197 197
issue_group_assignment:
198 198
  default: 0
199
always_include_issue_author_in_assignee_list:
200
  default: 1
199 201
default_issue_start_date_to_creation_date:
200 202
  default: 0
201 203
notified_events:
test/unit/issue_test.rb
2685 2685
    assert issue.assignable_users.include?(non_project_member)
2686 2686
  end
2687 2687

  
2688
  test "#assignable_users should not include non member author when disabled by settings" do
2689
    non_project_member = User.generate!
2690
    issue = Issue.generate!(:author => non_project_member)
2691

  
2692
    with_settings :always_include_issue_author_in_assignee_list => '0' do
2693
      assert_not_include non_project_member, issue.assignable_users
2694
    end
2695
  end
2696

  
2688 2697
  def test_assignable_users_should_not_include_anonymous_user
2689 2698
    issue = Issue.generate!(:author => User.anonymous)
2690 2699

  
    (1-1/1)