]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4960 Fix component name that was not displayed
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 11 Dec 2013 10:59:44 +0000 (11:59 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 11 Dec 2013 10:59:44 +0000 (11:59 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb

index fe7548a7b558d95874e0b0908c1a8d2f00e76362..d5f6fe3265155a7f2f9cb0de47f431a3eed7e37c 100644 (file)
@@ -249,8 +249,8 @@ class MeasuresController < ApplicationController
       component = row.snapshot.resource
       component_hash = {}
       component_hash[:key] = component.key
-      component_hash[:name] = component.name if fields.include? 'name' && component.name
-      component_hash[:longName] = component.long_name if fields.include? 'longName' && component.long_name
+      component_hash[:name] = component.name if fields.include?('name') && component.name
+      component_hash[:longName] = component.long_name if fields.include?('longName') && component.long_name
       component_hash[:qualifier] = component.qualifier if component.qualifier
       component_hash[:favorite] = logged_in? && current_user.favourite?(component.id) if fields.include?('favourite')
       component_hash[:date] = Api::Utils.format_datetime(row.snapshot.created_at) if fields.include?('date') && row.snapshot.created_at