diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-06-07 18:19:38 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-06-07 18:19:38 +0000 |
commit | 2b0569778fe375dba41e4d5a97916c83b371af44 (patch) | |
tree | 80589e8cbfaeda9877428b91c34687503271fd1d | |
parent | Make both copyright lines match. (diff) | |
download | rbot-bugzilla-2b0569778fe375dba41e4d5a97916c83b371af44.tar.gz rbot-bugzilla-2b0569778fe375dba41e4d5a97916c83b371af44.tar.bz2 rbot-bugzilla-2b0569778fe375dba41e4d5a97916c83b371af44.zip |
Add setting for the buglist.cgi URL.
-rw-r--r-- | bugzilla.rb | 21 |
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 |