Skip to content

Commit

Permalink
SONAR-6275 Add temporary field person_id on measure to keep devcockpi…
Browse files Browse the repository at this point in the history
…t working
  • Loading branch information
henryju committed Mar 24, 2015
1 parent 631cea2 commit 290f7c4
Show file tree
Hide file tree
Showing 12 changed files with 849 additions and 638 deletions.
Expand Up @@ -117,6 +117,7 @@ MeasureDto toMeasureDto(BatchReport.Measure in, BatchReport.Component component)
out.setMetricId(metricCache.get(in.getMetricKey()).getId()); out.setMetricId(metricCache.get(in.getMetricKey()).getId());
out.setRuleId(in.hasRuleKey() ? ruleCache.get(RuleKey.parse(in.getRuleKey())).getId() : null); out.setRuleId(in.hasRuleKey() ? ruleCache.get(RuleKey.parse(in.getRuleKey())).getId() : null);
out.setCharacteristicId(in.hasCharactericId() ? in.getCharactericId() : null); out.setCharacteristicId(in.hasCharactericId() ? in.getCharactericId() : null);
out.setPersonId(in.hasPersonId() ? in.getPersonId() : null);
out.setValue(valueAsDouble(in)); out.setValue(valueAsDouble(in));
setData(in, out); setData(in, out);
return out; return out;
Expand Down
Expand Up @@ -178,6 +178,7 @@ public void map_full_batch_measure() throws Exception {
.setMetricKey("metric-key") .setMetricKey("metric-key")
.setRuleKey("repo:rule-key") .setRuleKey("repo:rule-key")
.setCharactericId(123456) .setCharactericId(123456)
.setPersonId(5432)
.build(); .build();


MeasureDto measure = sut.toMeasureDto(batchMeasure, component); MeasureDto measure = sut.toMeasureDto(batchMeasure, component);
Expand Down Expand Up @@ -321,6 +322,7 @@ private MeasureDto expectedFullMeasure() {
.setComponentId(2L) .setComponentId(2L)
.setSnapshotId(3L) .setSnapshotId(3L)
.setCharacteristicId(123456) .setCharacteristicId(123456)
.setPersonId(5432)
.setValue(123.123d) .setValue(123.123d)
.setTendency(2) .setTendency(2)
.setVariation(1, 1.1d) .setVariation(1, 1.1d)
Expand Down
Expand Up @@ -141,6 +141,7 @@ public void insert() throws Exception {
.setSnapshotId(2L) .setSnapshotId(2L)
.setMetricId(3) .setMetricId(3)
.setCharacteristicId(4) .setCharacteristicId(4)
.setPersonId(23)
.setRuleId(5) .setRuleId(5)
.setComponentId(6L) .setComponentId(6L)
.setValue(2.0d) .setValue(2.0d)
Expand Down
Expand Up @@ -6,7 +6,7 @@
characteristic_id="4" characteristic_id="4"
rule_id="5" rule_id="5"
project_id="6" project_id="6"
person_id="[null]" person_id="23"
value="2.0" value="2.0"
text_value="measure-value" text_value="measure-value"
tendency="42" tendency="42"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 290f7c4

Please sign in to comment.