mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 13:55:52 +01:00
Filter time entries after project status (#20081).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17608 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -986,6 +986,25 @@ class TimelogControllerTest < Redmine::ControllerTest
|
||||
assert_equal [entry].map(&:id).map(&:to_s), css_select('input[name="ids[]"]').map {|e| e.attr('value')}
|
||||
end
|
||||
|
||||
def test_index_with_project_status_filter
|
||||
project = Project.find(3)
|
||||
project.close
|
||||
project.save
|
||||
|
||||
get :index, :params => {
|
||||
:set_filter => 1,
|
||||
:f => ['project.status'],
|
||||
:op => {'project.status' => '='},
|
||||
:v => {'project.status' => ['1']}
|
||||
}
|
||||
|
||||
assert_response :success
|
||||
|
||||
time_entries = css_select('input[name="ids[]"]').map {|e| e.attr('value')}
|
||||
assert_include '1', time_entries
|
||||
assert_not_include '4', time_entries
|
||||
end
|
||||
|
||||
def test_index_with_issue_status_column
|
||||
issue = Issue.generate!(:project_id => 1, :tracker_id => 1, :status_id => 4)
|
||||
entry = TimeEntry.generate!(:issue => issue)
|
||||
|
||||
Reference in New Issue
Block a user