diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-07-14 19:14:43 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-07-14 19:15:41 +0200 |
commit | 896ec343357c59433b6f320a63296516a617c269 (patch) | |
tree | ec49220bad32fb2c5bb6658b1b02b924f75c8c42 /plugins/sonar-core-plugin | |
parent | f8048e6b80c360e2c2486dae47f6dfd6a47ea895 (diff) | |
download | sonarqube-896ec343357c59433b6f320a63296516a617c269.tar.gz sonarqube-896ec343357c59433b6f320a63296516a617c269.zip |
SONAR-2610 support url and description of manual measures
Diffstat (limited to 'plugins/sonar-core-plugin')
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualMeasureDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualMeasureDecorator.java index 5d26067deee..91935f4c6f7 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualMeasureDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualMeasureDecorator.java @@ -59,6 +59,8 @@ public class ManualMeasureDecorator implements Decorator { Measure measure = new Measure(metricFinder.findById(manualMeasure.getMetricId())); measure.setValue(manualMeasure.getValue(), 5); measure.setData(manualMeasure.getTextValue()); + measure.setDescription(manualMeasure.getDescription()); + measure.setUrl(manualMeasure.getUrl()); return measure; } diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest/testCopyManualMeasures.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest/testCopyManualMeasures.xml index 9c772983186..78f114c5c0a 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest/testCopyManualMeasures.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest/testCopyManualMeasures.xml @@ -5,7 +5,7 @@ enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/> - <manual_measures id="1" metric_id="2" resource_id="30" value="3.14" text_value="pi" created_at="[null]" updated_at="[null]"/> - <manual_measures id="2" metric_id="2" resource_id="40" value="6" text_value="six" created_at="[null]" updated_at="[null]"/> + <manual_measures id="1" metric_id="2" resource_id="30" value="3.14" text_value="pi" created_at="[null]" updated_at="[null]" description="this is pi" url="http://pi"/> + <manual_measures id="2" metric_id="2" resource_id="40" value="6" text_value="six" created_at="[null]" updated_at="[null]" description="this is six" url="http://six"/> </dataset>
\ No newline at end of file |