ABOUT¶ ↑
This is a Ruby script that uses SOAP to retrieve issues from the JBoss JIRA
instance and pumps them into a customizable ERB template. Right now it is hardcoded to issues.jboss.org … I really need to look into dynamic creation of the SOAP stubs etc.
TESTED ON¶ ↑
-
Ruby 1.8.7 on Mac OSX v10.6, v10.7, v10.8.
-
Ruby 1.8.6 on Fedora 13 64bit
DOES NOT WORK ON RUBY 1.9.X
INSTALLING¶ ↑
-
Ensure Ruby and RubyGems are installed
-
On Fedora installing RubyGems will install Ruby as a dependency:
[localhost ]$ sudo yum install rubygems
-
Install JOT:
[localhost ]$ sudo gem install JOT
RUNNING¶ ↑
Run JOT
and specify arguments as required. Not rocket science.
JOT [options] -s, --security Retrieve security levels. Slow, dont do it unless necessary -t, --template FILE template to use -u, --username USERNAME JIRA username -p, --password PASSWORD JIRA password -f, --filter FILTER JIRA filter -h, --help Display this screen
E.g. : [localhost]$ JOT -u joe -p jf84hjf -f "Unresolved JIRAs for 4.8" -t overdue_issues_report.erb
The error handling for the parameters is pretty terrible right now.
You need to supply:
-
-u
and-p
for your username and password to authenticate -
-f
to specify the filter that you are retrieving the list of issues from -
-t
to specify the template that is to be used to format the output
The only optional parameters right now are -h
and -s
.
-
-h
displays the help and exits. -
-s forces it to retrieve the security level information for each issue as well, this is much slower and shouldn't be used unless you need that information.
Currently you can only retrieve data based on a filter that you have “favorited” in JIRA
, so you must be authenticated.
An example template, example.erb
, is included. This template is an example of producing a Docbook XML variablelist from some custom fields. Currently this template assumes that the security level information has been requested and produces slightly weird output if you haven't specified -s
.
CREATING CUSTOM TEMPLATES¶ ↑
Different templates can be supplied using the -t
parameter. These templates must be written in Embedded Ruby, see en.wikipedia.org/wiki/ERuby. I hope to be adding more example files in the future.
Note that although the wikipedia page talks about Embedded Ruby in the specific context of generating HTML output this is not a limitation. The template doesn't care about anything outside of the <%
%>
tags. It could be used to produce HTML, XML, CSV or any other text based format you want.