Permalink
Browse files

Oops, seems we didn't have all items in the DB, that's what you get w…

…ith last-minute changes...
  • Loading branch information...
1 parent 4903a3d commit 519e71379f52ca692faebaaeac2d2ca643a328b9 @alloy alloy committed Dec 4, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/macruby_bugmash_bot/db.rb
@@ -80,7 +80,7 @@ def self.random_open_ticket
end
end
- OPEN_TICKETS_RSS_FEED = URI.parse("http://www.macruby.org/trac/query?status=new&status=reopened&format=rss&order=priority&col=id&col=summary&col=status&col=time&milestone=%21MacRuby+1.0&milestone=%21MacRuby+Later")
+ OPEN_TICKETS_RSS_FEED = URI.parse("http://www.macruby.org/trac/query?status=new&status=reopened&max=1000&format=rss&order=priority&col=id&col=summary&col=status&col=time&milestone=%21MacRuby+1.0&milestone=%21MacRuby+Later")
def self.raw_open_tickets_feed
Net::HTTP.get(OPEN_TICKETS_RSS_FEED)
@@ -102,7 +102,9 @@ def self.update_open_tickets!
rss.entries.each do |entry|
id = File.basename(entry[:link]).to_i
seen << id
- unless tickets.filter(:id => id).first
+ if tickets.filter(:id => id).first
+ tickets.filter(:id => id).update(:closed => false)
+ else
tickets.insert(:id => id, :link => entry[:link], :summary => CGI.unescapeHTML(entry[:title]), :marked_for_review => false, :closed => false)
end
end

0 comments on commit 519e713

Please sign in to comment.