<th><%= t ".reported_user" %></th>
<th class="reporting_users"><%= t ".reporting_users" %></th>
<th><%= t ".last_updated" %></th>
+ <th><%= t ".last_managed" %></th>
</tr>
</thead>
<tbody>
<%= render :partial => "issues/reporters/reporters", :locals => { :issue => issue } %>
</td>
<td>
- <% if issue.user_updated %>
- <%= t ".last_updated_time_ago_user_html", :user => link_to(issue.user_updated.display_name, issue.user_updated),
- :time_ago => friendly_date_ago(issue.updated_at) %>
- <% else %>
- <%= friendly_date_ago(issue.updated_at) %>
- <% end %>
+ <%= friendly_date_ago(issue.updated_at) %>
+ </td>
+ <td>
+ <%= link_to(issue.user_updated.display_name, issue.user_updated) if issue.user_updated %>
</td>
</tr>
<% end %>
</div>
<div class="mb-3 col-md-auto">
<%= select_tag :last_updated_by,
- options_for_select(@users.all.collect { |f| [f.display_name, f.id] } << [t(".not_updated"), "nil"], params[:last_updated_by]),
- :include_blank => t(".select_last_updated_by"),
+ options_for_select(@users.all.collect { |f| [f.display_name, f.id] } << [t(".not_managed"), "nil"], params[:last_updated_by]),
+ :include_blank => t(".select_last_managed_by"),
:data => { :behavior => "category_dropdown" },
:class => "form-select" %>
</div>
title: Issues
select_status: Select Status
select_type: Select Type
- select_last_updated_by: Select Last Updated By
+ select_last_managed_by: Select Last Managed By
reported_user: Reported User
- not_updated: Not Updated
+ not_managed: Not Managed
search: Search
search_guidance: "Search Issues:"
states:
status: Status
reports: Reports
last_updated: Last Updated
- last_updated_time_ago_user_html: "%{time_ago} by %{user}"
+ last_managed: Last Managed
reporting_users: Reporting Users
reports_count:
one: "%{count} Report"
assert_no_content issue.reports[n].user.display_name
end
end
+
+ def test_view_managed_issue
+ issue = create(:issue, :assigned_role => "moderator")
+ issue.reports << create(:report)
+ moderator_user = create(:moderator_user)
+
+ sign_in_as(moderator_user)
+ visit issues_path
+
+ within_content_body do
+ assert_no_link moderator_user.display_name
+
+ click_on "1 Report"
+ end
+
+ within_content_heading do
+ assert_content "Open Issue ##{issue.id}"
+
+ click_on "Resolve"
+
+ assert_content "Resolved Issue ##{issue.id}"
+ end
+
+ visit issues_path
+
+ within_content_body do
+ assert_link moderator_user.display_name
+ end
+ end
end