Feature #27821 » 27821.patch
| app/models/time_entry_query.rb | ||
|---|---|---|
|
:name => l("label_attribute_of_issue", :name => l(:field_category)),
|
||
|
:values => lambda {project.issue_categories.collect{|s| [s.name, s.id.to_s]}}
|
||
|
) if project
|
||
|
add_available_filter(
|
||
|
"issue.subject",
|
||
|
:type => :text,
|
||
|
:name => l("label_attribute_of_issue", :name => l(:field_subject))
|
||
|
)
|
||
|
add_available_filter(
|
||
|
"user_id",
|
||
|
:type => :list_optional, :values => lambda {author_values}
|
||
| ... | ... | |
|
sql_for_field("category_id", operator, value, Issue.table_name, "category_id")
|
||
|
end
|
||
|
def sql_for_issue_subject_field(field, operator, value)
|
||
|
sql_for_field("subject", operator, value, Issue.table_name, "subject")
|
||
|
end
|
||
|
def sql_for_project_status_field(field, operator, value, options={})
|
||
|
sql_for_field(field, operator, value, Project.table_name, "status")
|
||
|
end
|
||
| test/functional/timelog_controller_test.rb | ||
|---|---|---|
|
assert_equal [entry].map(&:id).map(&:to_s), css_select('input[name="ids[]"]').map {|e| e.attr(:value)}
|
||
|
end
|
||
|
def text_index_with_issue_subject_filter
|
||
|
get(
|
||
|
:index,
|
||
|
:params => {
|
||
|
:f => ['issue.subject'],
|
||
|
:op => {'issue.subject' => '~'},
|
||
|
:v => {'issue.subject' => ['"updating a recipe"']}
|
||
|
}
|
||
|
)
|
||
|
assert_response :success
|
||
|
assert_equal [3], css_select('input[name="ids[]"]').map {|e| e.attr(:value)}
|
||
|
end
|
||
|
def test_index_with_project_status_filter
|
||
|
project = Project.find(3)
|
||
|
project.close
|
||
- « Previous
- 1
- 2
- 3
- Next »