Map sonar components to jira components - sonarqube

I'm using Jira plugin in SonarQube. I can choose component which needs to be used in new jira issues created from sonar. But this setting is available only on sonar project level (sonar.jira.issue.component.id). On the component level this setting is missing (there is "Jira filter name" parameter only).
Is there some way how to fill in the component value in jira issues according to component value in sonar?

This is not possible for the moment with the current version of the JIRA plugin. Feel free to come and discuss this on the user mailing list.

Related

Rest api to get sonarqube info from bamboo build or vice versa

Is there any way I can get any sonarqube api which can provide the build number of bamboo or any bamboo api which can give sonarqube info.This would really help.
I have so far tried both side but i am surprised both the system are quite clueless about each other. Why it is not possible that a build which ran sonarqube as as one of it's job doesn't have any information about that. Also neither in sonar it tell which build has actually triggered that sonar execution
(Not sure I understand what exactly you are looking for, perhaps this ...? )
I don't believe you can relate a specific Activity (SonarQube analysis) to a specific build (Bamboo), just project to job.
You must have SonarQube Server configured in Bamboo
When executing your job, you can add these sonar.links optional parameters to the analysis step:
sonar.links.homepage Project home page.
sonar.links.ci Continuous integration.
and
sonar.links.scm Project source repository.
sonar.links.issue Issue tracker.
Maybe also specify sonar.host.url=$SONAR_HOST_URL (where SONAR_HOST_URL is the global setting in Bamboo) in the analysis step parameters.
Those populate the Project Overview page sidebar:
That should provide the links from SonarQube back to the other systems of interest.
If you have properly configured Bamboo, you should see a link in Bamboo to the SonarQube project, post execution.

Sonar analysis & report publishing permissions

Is it possible to restrict the publishing of new analysis on a sonar instance. My use case is I created new instance of sonar with the latest version. There are couple of projects configured with the old version. I want to make sure that no project team use old instance of sonar. At server level, is it possible to stop publishing new report.
Also what customization options sonar server gives for its home page. I want to display a custom message with Sonar 5.6 version
Atul
You seem to have stood up two different instances of SonarQube side by side. In doing so, you impose on your teams the requirement to update their CI configuration to point to the new instance.
You should instead replace the old version with the new one. See the Upgrading docs for details.

Custom Rules do not get imported when Quality Profile is restored on another SonarQube instance

I am using SonarQube 5.1.2. I have created many custom rules using Rule Templates for quality profiles of both Java (plugin version 3.13.1) and C# (4.3) languages. I wanted to replicate this SonarQube instance onto a new server and hence did a Backup of the quality profiles and performed 'Restore Profile' on the new SonarQube server.
Strangely, all the custom rules are not imported on to the new SonarQube instance. Why is it so? What should I do to import the custom rules onto new SonarQube instance?
You're looking for SONAR-5366
Make it possible to back up and restore customizations of rules, which is not yet implemented, unfortunately.

SonarQube: how to revert the automatic author assignment made based on the SCM info

The property sonar.scm.enabled was enabled by default and during the analysis a lot of issues were assigned to the same author, though this was not the real author of those issues.
This is because that git user was the responsible to migrate the code from a previous version control.
I want to know if is there any way to unassign all issues assigned to a specific author, using some kind of bulk change or a specific configuration during an analysis.
Sonar version: 5.1.2
You haven't mentioned your version of the SonarQube platform, so I'll assume 5.1.*.
In the Issues page, do an Assignee search, and then use Bulk Change to re/un-assign the results.

How to setup dashboard with all projects view/widget?

I have installed a sonar web site, a jenkins web site( CI machine).
While CI server build projects and send info to sonar server as sonar client.
There are lots of projects in my sonar server.
I need a way to setup dashboard with all projects view or widget.
Just like timeline in sonar demo site
But when I configure my own sonar dashboard, I think there are only treemap and list which hava filter. ( with filter I can get analysis of all projects )
How did sonar demo web site do this?
(Sonar 3.6.2 , CentOS 6.4)
Thanks a lot ~
They are using the views plugin to do it, without (paying for) it you won't be able to do it.
Once you get the plugin, create a view with all your projects, use the view's dashboard as your main dashboard (in manage dashboards) and add the following widgets : "SQALE overview", "issues and technical debt", "timeline", "measure filter as donut chart" and "measure filter as treemap".
That's it, cheers.
This is a matter of the Global Dashboard.
Go to Manage Dashboards -> And here you can either select a current dashboard or create a new one. You have the option of adding a treemap with the metrics of your choice. Their "helicopter view" and the other features are all an aspect of the global dashboard feature. You can compare your projects and show the metrics or multiple projects through this.
Ran in the same situation and after search for workarounds , only find the new product
Governance
The Governance product provides the features to gear-up SonarQube from team-grade deployment to enterprise-grade deployment.
http://www.sonarsource.com/products/plugins/governance/
will be able to do that

Resources