Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sonar retrieves the number of issues associated to a project from JIRA. It then reports on the total number of issues and distribution by priority.

In order to get it working, you should first make some configuration:

  1. Go to your Jira and create filter. Mark it as a favorite. Also you can share this filter with your team in order to allow usage of URL for issues in Sonar.

  2. Then from a project dashboard (or from the global configuration), go to "Settings -> JIRA", and specify the "Server URL", "Username" and "Password" properties.

  3. And finally specify the "Filter name" property for project or module: this is the name of an issue filter that you have previously created on JIRA (check JIRA documentation to know more about issue filters).

After the next analysis, you can activate the "JIRA Issues" widget for one of your dashboards, and you should see something similar to this:

Link a Sonar review to a JIRA ticket

...

This feature allows you to create a review (on a violation) that will generate a JIRA ticket on your configured JIRA instance.

In order to get this working, you need:

  1. To have the the "Server URL", "Username" and "Password" properties specified in the global or project settings
  2. To specify, for your project, the "JIRA project key" property that is the key of the JIRA project on which this Sonar plugin will generate tickets

Then, once you're When logged in, you should find the "Link to JIRA" action available on any violation:

...

And the corresponding JIRA look like:

...

Installation

  1. Install the JIRA plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server
  3. Configure the plugin at global level and for each project as described in the previous section

Usage

Mandatory Properties

At project or global level go to Settings > JIRA and set the sonar.jira.urlsonar.jira.login.secured and sonar.jira.password.secured properties.

To Display Data on the JIRA Issues Widget

  1. Log in to your JIRA instance and create a filter. Mark it as favorite. You can also share this filter with your team in order to allow usage of URL for issues in Sonar.

  2. And finally specify the sonar.jira.url.param property for project or module: this is the name of an issue filter that you have previously created on JIRA (check JIRA documentation to know more about issue filters).

To Create JIRA Issues

Set the sonar.jira.project.key property that is the key of the JIRA project on which this Sonar plugin will generate tickets

Note that you can also configure the issue type, the component, the priorities. Browse the JIRA setting page on the web interface for a complete list.

Note
titleConnecting to JIRA through HTTPS

If you must connect to your JIRA instance through HTTPS, and if a certificate is required for this connection, then you must import the certificate into the CA store of the JRE that runs Sonar.

...

  • Q: I have configured my JIRA instance so that some fields are mandatory. Because Sonar does not populate these fields then issue creation fails. How can I make it work?
  • A: The JIRA "Component" field can be defined in Sonar JIRA plugin settings sonar.jira.issue.component.id can be defined at project level. For other fields the suggested workaround is to create a new issue type in JIRA (for exemple "Quality issue") and configure JIRA so that all fields are optional for this new issue type. Then configure Sonar JIRA plugin to use this new issue type when creating a new issue.set the sonar.jira.issue.type.id property accordingly.

Change Log

JIRA Issues
anonymoustrue
titleRelease 1.1
height70
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18612&pid=11911&sorter/field=priority&sorter/order=DESC&tempMax=1000

...