JIRA Subversion Plugin

Overview

We are no longer actively developing this plugin. An alternative to this is to link Subversion to JIRA using FishEye. The FishEye integration offers greater scalability, insight and flexibility into your source code and related integration with JIRA.


 This plugin integrates JIRA with Subversion by displaying Subversion commits in a tab on an associated JIRA issue.

 To link a commit to a JIRA issue, simply add the issue key to the commit message (eg. "ALA-3: removed file").


Check out the Atlassian Marketplace for more details and compatibility information about the JIRA Subversion plugin.  

Features

  • Supports multiple subversion repositories
  • Supports file, http, https and svn protocols. Please note, the plugin currently does not support svn+ssh protocol (public/private key authentication) (
    Error rendering macro 'jira' : Unable to locate JIRA server for this macro. It may be due to Application Link configuration.
    ).
  • Displays the Subversion revisions made against any JIRA issue, along with the changed paths
  • Links revisions, file changes and diffs directly to ViewCVS for web based SVN viewing
  • Subversion Commits Report displays recent commits mentioning JIRA issues for a project (e.g. see Apache Geronimo commits mentioning JIRA issues)

By default, the subversion index will refresh every 1 hour, which means that you may not immediately see your changes on associated JIRA issues. You can edit how often the service runs by editing the delay in  > System > Services (under Advanced in the System menu).

Support, bugs, and feature requests:

If you have an installation problem or a question please check the debugging checklist above and check with the community at Atlassian Answers if that doesn't help. If you have found a bug or would like to raise a new feature request please file a JIRA issue online in the Subversion JIRA plugin project.

Special thanks to the TMate JavaSVN library which has made the development of this plugin a lot easier.

 

Install Instructions

0.10.12 and higher

If you are installing the JIRA Subversion plugin for the first time, we recommend using the Atlassian Universal Plugin Manager which lets you easily install and manage add-ons. In your JIRA Server instance, select > Add-ons > Find new add-ons and search for the Atlassian Universal Plugin Manager to install it. Once installed, you can search for and install the JIRA Subversion plugin from your JIRA Server instance directly. If you're upgrading from a previous version of the JIRA Subversion plugin, follow the steps below.

  1. In your JIRA Server instance, select  > System > Services (under Advanced in the System menu). Delete the Subversion service. 
  2. Shut down your JIRA Server instance.
  3. Change the order of authentication methods with this JVM property:

    -Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM
  4. Remove the files that were copied to JIRA's WEB-INF/lib directory when you installed the plugin. They are:
    • atlassian-subversion-plugin-*.jar
    • javasvn-*.jar (if any)
    • svnkit-*.jar (if any)
    • ganymed-*.jar (if any)
    • trilead-*.jar (if any)
  5. Move the the subversion-jira-plugin.properties file from WEB-INF/classes to a temporary directory.
  6. Remove the plugin's index files by going to the plugins directory in JIRA's index directory. Then remove the atlassian-subversion-revisions directory.
  7. Start your JIRA Server instance. 
  8. Select  > Add-ons > Find new add-ons to search for and install the JIRA Subversion plugin. 
  9. Optionally, migrate the settings from the subversion-jira-plugin.properties to the Subversion Repositories page if they are not already there. This step is optional as it will depend upon the previous version of the Subversion plugin.

(info) The Service name has been changed to com.atlassian.jira.plugin.ext.subversion.revisions.scheduling.UpdateIndexMonitorImpl:job in versions 0.10.12 and higher.

0.10.11.1 and lower

  1. Change the order of authentication methods with the following JVM property

    -Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM
  2. Copy the following jar files from the distribution's lib/ directory into JIRA's WEB-INF/lib. If you are upgrading the plugin, make sure you delete the old ones from WEB-INF/lib first.
    • atlassian-subversion-plugin-*.jar
    • javasvn-*.jar (if any)
    • svnkit-*.jar (if any)
    • ganymed-*.jar (if any)
    • trilead-*.jar (if any)

      If you're using 0.10.3 of this plugin, make sure your remove the javasvn and ganymed jars from JIRA's WEB-INF/lib directory.

    Copy subversion-jira-plugin.properties into JIRA's WEB-INF/classes. In the same location where subversion-jira-plugin.properties would be, open jira-application.properties (for WAR distribution, copy it to edit-webapp) and set jira.option.ignore.url.with.key=false.
    (warning) In JIRA 4.4 and above, this is set in $JIRA_HOME/jira-config.properties

    To clarify the file locations:

    • If you are using JIRA Standalone, copy the jar files into atlassian-jira/WEB-INF/lib and the .properties file into atlassian-jira/WEB-INF/classes.
    • If you are using the WAR distribution, create the directory edit-webapp/WEB-INF/lib and copy the jar files into it. Then copy the .properties file into edit-webapp/WEB-INF/classes and rebuild and redeploy the JIRA war file.

