Browse Source

Adds an option to view issues count by status on the version page (#7921).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5179 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/1.2.0
Jean-Philippe Lang 13 years ago
parent
commit
e1ae0e9777
2 changed files with 12 additions and 6 deletions
  1. 3
    3
      app/helpers/versions_helper.rb
  2. 9
    3
      test/functional/versions_controller_test.rb

+ 3
- 3
app/helpers/versions_helper.rb View File

# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License


module VersionsHelper module VersionsHelper


STATUS_BY_CRITERIAS = %w(category tracker priority author assigned_to)
STATUS_BY_CRITERIAS = %w(category tracker status priority author assigned_to)
def render_issue_status_by(version, criteria) def render_issue_status_by(version, criteria)
criteria ||= 'category' criteria ||= 'category'

+ 9
- 3
test/functional/versions_controller_test.rb View File

# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
class VersionsController; def rescue_action(e) raise e end; end class VersionsController; def rescue_action(e) raise e end; end


class VersionsControllerTest < ActionController::TestCase class VersionsControllerTest < ActionController::TestCase
fixtures :projects, :versions, :issues, :users, :roles, :members, :member_roles, :enabled_modules
fixtures :projects, :versions, :issues, :users, :roles, :members, :member_roles, :enabled_modules, :issue_statuses
def setup def setup
@controller = VersionsController.new @controller = VersionsController.new
assert_response :success assert_response :success
assert_template '_issue_counts' assert_template '_issue_counts'
end end
def test_issue_status_by_status
xhr :get, :status_by, :id => 2, :status_by => 'status'
assert_response :success
assert_template '_issue_counts'
end
end end

Loading…
Cancel
Save