aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-05-09 16:04:09 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-05-09 16:04:25 +0200
commit1ae4dfad5756624d9a430974a5b9449ef1d16c8e (patch)
tree7350d19efe05c0696c25f336dadfa57a99a0fc9c /sonar-core
parent27f5a4ba3022445a406635c60503c95a5cad5388 (diff)
downloadsonarqube-1ae4dfad5756624d9a430974a5b9449ef1d16c8e.tar.gz
sonarqube-1ae4dfad5756624d9a430974a5b9449ef1d16c8e.zip
SONAR-5221 Remove the Language column from measure filters
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterSort.java5
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql1
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterExecutorTest.java2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/escape_percent_and_underscore_when_filter_by_component_name_or_key.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_person_measures.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/shared.xml8
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/sort_by_alert.xml8
10 files changed, 17 insertions, 21 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterSort.java b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterSort.java
index e0857143979..b8c09b1de16 100644
--- a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterSort.java
+++ b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterSort.java
@@ -24,7 +24,7 @@ import org.sonar.api.measures.Metric;
class MeasureFilterSort {
public static enum Field {
- KEY, NAME, VERSION, LANGUAGE, METRIC, SHORT_NAME, DESCRIPTION,
+ KEY, NAME, VERSION, METRIC, SHORT_NAME, DESCRIPTION,
// Sort by last analysis date
DATE,
// Sort by project creation date
@@ -111,9 +111,6 @@ class MeasureFilterSort {
case VERSION:
column = "s.version";
break;
- case LANGUAGE:
- column = "p.language";
- break;
case DATE:
column = "s.created_at";
break;
diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
index f29fabf4839..ec1c58b94a0 100644
--- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
@@ -33,7 +33,7 @@ import java.util.List;
*/
public class DatabaseVersion implements BatchComponent, ServerComponent {
- public static final int LAST_VERSION = 533;
+ public static final int LAST_VERSION = 534;
public static enum Status {
UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
index 4b4c50a33ae..775af009c74 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
@@ -229,6 +229,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('530');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('531');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('532');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('533');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('534');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null);
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index c8ff38228ea..155dc476775 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -567,7 +567,6 @@ measure_filter.filter_list=Measures Filters
measure_filter.col.date=Last Analysis
measure_filter.col.description=Description
measure_filter.col.key=Key
-measure_filter.col.language=Language
measure_filter.col.links=Links
measure_filter.col.name=Name
measure_filter.col.short_name=Short Name
@@ -576,7 +575,6 @@ measure_filter.col.project_creation_date=First Analysis
measure_filter.abbr.date=Last Analysis
measure_filter.abbr.description=Description
measure_filter.abbr.key=Key
-measure_filter.abbr.language=Lang.
measure_filter.abbr.links=Links
measure_filter.abbr.name=Name
measure_filter.abbr.short_name=Name
diff --git a/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterExecutorTest.java b/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterExecutorTest.java
index b2847c18ba7..97783f52f4d 100644
--- a/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterExecutorTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterExecutorTest.java
@@ -119,7 +119,7 @@ public class MeasureFilterExecutorTest {
@Test
public void projects_without_measure_conditions() throws SQLException {
db.prepareDbUnit(getClass(), "shared.xml");
- MeasureFilter filter = new MeasureFilter().setResourceQualifiers(Arrays.asList("TRK")).setSortOn(MeasureFilterSort.Field.LANGUAGE);
+ MeasureFilter filter = new MeasureFilter().setResourceQualifiers(Arrays.asList("TRK")).setSortOn(MeasureFilterSort.Field.DATE);
List<MeasureFilterRow> rows = executor.execute(filter, new MeasureFilterContext());
assertThat(rows).hasSize(2);
diff --git a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/escape_percent_and_underscore_when_filter_by_component_name_or_key.xml b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/escape_percent_and_underscore_when_filter_by_component_name_or_key.xml
index 9b8d393278e..2419fb9ef8b 100644
--- a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/escape_percent_and_underscore_when_filter_by_component_name_or_key.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/escape_percent_and_underscore_when_filter_by_component_name_or_key.xml
@@ -3,7 +3,7 @@
<!-- java project -->
<projects kee="java_project:org.sonar.bar" long_name="org.sonar.bar" scope="FIL" qualifier="CLA" name="org.sonar.bar"
id="1" root_id="[null]"
- description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-19 00:00:00.00"/>
<projects kee="java_project:org.sonar.foo" scope="FIL" qualifier="CLA" long_name="org.sonar.foo" name="org.sonar.foo"
diff --git a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_person_measures.xml b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_person_measures.xml
index f2932e5b1bf..c868a8d6933 100644
--- a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_person_measures.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_person_measures.xml
@@ -6,7 +6,7 @@
<projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
id="1" root_id="[null]"
- description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"/>
<snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
scope="PRJ" qualifier="TRK" path="" depth="0"
@@ -41,4 +41,4 @@
RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]" characteristic_id="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml
index 1ccceb41d82..6289fa9539e 100644
--- a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml
@@ -6,7 +6,7 @@
<projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
id="1" root_id="[null]"
- description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"/>
<snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
scope="PRJ" qualifier="TRK" path="" depth="0"
@@ -41,4 +41,4 @@
RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]" person_id="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/shared.xml
index bcfe738a901..173b39e17d6 100644
--- a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/shared.xml
@@ -25,12 +25,12 @@
<!-- java project -->
<projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
id="1" root_id="[null]"
- description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-19 00:00:00.00"/>
<projects kee="java_project:org.sonar.foo" scope="DIR" qualifier="PAC" long_name="org.sonar.foo" name="org.sonar.foo"
id="2" root_id="1"
- description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-19 00:00:00.00"/>
<projects kee="java_project:org.sonar.foo.Big" scope="FIL" qualifier="CLA" long_name="org.sonar.foo.Big"
@@ -129,7 +129,7 @@
<!-- php project -->
<projects kee="php_project" long_name="PHP project" scope="PRJ" qualifier="TRK" name="PHP project"
id="10" root_id="[null]"
- description="[null]" enabled="[true]" language="php" copy_resource_id="[null]" person_id="[null]"
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2012-12-12 04:06:00.00"/>
@@ -178,4 +178,4 @@
<properties id="3" prop_key="favourite" resource_id="1" text_value="[null]" user_id="1234"/>
<properties id="4" prop_key="sonar.profile" resource_id="1" text_value="Sonar way" user_id="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/sort_by_alert.xml b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/sort_by_alert.xml
index 292037eac7a..a8376646b7f 100644
--- a/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/sort_by_alert.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/measure/MeasureFilterExecutorTest/sort_by_alert.xml
@@ -8,7 +8,7 @@
<!-- java project -->
<projects kee="java_project" long_name="Java project" scope="PRJ" qualifier="TRK" name="Java project"
id="1" root_id="[null]"
- description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-19 00:00:00.00"/>
<snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
@@ -32,7 +32,7 @@
<!-- php project -->
<projects kee="php_project" long_name="PHP project" scope="PRJ" qualifier="TRK" name="PHP project"
id="10" root_id="[null]"
- description="[null]" enabled="[true]" language="php" copy_resource_id="[null]" person_id="[null]"
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2012-12-12 04:06:00.00"/>
@@ -56,7 +56,7 @@
<!-- js project -->
<projects kee="js_project" long_name="JS project" scope="PRJ" qualifier="TRK" name="JS project"
id="20" root_id="[null]"
- description="[null]" enabled="[true]" language="js" copy_resource_id="[null]" person_id="[null]"
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2012-12-12 04:06:00.00"/>
@@ -78,4 +78,4 @@
alert_status="[null]" description="[null]" characteristic_id="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>