aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bugzilla.rb')
-rw-r--r--bugzilla.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/bugzilla.rb b/bugzilla.rb
index 60cfd97..49b74af 100644
--- a/bugzilla.rb
+++ b/bugzilla.rb
@@ -43,7 +43,7 @@ VALID_RESO = ['FIXED', 'INVALID', 'WONTFIX', 'LATER', 'REMIND', 'DUPLICATE', 'W
# Each zilla instance may have these parameters
# TODO: Add 'nicename' that is used for output to IRC. Defaults to name.capitialize
-OPTIONS = [ 'name', 'baseurl', 'dataurl', 'showbugurl', 'reporturl' ]
+OPTIONS = [ 'name', 'baseurl', 'dataurl', 'showbugurl', 'reporturl', 'buglisturl' ]
# Now life gets fun, these are regular expresses to check the above arrays
_STATUS_INPUT = (DONE_STATUS+OPEN_STATUS+['ALL']).uniq.join('|')
@@ -193,6 +193,20 @@ class BugzillaPlugin < Plugin
@reporturl = @registry["zilla.#{name}.reporturl"] = val
end
+ def buglisturl
+ @buglisturl = @registry["zilla.#{name}.buglisturl"] unless @buglisturl
+
+ unless @buglisturl
+ guess_buglisturl
+ end
+
+ return @buglisturl
+ end
+
+ def buglisturl=(val)
+ @buglisturl = @registry["zilla.#{name}.buglisturl"] = val
+ end
+
def lastseenid
return @registry["zilla.#{name}.lastseenid"]
end
@@ -280,6 +294,11 @@ class BugzillaPlugin < Plugin
@reporturl = "#{baseurl}/report.cgi?action=wrap&ctype=csv&format=table"
end
+ # Guess at the default URL to use for generating CSV output for a search
+ def guess_buglisturl
+ @buglisturl = "#{baseurl}/buglist.cgi?ctype=csv&order=bugs.bug_id"
+ end
+
# Deletes the client object if any
def delete_client
# TODO: httpclient does not seem to provide a way to close the