Optionally, you can test the plugin against your svn repository by following these steps: 

  1. Log into your JIRA Server instance as an administrator with the View Development Tools permission.
  2. Create a test project with key ALA in your JIRA installation and create 3 new issues under this project (ALA-1, ALA-2, ALA-3).
  3. Restart your JIRA Server instance.
  4. Visit ALA-2. In the issue's Activity section, you should see a Subversion tab containing commits: 
  5. Visit ALA-3. You should see commits in the issue's Subversion tab as well.
    If ALA-3 does not show commits but ALA-2 does, then you probably haven't fixed the jira.option.ignore.url.with.key property mentioned above. Change the property, then delete the $INDEXDIR/plugins/atlassian-subversion-revisions directory to cause JIRA to refetch and reparse the commits. Restart your JIRA Server instance and check both issues again. 

3. Subversion Configuration

In version 0.10.0, we've added a configuration interface in the Administration section. This removes the need to configure your repositories in WEB-INF/classes/subversion-jira-plugin.properties. If you already have them configured there, there's no need to make any changes. The plugin will read your configuration and store it internally. From that point on you should use the web interface to make changes or add/remove repositories as the properties file will not be read again. Please note though if you are using the subversion-jira-plugin.properties_ file and want to add/edit a repository, you should either make the changes to the properties file or start JIRA without the property file and add your repositories through the web interface. (See SVN-180     )

To add repositories, go to the Administration section and select "Subversion Repositories" from the sidebar and then select "Add". Next enter the repository's information to the form. If you you have a svn web interface (ViewVC, Fisheye, etc) you can also configure the 'linkformat' properties to link to it. The interface will pre-populate ViewVC, Fisheye, and WebClient for SVN links for you, but you may need to edit them depending on the repository's setup:

Revision Indexing

Be default it is set to 'Index and link to any mentioned issue keys in the revision history'.

If 'Do not index and link to the revision history' is set, every revision in Subversion will not be indexed and not linked to any mentioned issue keys.

Revision Cache Size

By default it is set to '10000', the number of revisions to keep cached in memory for quick retrieval. Note: this number does not affect the speed with which revisions are looked up from the index (to get revisions for a given issue). This affects the speed at which the full content of those revisions are retrieved from SVN.

For example if the value is set '500' and there is 1000 revisions on the SVN server, this will make retrieving the additional 500 revision (from the SVN server) slower depending on the server/Internet speed compare with caching all the revision.

When you have added your new repository, JIRA will reindex it and display the following list:

Repositories can be editing or deleted from this list. There are further notes in the README.txt inside the download.

Upgrade Instructions

Upgrading the plugin (typically done as part of a JIRA upgrade) follows the same process as installing. There is one important extra step - delete the Subversion plugin's index files on disk before you start the new JIRA.

The Subversion plugin creates a search index of Subversion commits in below the JIRA index directory, in plugins/atlassian-subversion-revisions/. The new version of the Subversion plugin may not use the same indexing format, and the plugin cannot (yet - see SVN-173     ) detect this. If you start a new plugin with an old index, you may get strange errors.

Uninstall Instructions

  1. In your JIRA Server instance, select  > System > Services to delete the Subversion service .
  2. Shut down your JIRA Server instance.
  3. Remove the files that were copied to JIRA's WEB-INF/lib directory when you installed the plugin. They are:
    • atlassian-subversion-plugin-*.jar
    • javasvn-*.jar (if any)
    • svnkit-*.jar (if any)
    • ganymed-*.jar (if any)
    • trilead-*.jar (if any)
  4. Remove the the subversion-jira-plugin.properties file from WEB-INF/classes.
  5. Remove the plugin's index files by going to the plugins directory in JIRA's index directory. Then remove the atlassian-subversion-revisions directory.

Troubleshooting Instructions

Experiencing a problem with the plugin?

  • Go to Administration -> Plugins, and ensure that there is a "Subversion Plugin" with the expected plugin version. If the version is wrong you might have two atlassian-jira-subversion-plugin-*.jar files in WEB-INF/lib.
  • If the plugin isn't listed, it wasn't added properly or failed to load. Check the JIRA logs for Subversion-related errors. The log location depends on how JIRA is installed - see Where are the JIRA logs?

