fix-29406.diff

combined Pavel Rosick√Ĺ's three patches - Go MAEDA, 2018-12-02 02:17

Download (3.5 KB)

View differences:

app/controllers/files_controller.rb (working copy)
44 44
  end
45 45

  
46 46
  def new
47
    @versions = @project.versions.sort
47
    @versions = @project.versions.sorted
48 48
  end
49 49

  
50 50
  def create
app/controllers/projects_controller.rb (working copy)
176 176

  
177 177
    @version_status = params[:version_status] || 'open'
178 178
    @version_name = params[:version_name]
179
    @versions = @project.shared_versions.status(@version_status).like(@version_name)
179
    @versions = @project.shared_versions.status(@version_status).like(@version_name).sorted
180 180
  end
181 181

  
182 182
  def edit
app/controllers/reports_controller.rb (working copy)
21 21

  
22 22
  def issue_report
23 23
    @trackers = @project.rolled_up_trackers(false).visible
24
    @versions = @project.shared_versions.sort
24
    @versions = @project.shared_versions.sorted
25 25
    @priorities = IssuePriority.all.reverse
26 26
    @categories = @project.issue_categories
27
    @assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
28
    @authors = @project.users.sort
27
    @assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted
28
    @authors = @project.users.sorted
29 29
    @subprojects = @project.descendants.visible
30 30
    with_subprojects = Setting.display_subprojects_issues?
31 31
    @issues_by_tracker = Issue.by_tracker(@project, with_subprojects)
......
49 49
      @report_title = l(:field_tracker)
50 50
    when "version"
51 51
      @field = "fixed_version_id"
52
      @rows = @project.shared_versions.sort
52
      @rows = @project.shared_versions.sorted
53 53
      @data = Issue.by_version(@project, with_subprojects)
54 54
      @report_title = l(:field_version)
55 55
    when "priority"
......
64 64
      @report_title = l(:field_category)
65 65
    when "assigned_to"
66 66
      @field = "assigned_to_id"
67
      @rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
67
      @rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted
68 68
      @data = Issue.by_assigned_to(@project, with_subprojects)
69 69
      @report_title = l(:field_assigned_to)
70 70
    when "author"
71 71
      @field = "author_id"
72
      @rows = @project.users.sort
72
      @rows = @project.users.sorted
73 73
      @data = Issue.by_author(@project, with_subprojects)
74 74
      @report_title = l(:field_author)
75 75
    when "subproject"
app/views/projects/settings/_versions.html.erb (working copy)
32 32
    <th style="width:15%"></th>
33 33
    </tr></thead>
34 34
  <tbody>
35
<% @versions.sort.each do |version| %>
35
<% @versions.each do |version| %>
36 36
    <tr class="version <%=h version.status %> <%= 'shared' if version.project != @project %>">
37 37
    <td class="name <%= 'icon icon-shared' if version.project != @project %>"><%= link_to_version version %></td>
38 38
    <td class="tick"><%= checked_image(version.id == @project.default_version_id) %></td>