# sort by id so that limited eager loading doesn't break with postgresql
:order_column => "#{table_name}.id"
acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id}: #{o.subject}"},
- :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}}
+ :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}},
+ :type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }
acts_as_activity_provider :find_options => {:include => [:project, :author, :tracker]},
:author_key => :author_id
div#activity dd span.description, #search-results dd span.description { display:block; }
#search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }
+
div#search-results-counts {float:right;}
div#search-results-counts ul { margin-top: 0.5em; }
div#search-results-counts li { list-style-type:none; float: left; margin-left: 1em; }
dt.document { background-image: url(../images/document.png); }
dt.project { background-image: url(../images/projects.png); }
+#search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }
+
div#roadmap fieldset.related-issues { margin-bottom: 1em; }
div#roadmap fieldset.related-issues ul { margin-top: 0.3em; margin-bottom: 0.3em; }
div#roadmap .wiki h1:first-child { display: none; }
start_date: <%= 10.days.ago.to_s(:db) %>\r
due_date: <%= Date.today.to_s(:db) %>\r
lock_version: 0\r
+issues_008: \r
+ created_on: <%= 10.days.ago.to_date.to_s(:db) %>\r
+ project_id: 1\r
+ updated_on: <%= 10.days.ago.to_date.to_s(:db) %>\r
+ priority_id: 3\r
+ subject: Closed issue\r
+ id: 8\r
+ fixed_version_id: \r
+ category_id: \r
+ description: This is a closed issue.\r
+ tracker_id: 1\r
+ assigned_to_id: \r
+ author_id: 2\r
+ status_id: 5\r
+ start_date: \r
+ due_date: \r
+ lock_version: 0\r
\ No newline at end of file
assert_tag :a, :content => 'Changesets (4)'
end
+ def test_search_issues
+ get :index, :q => 'issue', :issues => 1
+ assert_response :success
+ assert_template 'index'
+
+ assert assigns(:results).include?(Issue.find(8))
+ assert assigns(:results).include?(Issue.find(5))
+ assert_tag :dt, :attributes => { :class => /issue closed/ },
+ :child => { :tag => 'a', :content => /Closed/ }
+ end
+
def test_search_project_and_subprojects
get :index, :id => 1, :q => 'recipe subproject', :scope => 'subprojects', :submit => 'Search'
assert_response :success