If the plugin loads, but you don't see commits:

  • Check that the current user has the View Development Tools permission.
  • Have you made any Subversion commits mentioning JIRA issue keys? If not, obviously you won't see any links in JIRA.
  • If in doubt of your configuration, try deleting the Subversion plugin's index on disk. This is the plugins/atlassian-subversion-revisions directory found under the index directory (check Administration -> Indexing for this). Then restart JIRA. Watch the logs for any errors.
  • To eliminate network problems (firewalls, etc), try connecting to svn.atlassian.com.
    • E.g. If you need to configure Tomcat to pass your firewall, add the following parameters to the SET JAVA_OPTS= command in startup.bat:

      -Dhttp.proxyHost=your-proxy-address
      -Dhttp.proxyPort=80
  • Finally, to see everything the Subversion plugin does (on startup), edit JIRA's log4j.properties, and add the lines:

    log4j.category.com.atlassian.jira.plugin.ext.subversion = DEBUG, console, filelog
    log4j.additivity.com.atlassian.jira.plugin.ext.subversion = false
    
  • Double-check that you have set jira.option.ignore.url.with.key=false in jira-application.properties.

If the plugin is having problems authenticating towards your subversion repository, and the repository is using the credentials in an LDAP server, please try the workaround specified in Unable to locate JIRA server for this macro. It may be due to Application Link configuration.

If you make any configuration changes, please delete the $INDEXDIR/plugins/atlassian-subversion-revisions directory and restart JIRA to make the change take effect.

News

Future plugin release information will be updated and available in Atlassian Marketplace.

 Click here to expand for older news...
0.10.3 Released

Fixed a bug where ssh+svn would not work due to an incompatible SSH library being shipped with the plugin (SVN-199     ).

0.10.2 released

Several improvements and a bug fix.

  • The plugin now process issue keys in commit messages in case-insensitive manner. (SVN-93     )
  • The plugin now officially supports the file protocol. (SVN-38     )
  • Fixed a bug where the web link format could not be changed. (SVN-190     )
0.10.1 released

Fixed a bug where the plugin would never automatically reactivate after it had deactivated due to a SVN connection failure (SVN-181     ), and improved error logging (SVN-174     ).

0.9.12 released

Changes for upgrading Lucene in JIRA v3.11. Incompatible with previous versions.

0.9.11 released

No changes, upped source dependencies for JIRA v3.10.

0.9.10 released

Contains a fix for SVN-133      (commit data does not follow Project Permission Scheme - honoring current assignee and reporter) and upped source dependencies for JIRA v3.9.

0.9.9 released

No changes, upped source dependencies for JIRA v3.8.

0.9.8 released

No changes, except that the sample properties file now works out the box against svn.atlassian.com.

0.9.7 released

Contains a fix for SVN-123     , a problem affecting people importing data with a new index path.

0.9.6 released

Latest version tested for compatibility with JIRA 3.7.

Subversion location moved

Please note the slightly different Subversion location of this plugin:

0.9.5 released

The Plugin now features a new project tab, which shows all commits made against a particular project or a project version, giving you a summary of recent developer activity on the project. (Screenshot below)

0.9.4 released

Fixed SVN-102     , allowing multiple SVN directories from a single repository.

Note: From version 0.9.4+ you will have to delete your already indexed subversion logs and let the plugin re-index since we have changed the stored repository id in the index document. (Fixes SVN-102     . If you do not use multiple directories from one repository, you do not need to make this update). Please ensure that you delete the subversion plugin index directory and its contents - e.g. <JIRA-INDEX-DIR>/plugins/atlassian-subversion-revisions.

0.9.3 released

Updated to version 1.0.5 of the javasvn library to fix issues JRA-10148 and SVN-13      which caused problems including a repository via http with a url with no
context path.

0.9.2 released

Minor updates for compatibility (services) with JIRA 3.6. 

0.9.1 released - Now includes the javasvn and ganymed libraries

We have licensed the javasvn library and can now redistribute it, so this release includes all the libraries you will need to get this plugin up and running.

0.9 released - Updated to use latest version of javasvn, works against subversion 1.3

In the 0.9 release we have updated our dependency on the javasvn jar to version 1.0.3. This allows us to work with subversion 1.3 without any issues. The license of the javasvn library has changed from 0.8.8 and 1.0.3. We can now no longer distribute the library with our plugin since it would be "for commercial use". Our install instructions have therefore changed and you must now download the javasvn.jar on your own. This change is still backward compatable with all previous subversion versions.

0.8.1 released - Bug fix to address JRA-8336

In the 0.8.1 release we fix some issues that were affecting the links into viewcvs that were generated. The subversion-jira-plugin.properties contains some updated sample property url's for viewcvs that you should apply to your properties file.

0.8 released - ViewCVS URL now fully configurable

In the 0.8 release the URL format is now fully configurable in the subversion-jira-plugin.propertiesfile, so we can support both old and new-style ViewCVS URLs, as well as Fisheye and other systems in future. Thanks to Lu Chenggong for the initial patch (SVN-46     ). The subversion-jira-plugin.properties format is not backwards-compatible - please reapply your customizations to the sample properties file.

0.6 released - Multiple repository support

Note: You will have to delete your already indexed subversion logs and let the plugin re-index since we now include the repository id in the index document. Thanks to ngrabova for some code contributions towards multiple repository support.