diff --git a/app/helpers/contracts_helper.rb b/app/helpers/contracts_helper.rb
index 318d857..4e0d237 100644
--- a/app/helpers/contracts_helper.rb
+++ b/app/helpers/contracts_helper.rb
@@ -143,4 +143,19 @@ module ContractsHelper
end
end
+
+ def link_to_issue_list_with_filter(text, options={})
+ deliverable_id = options[:deliverable_id] || '*'
+ status_id = options[:status_id] || '*'
+
+ link_to(h(text), {
+ :controller => 'issues',
+ :action => 'index',
+ :project_id => @project,
+ :set_filter => 't',
+ :status_id => status_id,
+ :deliverable_id => deliverable_id
+ })
+
+ end
end
diff --git a/app/views/deliverables/_details_row.html.erb b/app/views/deliverables/_details_row.html.erb
index fe2015f..ae6a025 100644
--- a/app/views/deliverables/_details_row.html.erb
+++ b/app/views/deliverables/_details_row.html.erb
@@ -117,13 +117,27 @@
<% deliverable.issues_by_status.each do |status, issues| %>
- | <%= h(status.name) %> |
- <%= h(issues.length) %> |
+
+ <%= link_to_issue_list_with_filter(status.name,
+ :deliverable_id => deliverable.id,
+ :status_id => status.id) %>
+ |
+
+ <%= link_to_issue_list_with_filter(issues.length,
+ :deliverable_id => deliverable.id,
+ :status_id => status.id) %>
+ |
<% end %>
- | <%= l(:label_all).capitalize %> |
- <%= deliverable.issues.count %> |
+
+ <%= link_to_issue_list_with_filter(l(:label_all).capitalize,
+ :deliverable_id => deliverable.id) %>
+ |
+
+ <%= link_to_issue_list_with_filter(deliverable.issues.count,
+ :deliverable_id => deliverable.id) %>
+ |
diff --git a/test/integration/contracts_show_test.rb b/test/integration/contracts_show_test.rb
index 3085ac4..a019f32 100644
--- a/test/integration/contracts_show_test.rb
+++ b/test/integration/contracts_show_test.rb
@@ -413,16 +413,16 @@ class ContractsShowTest < ActionController::IntegrationTest
visit_contract_page(@contract)
assert_select "table#deliverables" do
assert_select "tr" do
- assert_select "td", :text => /#{@status1}/
- assert_select "td.number", :text => /3/
+ assert_select "td a", :text => /#{@status1}/
+ assert_select "td.number a", :text => /3/
end
assert_select "tr" do
- assert_select "td", :text => /#{@status2}/
- assert_select "td.number", :text => /1/
+ assert_select "td a", :text => /#{@status2}/
+ assert_select "td.number a", :text => /1/
end
assert_select "tr" do
- assert_select "td strong", "All"
- assert_select "td.number", :text => /4/
+ assert_select "td strong a", "All"
+ assert_select "td.number a", :text => /4/
end
end
end