diff options
-rw-r--r-- | bugzilla.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bugzilla.rb b/bugzilla.rb index 76380f9..e2c6c7e 100644 --- a/bugzilla.rb +++ b/bugzilla.rb @@ -393,16 +393,14 @@ class BugzillaPlugin < Plugin def announce return unless @registry["zilla.#{@name}.announcements"] - - recent_url = buglisturl - + recent_url = nil if lastseenid == nil - recent_url += "&chfieldfrom=-6h&chfieldto=Now&chfield=%5BBug+creation%5D" + recent_url = "chfieldfrom=-6h&chfieldto=Now&chfield=%5BBug+creation%5D" else - recent_url += "&field0-0-0=bug_id&remaction=&type0-0-0=greaterthan&value0-0-0=#{lastseenid}" + recent_url = "field0-0-0=bug_id&remaction=&type0-0-0=greaterthan&value0-0-0=#{lastseenid}" end - buglist = CSV::Reader.create(@bot.httputil.get(recent_url)).to_a + buglist = search(recent_url) buglist.delete_at(0) upper_bound = [buglist.size, 5].min buglist[-upper_bound..-1].each do |bug| @@ -417,7 +415,7 @@ class BugzillaPlugin < Plugin end def search(urlparams, params = nil) - url = buglisturl + urlparams + url = buglisturl + '&' + urlparams searchdata = CSV::Reader.create(@bot.httputil.get(url)).to_a return searchdata end |