Contents
Welcome to Jira2SVN, this guide quickly runs through a typical installation. For more detailed instructions, please refer to the other documentation included with this product. For a Linux installation, simply replace all references to c:\Program Files with /opt (or /usr/local if you prefer) and use a terminal window where it refers to 'DOS' below.
Prerequisites
Before you start make sure you have the following setup and available:
- a JIRA Server that you can administer
a Subversion Server with authentication enabled
- at least one Client machine
- a machine to run the Jira2SVN Server (if desired, you can use the JIRA Server machine).
Request a License
Unpack the zip file on the machine that you are planning to use as the Jira2SVN Server and run the Clearvision\tools\get_license_info program in a DOS command window. Send the information requested to sales@clearvision-cm.com to apply for a license.
Linux prerequisites
The client executable uses GTK+ on linux, so you might need to install this, for example on CentOS 5 or RHEL 5:
yum install gtk+
(If you see an error with libgmodule.so missing while trying to run the client, then gtk+ is not installed on your system)
Setup Jira
Enable XML-RPC
Enable the XML-RPC remote JIRA API as per the instructions , in summary:
- go to System/Plugins in the Administration page and check that the RPC Jira Plugin is installed and that the 'System XML-RPC Services' are enabled
- go to Global Settings/General Configuration set 'Accept remote API calls' to 'ON'.
Create a Filter
Create a filter to get the list of Issues that a typical Jira2SVN user would be interested in. For example, all outstanding bugs or features for the 'Current User'. Make sure that this filter is usable by everyone who will use Jira2SVN (for example by 'sharing' the filter to everyone). Write down the id of the filter: a number like '10001'. You can find it at the end of the URL after creating a new filter, or when you view a filter (look in your browser's location bar and scroll right as far as you can go).
Add a custom field
- Add a custom field (Administration tab; Custom Fields; Add a custom field) with the following settings:
- type = Free Text Field
name = jira2svn (Note: this is case-sensitive, so must be in lower-case)
- applicable context = Any issue type; Global context (or wherever you want to use Jira2SVN if different).
Note the numerical part of it's id, something like 10010 (you'll see the id within the URL in your browser when you've created the field, eg fieldId=customfield_10010 or at the end of the URL when you edit the field).
- Associate the field to the Default Screen (or wherever you want to use Jira2SVN if different)
install the Jira2SVN Plugin
unpack the jira2svn zip file and copy the jira2svn.jar file from C:\Program Files\Clearvision\jira2svn\jira_plugin to your application server (eg WEB-INF\lib for tomcat)
copy the jira2svn.properties file from the same folder to your app server (eg WEB-INF\classes for tomcat)
Install & Configure Jira2SVN Server
On your Jira2SVN Server machine:
unpack the zip file into C:\Program Files.
edit Clearvision\jira2svn\server\jira2svn_server.cfg using Wordpad (not Notepad) and configure the following parameters with values according to your setup, eg for a filter id of 10010; a custom field with id 10020; and a JIRA server accessible at http://issues.mycompany.com:8080/ (
note that the http:// part is not included in the config file):
[JIRA] filter_id=10010 jira2svn_custom_field_id=10000 jira_server=issues.mycompany.com:8080 [License] company_name=Your Company Plc licence_email=admin@yourcompany.com expiry_date=2008-12-31 users=999 license_key=PLEASE_ADD_YOUR_LICENCE_key_HERE license_certificate=PLEASE_ADD_YOUR_LICENCE_certificate_HERE [Server] server_ip=192.168.1.2 server_port=54322
- open a DOS command window, go to the server directory, then start the server (make it executable first on Linux), eg:
cd c:\Program Files\Clearvision\jira2svn\server jira2svn_server.exe
check the JIRA2SVN.log file in the server directory for any errors (an empty file indicates no errors).
Install & Configure Jira2SVN Clients
On each of the machines that Jira2SVN users will be working:
unpack the zip file into C:\Program Files.
edit Clearvision\jira2svn\client\jira2svn_client.cfg and configure the following parameters with values according to your setup:
[JIRA] jira_uid=joe_bloggs jira_password=my_secret_password [Server] server_ip=192.168.1.2 server_port=54322
if your login id is different to your Subversion user id, also set svn_uid, eg:
[Options] svn_uid=joe_bloggs
open a DOS command window in the client directory and start the client (make it executable first on Linux), eg:
cd c:\Program Files\Clearvision\jira2svn\client jira2svn_client.exe
check the JIRA2SVN.log file in the client directory for any errors.
Install & Configure Subversion Hooks
On your Subversion Server machine:
unpack the zip file into C:\Program Files.
copy all of the files from Clearvision\jira2svn\subversion_hooks into the hooks directory of your Subversion server.
- on Linux, make all of the hook scripts executable (ie everything except the config file)
edit the config file (jira2svn_hook.cfg) that is in your Subversion hooks directory and configure the following parameters with values according to your setup, for example, if your Jira2SVN Server is at IP address 192.168.1.2 and is licensed for port 54322:
[Server] server_ip=192.168.1.2 server_port=54322
Test it!
Now that you have:
configured JIRA for Jira2SVN; installed the Jira2SVN plugin & restarted the server.
- started a Jira2SVN Server
- are running at least one Jira2SVN Client
- and have installed all of the Jira2SVN hook programs into your Subversion repository
you are ready to test the system by committing a change to Subversion. On the machine that is running the Jira2SVN Client:
- check out a working copy from your repository
- make a change to a file
- commit that change as the user id you configured for this client (eg joe_bloggs above), eg
svn commit myfile.txt --username joe_bloggs
You should see the Jira2SVN client GUI popup to allow you to select the list of issues that were resolved by this change. Select one and select OK to close the popup window.
Verify Results
To check that Jira2SVN worked fully, open up the issue you selected and see the change note in the 'Comments' tab of your issue. Then, check the link back to JIRA in Subversion by looking at the 'clearvision:change_id' revprop with this command:
svn proplist -rHEAD --verbose --revprop .
Copyright (c) 2008 Clearvision CM All Rights Reserved Registered in England No. 5643578 VAT Registration No. UK881364801 Registered Address Laurel Farm, Winters Hill, Durley Southampton, SO32 2AH