aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-11-30 09:20:25 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-11-30 09:20:25 +0100
commiteade9001d54cd9170fdfd0127f23414ae7a243b4 (patch)
treef2d149bc96867861c93530a94da21daf78ea9f38 /sonar-core/src
parentb57aa56db1bc54a98c04323733635ec664d9ec7f (diff)
downloadsonarqube-eade9001d54cd9170fdfd0127f23414ae7a243b4.tar.gz
sonarqube-eade9001d54cd9170fdfd0127f23414ae7a243b4.zip
SONAR-3825 remove MEASURE_FILTERS.SYSTEM and add breadcrumb
Diffstat (limited to 'sonar-core/src')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterFactory.java2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl1
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterDecoderTest.java2
4 files changed, 3 insertions, 4 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterFactory.java b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterFactory.java
index e951420881c..f81086d5c86 100644
--- a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterFactory.java
+++ b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterFactory.java
@@ -54,7 +54,7 @@ public class MeasureFilterFactory implements ServerComponent {
if (properties.containsKey("onBaseComponents")) {
filter.setOnBaseResourceChildren(Boolean.valueOf((String) properties.get("onBaseComponents")));
}
- filter.setResourceName((String) properties.get("nameRegexp"));
+ filter.setResourceName((String) properties.get("nameSearch"));
filter.setResourceKeyRegexp((String) properties.get("keyRegexp"));
if (properties.containsKey("fromDate")) {
filter.setFromDate(toDate((String) properties.get("fromDate")));
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
index 8ad5551c6d3..76f26b33d85 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
@@ -518,7 +518,6 @@ CREATE TABLE "SEMAPHORES" (
CREATE TABLE "MEASURE_FILTERS" (
"ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
"NAME" VARCHAR(100) NOT NULL,
- "SYSTEM" BOOLEAN,
"SHARED" BOOLEAN NOT NULL DEFAULT FALSE,
"USER_ID" INTEGER,
"DESCRIPTION" VARCHAR(4000),
diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml
index 044da26c78f..3d14bcf1d62 100644
--- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml
@@ -79,7 +79,7 @@
select * from snapshots where id=#{id}
</select>
- <select id="selectLastSnapshotByKey" parameterType="string" resultMap="snapshotResultMap">
+ <select id="selectLastSnapshotByResourceKey" parameterType="string" resultMap="snapshotResultMap">
select s.* from snapshots s, projects p where p.kee=#{id} and p.enabled=${_true} and p.copy_resource_id is null and s.islast=${_true} and p.id=s.project_id
</select>
diff --git a/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterDecoderTest.java b/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterDecoderTest.java
index ce7ed550464..a4294dde995 100644
--- a/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterDecoderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/measure/MeasureFilterDecoderTest.java
@@ -74,7 +74,7 @@ public class MeasureFilterDecoderTest {
assertThat(filter.sort().isAsc()).isTrue();
MeasureFilterCondition condition = filter.getMeasureConditions().get(0);
assertThat(condition.metric().getKey()).isEqualTo("lines");
- assertThat(condition.operator()).isEqualTo(">");
+ assertThat(condition.operator()).isEqualTo(MeasureFilterCondition.Operator.GREATER);
assertThat(condition.value()).isEqualTo(123.0);
}