diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index e257f317b95aed424bc5b3155a818ff70b9a93bb..1dfcd726068801640e55c69076ffcd23bb29016c 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -31,7 +31,8 @@ .issue-labels - issue.labels.each do |label| - = render_colored_label(label) + = link_to project_issues_path(issue.project, label_name: label.name) do + = render_colored_label(label) .issue-actions - if can? current_user, :modify_issue, issue diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index fd0f5446b34a9cc9503be6847b594bfcfdb5b87d..41532fea7412c59f26594ce679f2675ab6bb304a 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -68,6 +68,7 @@ .issue-show-labels.pull-right - @issue.labels.each do |label| - = render_colored_label(label) + = link_to project_issues_path(@project, label_name: label.name) do + = render_colored_label(label) .voting_notes#notes= render "projects/notes/notes_with_form" diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index 06cf390fbde3028df28645fc5b94eabe7fc46e85..2649fb55c3027b145b44fee63e955cfa5bf984f7 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -34,4 +34,5 @@ .merge-request-labels - merge_request.labels.each do |label| - = render_colored_label(label) + = link_to project_merge_requests_path(merge_request.project, label_name: label.name) do + = render_colored_label(label) diff --git a/app/views/projects/merge_requests/show/_participants.html.haml b/app/views/projects/merge_requests/show/_participants.html.haml index 007c111f7fbaced358c2fc1b8bc875d22c6073f9..b709c89cec255e17e710b5aa1915fad1d3a64b99 100644 --- a/app/views/projects/merge_requests/show/_participants.html.haml +++ b/app/views/projects/merge_requests/show/_participants.html.haml @@ -5,4 +5,5 @@ .merge-request-show-labels.pull-right - @merge_request.labels.each do |label| - = render_colored_label(label) + = link_to project_merge_requests_path(@project, label_name: label.name) do + = render_colored_label(label) diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index e3001318c23aa6a8ce2b9ab08edf52d63a58908d..ae6a03ce865c3fadfb9319435af40609a5f5853c 100644 --- a/features/project/issues/issues.feature +++ b/features/project/issues/issues.feature @@ -119,3 +119,10 @@ Feature: Project Issues Given I click link "New Issue" And I submit new issue "500 error on profile" Then I should see issue "500 error on profile" + + Scenario: Clickable labels + Given issue 'Release 0.4' has label 'bug' + And I visit project "Shop" issues page + When I click label 'bug' + And I should see "Release 0.4" in issues + And I should not see "Tweet control" in issues diff --git a/features/project/issues/labels.feature b/features/project/issues/labels.feature index 77ee5d8a6868728fa8590b07dd36b9f24c1b838a..bdc1646ff129b8f1cb3bf73d337809efc6b37e80 100644 --- a/features/project/issues/labels.feature +++ b/features/project/issues/labels.feature @@ -45,4 +45,3 @@ Feature: Project Labels And I visit project "Forum" new label page When I submit new label 'bug' Then I should see label 'bug' - diff --git a/features/steps/project/issues.rb b/features/steps/project/issues.rb index 32a3a0d3f565577d79220faba6294234f3c6516e..65c243a7297c21507c84e24a60b8b2b1095f372e 100644 --- a/features/steps/project/issues.rb +++ b/features/steps/project/issues.rb @@ -218,6 +218,18 @@ class ProjectIssues < Spinach::FeatureSteps page.should_not have_content 'Bugfix1' end + step 'issue \'Release 0.4\' has label \'bug\'' do + label = project.labels.create!(name: 'bug', color: '#990000') + issue = Issue.find_by!(title: 'Release 0.4') + issue.labels << label + end + + step 'I click label \'bug\'' do + within ".issues-list" do + click_link 'bug' + end + end + def filter_issue(text) fill_in 'issue_search', with: text