]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3755 Renamed some column of issues and issue_changes
authorJulien Lancelot <julien.lancelot@gmail.com>
Fri, 19 Apr 2013 16:10:54 +0000 (18:10 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Fri, 19 Apr 2013 16:10:54 +0000 (18:10 +0200)
31 files changed:
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTracking.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssuesWorkflowDecorator.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssueTrackingTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/IssuesWorkflowDecoratorTest.java
sonar-batch/src/test/resources/org/sonar/batch/issue/IssuePersisterTest/should_insert_new_issue-result.xml
sonar-batch/src/test/resources/org/sonar/batch/issue/IssuePersisterTest/should_update_existing_issue-result.xml
sonar-batch/src/test/resources/org/sonar/batch/issue/IssuePersisterTest/should_update_existing_issue.xml
sonar-core/src/main/java/org/sonar/core/issue/IssueChangeDto.java
sonar-core/src/main/java/org/sonar/core/issue/IssueDto.java
sonar-core/src/main/resources/org/sonar/core/issue/IssueChangeMapper.xml
sonar-core/src/main/resources/org/sonar/core/issue/IssueMapper.xml
sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
sonar-core/src/test/java/org/sonar/core/issue/IssueChangeDaoTest.java
sonar-core/src/test/java/org/sonar/core/issue/IssueDaoTest.java
sonar-core/src/test/java/org/sonar/core/issue/IssueDtoTest.java
sonar-core/src/test/resources/org/sonar/core/issue/IssueChangeDaoTest/insert-result.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueChangeDaoTest/shared.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/insert-result.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/shared.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_all.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_by_component_root.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_by_date_creation.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_by_id.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_by_key.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_by_query.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_by_rules.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/should_select_open_issues.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/update-result.xml
sonar-core/src/test/resources/org/sonar/core/issue/IssueDaoTest/update.xml
sonar-server/src/main/webapp/WEB-INF/db/migrate/385_create_issues.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/386_create_issue_changes.rb

index 29477c8fa4443300bbe4b1760ef16d8fffb54291..436baec073a4875508c5eae556b19e8d37852951 100644 (file)
@@ -345,12 +345,12 @@ public class IssueTracking implements BatchExtension {
   }
 
   private boolean isSameKey(DefaultIssue newIssue, IssueDto pastIssue) {
-    return Objects.equal(newIssue.key(), pastIssue.getUuid());
+    return Objects.equal(newIssue.key(), pastIssue.getKey());
   }
 
   private void mapIssue(DefaultIssue newIssue, IssueDto pastIssue, Multimap<Integer, IssueDto> lastIssuesByRule, Map<DefaultIssue, IssueDto> issueMap) {
     if (pastIssue != null) {
-      newIssue.setKey(pastIssue.getUuid());
+      newIssue.setKey(pastIssue.getKey());
       if (pastIssue.isManualSeverity()) {
         newIssue.setSeverity(pastIssue.getSeverity());
       }
index 42140114d2b6a0cf7e492795f819be81309dc291..9ba3d0685698e824fcc611ea778dc21a280dd960 100644 (file)
@@ -102,7 +102,7 @@ public class IssuesWorkflowDecorator implements Decorator {
   }
 
   private void closeResolvedStandardIssues(IssueDto openIssue, Set<String> issueKeys) {
-    if (!openIssue.isManualIssue() && !issueKeys.contains(openIssue.getUuid())) {
+    if (!openIssue.isManualIssue() && !issueKeys.contains(openIssue.getKey())) {
       closeAndSave(openIssue);
     }
   }
index 079e7c0d121924b05728723d6f124371526564bc..e187bf71437252141630b17c358ea95e2fe057b0 100644 (file)
@@ -65,8 +65,8 @@ public class IssueTrackingTest {
 
   @Test
   public void key_should_be_the_prioritary_field_to_check() {
-    IssueDto referenceIssue1 = newReferenceIssue("message", 10, 1, "checksum1").setUuid("100");
-    IssueDto referenceIssue2 = newReferenceIssue("message", 10, 1, "checksum2").setUuid("200");
+    IssueDto referenceIssue1 = newReferenceIssue("message", 10, 1, "checksum1").setKey("100");
+    IssueDto referenceIssue2 = newReferenceIssue("message", 10, 1, "checksum2").setKey("200");
 
     // exactly the fields of referenceIssue1 but not the same key
     DefaultIssue newIssue = newDefaultIssue("message", 10, RuleKey.of("squid", "AvoidCycle"), "checksum1").setKey("200");
@@ -232,7 +232,7 @@ public class IssueTrackingTest {
     IssueDto referenceIssue = new IssueDto();
     Long id = violationId++;
     referenceIssue.setId(id);
-    referenceIssue.setUuid(Long.toString(id));
+    referenceIssue.setKey(Long.toString(id));
     referenceIssue.setLine(lineId);
     referenceIssue.setDescription(description);
     referenceIssue.setRuleId(ruleId);
index 62ed700261979469a91e2d4116a268578cc1c6de..ae18261f23c61f67cea0065c341d8f6103a52ffa 100644 (file)
@@ -77,7 +77,7 @@ public class IssuesWorkflowDecoratorTest extends AbstractDaoTestCase {
   public void should_close_resolved_issue() {
     when(moduleIssues.issues(anyString())).thenReturn(Collections.<Issue>emptyList());
     when(initialOpenIssuesStack.selectAndRemove(anyInt())).thenReturn(newArrayList(
-        new IssueDto().setUuid("100").setRuleId(10).setRuleKey_unit_test_only("squid", "AvoidCycle")));
+        new IssueDto().setKey("100").setRuleId(10).setRuleKey_unit_test_only("squid", "AvoidCycle")));
 
     decorator.decorate(mock(Resource.class), null);
 
@@ -92,7 +92,7 @@ public class IssuesWorkflowDecoratorTest extends AbstractDaoTestCase {
   public void should_close_resolved_manual_issue() {
     when(moduleIssues.issues(anyString())).thenReturn(Collections.<Issue>emptyList());
     when(initialOpenIssuesStack.selectAndRemove(anyInt())).thenReturn(newArrayList(
-        new IssueDto().setUuid("100").setRuleId(1).setManualIssue(true).setStatus(Issue.STATUS_RESOLVED).setRuleKey_unit_test_only("squid", "AvoidCycle")));
+        new IssueDto().setKey("100").setRuleId(1).setManualIssue(true).setStatus(Issue.STATUS_RESOLVED).setRuleKey_unit_test_only("squid", "AvoidCycle")));
 
     decorator.decorate(mock(Resource.class), null);
 
@@ -108,7 +108,7 @@ public class IssuesWorkflowDecoratorTest extends AbstractDaoTestCase {
     when(moduleIssues.issues(anyString())).thenReturn(Lists.<Issue>newArrayList(
         new DefaultIssue().setKey("100")));
     when(initialOpenIssuesStack.selectAndRemove(anyInt())).thenReturn(newArrayList(
-        new IssueDto().setUuid("100").setRuleId(1).setStatus(Issue.STATUS_RESOLVED).setResolution(Issue.RESOLUTION_FIXED)
+        new IssueDto().setKey("100").setRuleId(1).setStatus(Issue.STATUS_RESOLVED).setResolution(Issue.RESOLUTION_FIXED)
           .setRuleKey_unit_test_only("squid", "AvoidCycle")));
 
     decorator.decorate(mock(Resource.class), null);
@@ -129,7 +129,7 @@ public class IssuesWorkflowDecoratorTest extends AbstractDaoTestCase {
     when(moduleIssues.issues(anyString())).thenReturn(Lists.<Issue>newArrayList(
       new DefaultIssue().setKey("100")));
     when(initialOpenIssuesStack.selectAndRemove(anyInt())).thenReturn(newArrayList(
-      new IssueDto().setUuid("100").setRuleId(1).setStatus(Issue.STATUS_RESOLVED).setResolution(Issue.RESOLUTION_FALSE_POSITIVE)
+      new IssueDto().setKey("100").setRuleId(1).setStatus(Issue.STATUS_RESOLVED).setResolution(Issue.RESOLUTION_FALSE_POSITIVE)
         .setRuleKey_unit_test_only("squid", "AvoidCycle")));
 
     decorator.decorate(mock(Resource.class), null);
@@ -150,7 +150,7 @@ public class IssuesWorkflowDecoratorTest extends AbstractDaoTestCase {
     when(moduleIssues.issues(anyString())).thenReturn(Collections.<Issue>emptyList());
     when(initialOpenIssuesStack.selectAndRemove(anyInt())).thenReturn(Collections.<IssueDto>emptyList());
 
-    when(initialOpenIssuesStack.getAllIssues()).thenReturn(newArrayList(new IssueDto().setUuid("100").setRuleId(1).setRuleKey_unit_test_only("squid", "AvoidCycle")));
+    when(initialOpenIssuesStack.getAllIssues()).thenReturn(newArrayList(new IssueDto().setKey("100").setRuleId(1).setRuleKey_unit_test_only("squid", "AvoidCycle")));
 
     Resource resource = mock(Resource.class);
     when(resource.getQualifier()).thenReturn(Qualifiers.PROJECT);
index f1e9d3a94f9714acd00f14599120b39d77cd1d54..1a6c188b6c7f87f6a64a4d17007847ede50af575 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
   <snapshots id="100" project_id="200" islast="[true]"/>
-  <issues id="1" uuid="ABCD" resource_id="200" rule_id="300" severity="BLOCKER" manual_severity="[false]" manual_issue="[false]" title="[null]" message="[null]"
-          line="[null]" cost="[null]" status="OPEN" resolution="[null]" checksum="[null]" user_login="[null]" assignee_login="[null]" person_id="[null]"
-          data="" created_at="2013-05-18" updated_at="2013-05-23" closed_at="[null]" />
+  <issues id="1" kee="ABCD" resource_id="200" rule_id="300" severity="BLOCKER" manual_severity="[false]" manual_issue="[false]" title="[null]" description="[null]"
+          line="[null]" cost="[null]" status="OPEN" resolution="[null]" checksum="[null]" user_login="[null]" assignee_login="[null]" author_login="[null]"
+          attributes="" created_at="2013-05-18" updated_at="2013-05-23" closed_at="[null]" />
 </dataset>
\ No newline at end of file
index bab422fd0a2d00a641f609977594e9f683149f98..4ad7e693016eae6e832be6572812dde8f4972acb 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
   <snapshots id="100" project_id="200" islast="[true]"/>
-  <issues id="1" uuid="ABCD" resource_id="200" rule_id="300" severity="BLOCKER" manual_severity="[false]" manual_issue="[false]" title="[null]" message="[null]"
-          line="[null]" cost="[null]" status="CLOSED" resolution="[null]" checksum="[null]" user_login="[null]" assignee_login="[null]" person_id="[null]"
-          data="" created_at="2013-05-18" updated_at="2013-05-23" closed_at="[null]" />
+  <issues id="1" kee="ABCD" resource_id="200" rule_id="300" severity="BLOCKER" manual_severity="[false]" manual_issue="[false]" title="[null]" description="[null]"
+          line="[null]" cost="[null]" status="CLOSED" resolution="[null]" checksum="[null]" user_login="[null]" assignee_login="[null]" author_login="[null]"
+          attributes="" created_at="2013-05-18" updated_at="2013-05-23" closed_at="[null]" />
 </dataset>
\ No newline at end of file
index f4a989b8e24f29fa13b16682e64ea9c8b6fe792f..7e7c68964a69f57f1ce1035d6d4b856417816e48 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
   <snapshots id="100" project_id="200" islast="[true]"/>
-  <issues id="1" uuid="ABCD" resource_id="200" rule_id="300" severity="INFO" manual_severity="[false]" manual_issue="[false]" title="[null]" message="[null]"
-          line="[null]" cost="[null]" status="OPEN" resolution="[null]" checksum="[null]" user_login="[null]" assignee_login="[null]" person_id="[null]"
-          data="" created_at="2012-01-01" updated_at="2012-01-01" closed_at="[null]" />
+  <issues id="1" kee="ABCD" resource_id="200" rule_id="300" severity="INFO" manual_severity="[false]" manual_issue="[false]" title="[null]" description="[null]"
+          line="[null]" cost="[null]" status="OPEN" resolution="[null]" checksum="[null]" user_login="[null]" assignee_login="[null]" author_login="[null]"
+          attributes="" created_at="2012-01-01" updated_at="2012-01-01" closed_at="[null]" />
 </dataset>
\ No newline at end of file
index 2ca3fc6c7a0673ef27bcfb7844c79bbdbb7fa2ed..104c42133d14a1ef001b0691c076b5f5449b4923 100644 (file)
@@ -30,8 +30,8 @@ import java.util.Date;
 public final class IssueChangeDto {
 
   private Long id;
-  private String issueUuid;
-  private Long userId;
+  private String issueKey;
+  private String userLogin;
   private String changeType;
   private String changeData;
   private String message;
@@ -48,20 +48,20 @@ public final class IssueChangeDto {
   }
 
   public String getIssueUuid() {
-    return issueUuid;
+    return issueKey;
   }
 
-  public IssueChangeDto setIssueUuid(String issueUuid) {
-    this.issueUuid = issueUuid;
+  public IssueChangeDto setIssueKey(String issueKey) {
+    this.issueKey = issueKey;
     return this;
   }
 
-  public Long getUserId() {
-    return userId;
+  public String getUserLogin() {
+    return userLogin;
   }
 
-  public IssueChangeDto setUserId(Long userId) {
-    this.userId = userId;
+  public IssueChangeDto setUserLogin(String userLogin) {
+    this.userLogin = userLogin;
     return this;
   }
 
index 36734e69e5022ebe8c7372dfe921e41e8840af73..3d695d148bff93d6463e78745ebbc8649ac23577 100644 (file)
@@ -36,7 +36,7 @@ import java.util.Date;
 public final class IssueDto {
 
   private Long id;
-  private String uuid;
+  private String kee;
   private Integer resourceId;
   private Integer ruleId;
   private String severity;
@@ -51,8 +51,8 @@ public final class IssueDto {
   private String checksum;
   private String userLogin;
   private String assignee;
-  private Long personId;
-  private String data;
+  private String authorLogin;
+  private String attributes;
   private Date createdAt;
   private Date updatedAt;
   private Date closedAt;
@@ -71,12 +71,12 @@ public final class IssueDto {
     return this;
   }
 
-  public String getUuid() {
-    return uuid;
+  public String getKey() {
+    return kee;
   }
 
-  public IssueDto setUuid(String uuid) {
-    this.uuid = uuid;
+  public IssueDto setKey(String key) {
+    this.kee = key;
     return this;
   }
 
@@ -206,23 +206,23 @@ public final class IssueDto {
     return this;
   }
 
-  public Long getPersonId() {
-    return personId;
+  public String getPersonId() {
+    return authorLogin;
   }
 
-  public IssueDto setPersonId(@Nullable Long personId) {
-    this.personId = personId;
+  public IssueDto setAuthorLogin(@Nullable String authorLogin) {
+    this.authorLogin = authorLogin;
     return this;
   }
 
-  public String getData() {
-    return data;
+  public String getAttributes() {
+    return attributes;
   }
 
-  public IssueDto setData(@Nullable String s) {
+  public IssueDto setAttributes(@Nullable String s) {
     Preconditions.checkArgument(s == null || s.length() <= 1000,
-      "Issue data must not exceed 1000 characters: " + s);
-    this.data = s;
+      "Issue attributes must not exceed 1000 characters: " + s);
+    this.attributes = s;
     return this;
   }
 
@@ -308,7 +308,7 @@ public final class IssueDto {
 
   public static IssueDto toDto(DefaultIssue issue, Integer componentId, Integer ruleId) {
     return new IssueDto()
-      .setUuid(issue.key())
+      .setKey(issue.key())
       .setLine(issue.line())
       .setTitle(issue.title())
       .setDescription(issue.description())
@@ -326,7 +326,7 @@ public final class IssueDto {
       .setClosedAt(issue.closedAt())
       .setRuleId(ruleId)
       .setResourceId(componentId)
-      .setData(issue.attributes() != null ? KeyValueFormat.format(issue.attributes()) : "")
+      .setAttributes(issue.attributes() != null ? KeyValueFormat.format(issue.attributes()) : "")
       // TODO
 //        .setPersonId()
       ;
@@ -334,7 +334,7 @@ public final class IssueDto {
 
   public DefaultIssue toDefaultIssue() {
     DefaultIssue issue = new DefaultIssue();
-    issue.setKey(uuid);
+    issue.setKey(kee);
     issue.setStatus(status);
     issue.setResolution(resolution);
     issue.setDescription(description);
@@ -347,7 +347,7 @@ public final class IssueDto {
     issue.setCreatedAt(createdAt);
     issue.setUpdatedAt(updatedAt);
     issue.setClosedAt(closedAt);
-    issue.setAttributes(KeyValueFormat.parse(Objects.firstNonNull(data, "")));
+    issue.setAttributes(KeyValueFormat.parse(Objects.firstNonNull(attributes, "")));
     issue.setComponentKey(componentKey);
     issue.setManual(manualIssue);
     issue.setManualSeverity(manualSeverity);
index 168aeee56ff353eae3a53aefe42fda12fdeea851..ee47a8477f4909211a849a051e81471b14bec95b 100644 (file)
@@ -26,8 +26,8 @@
 
   <sql id="issueChangeColumns">
     i.id,
-    i.issue_uuid as issueUuid,
-    i.user_id as userId,
+    i.issue_key as issueKey,
+    i.user_login as userLogin,
     i.change_type as changeType,
     i.change_data as changeData,
     i.message as message,
@@ -36,8 +36,8 @@
   </sql>
 
   <insert id="insert" parameterType="IssueChange" useGeneratedKeys="true" keyProperty ="id">
-    INSERT INTO issue_changes (issue_uuid, user_id, change_type, change_data, message, created_at, updated_at)
-    VALUES (#{issueUuid}, #{userId}, #{changeType}, #{changeData}, #{message}, #{createdAt}, #{updatedAt})
+    INSERT INTO issue_changes (issue_key, user_login, change_type, change_data, message, created_at, updated_at)
+    VALUES (#{issueKey}, #{userLogin}, #{changeType}, #{changeData}, #{message}, #{createdAt}, #{updatedAt})
   </insert>
 
   <!-- Oracle -->
@@ -45,8 +45,8 @@
     <selectKey order="BEFORE" resultType="Long" keyProperty="id" >
       select issue_changes_seq.NEXTVAL from DUAL
     </selectKey>
-    INSERT INTO issue_changes (id, issue_uuid, user_id, change_type, change_data, message, created_at, updated_at)
-    VALUES (#{id}, #{issueUuid}, #{userId}, #{changeType}, #{changeData}, #{message}, #{createdAt}, #{updatedAt})
+    INSERT INTO issue_changes (id, issue_key, user_login, change_type, change_data, message, created_at, updated_at)
+    VALUES (#{id}, #{issueKey}, #{userLogin}, #{changeType}, #{changeData}, #{message}, #{createdAt}, #{updatedAt})
   </insert>
 
   <select id="findById" parameterType="long" resultType="IssueChange">
@@ -58,7 +58,7 @@
   <select id="selectByIssue" parameterType="string" resultType="IssueChange">
     select <include refid="issueChangeColumns"/>
     from issue_changes i
-    where i.issue_uuid=#{issueUuid}
+    where i.issue_key=#{issueKey}
   </select>
 
 </mapper>
index 44c0fdd72e07ad272f3d9419b91c8db1a4ff6e8c..12200a5ca6af054c9a9b4bb0409191718b4b2a0c 100644 (file)
@@ -6,14 +6,14 @@
 
   <sql id="issueColumns">
     i.id,
-    i.uuid as uuid,
+    i.kee as kee,
     i.resource_id as resourceId,
     i.rule_id as ruleId,
     i.severity as severity,
     i.manual_severity as manualSeverity,
     i.manual_issue as manualIssue,
     i.title as title,
-    i.message as description,
+    i.description as description,
     i.line as line,
     i.cost as cost,
     i.status as status,
@@ -21,8 +21,8 @@
     i.checksum as checksum,
     i.user_login as userLogin,
     i.assignee_login as assignee,
-    i.person_id as personId,
-    i.data as data,
+    i.author_login as authorLogin,
+    i.attributes as attributes,
     i.created_at as createdAt,
     i.updated_at as updatedAt,
     i.closed_at as closedAt,
   </sql>
 
   <insert id="insert" parameterType="Issue" useGeneratedKeys="true" keyProperty="id">
-    INSERT INTO issues (uuid, resource_id, rule_id, severity, manual_severity, manual_issue, title, message, line, cost, status,
-    resolution, checksum, user_login, assignee_login, person_id, data, created_at, updated_at, closed_at)
-    VALUES (#{uuid}, #{resourceId}, #{ruleId}, #{severity}, #{manualSeverity}, #{manualIssue}, #{title}, #{description}, #{line}, #{cost}, #{status},
-    #{resolution}, #{checksum}, #{userLogin}, #{assignee}, #{personId}, #{data}, #{createdAt}, #{updatedAt}, #{closedAt})
+    INSERT INTO issues (kee, resource_id, rule_id, severity, manual_severity, manual_issue, title, description, line, cost, status,
+    resolution, checksum, user_login, assignee_login, author_login, attributes, created_at, updated_at, closed_at)
+    VALUES (#{kee}, #{resourceId}, #{ruleId}, #{severity}, #{manualSeverity}, #{manualIssue}, #{title}, #{description}, #{line}, #{cost}, #{status},
+    #{resolution}, #{checksum}, #{userLogin}, #{assignee}, #{authorLogin}, #{attributes}, #{createdAt}, #{updatedAt}, #{closedAt})
   </insert>
 
   <!-- Oracle -->
     <selectKey order="BEFORE" resultType="Long" keyProperty="id">
       select issues_seq.NEXTVAL from DUAL
     </selectKey>
-    INSERT INTO issues (id, uuid, resource_id, rule_id, severity, manual_severity, manual_issue, title, message, line, cost, status,
-    resolution, checksum, user_login, assignee_login, person_id, data, created_at, updated_at, closed_at)
-    VALUES (#{id}, #{uuid}, #{resourceId}, #{ruleId}, #{severity}, #{manualSeverity}, #{manualIssue}, #{title}, #{description}, #{line}, #{cost}, #{status},
-    #{resolution}, #{checksum}, #{userLogin}, #{assignee}, #{personId}, #{data}, #{createdAt}, #{updatedAt}, #{closedAt})
+    INSERT INTO issues (kee, uuid, resource_id, rule_id, severity, manual_severity, manual_issue, title, description, line, cost, status,
+    resolution, checksum, user_login, assignee_login, author_login, attributes, created_at, updated_at, closed_at)
+    VALUES (#{kee}, #{uuid}, #{resourceId}, #{ruleId}, #{severity}, #{manualSeverity}, #{manualIssue}, #{title}, #{description}, #{line}, #{cost}, #{status},
+    #{resolution}, #{checksum}, #{userLogin}, #{assignee}, #{authorLogin}, #{attributes}, #{createdAt}, #{updatedAt}, #{closedAt})
   </insert>
 
   <update id="update" parameterType="Issue">
@@ -57,7 +57,7 @@
       manual_severity=#{manualSeverity},
       manual_issue=#{manualIssue},
       title=#{title},
-      message=#{description},
+    description=#{description},
       line=#{line},
       cost=#{cost},
       status=#{status},
       checksum=#{checksum},
       user_login=#{userLogin},
       assignee_login=#{assignee},
-      person_id=#{personId},
-      data=#{data},
+      author_login=#{authorLogin},
+      attributes=#{attributes},
       created_at=#{createdAt},
       updated_at=#{updatedAt},
       closed_at=#{closedAt}
-    where uuid = #{uuid}
+    where kee = #{kee}
   </update>
 
   <select id="selectById" parameterType="long" resultType="Issue">
@@ -87,7 +87,7 @@
     select
     <include refid="issueColumns"/>
     from issues i, rules r, projects p
-    where i.uuid=#{uuid} and i.rule_id=r.id and p.id=i.resource_id
+    where i.kee=#{kee} and i.rule_id=r.id and p.id=i.resource_id
   </select>
 
   <select id="selectOpenIssues" parameterType="String" resultType="Issue">
         and i.resource_id=project_component.id
       </if>
       <if test="keys != null">
-        and i.uuid in
+        and i.kee in
         <foreach item="key" index="index" collection="keys" open="(" separator="," close=")">#{key}
         </foreach>
       </if>
index 4e84d5d53af3ebd2a94f48ec9ebad919b3d5772d..ceeca30bf22883716c9b0683381c9bae89174c6e 100644 (file)
@@ -517,14 +517,14 @@ CREATE TABLE "GRAPHS" (
 
 CREATE TABLE "ISSUES" (
   "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
-  "UUID" VARCHAR(36) NOT NULL,
+  "KEE" VARCHAR(36) NOT NULL,
   "RESOURCE_ID" INTEGER NOT NULL,
   "RULE_ID" INTEGER NOT NULL,
   "SEVERITY" VARCHAR(10),
   "MANUAL_SEVERITY" BOOLEAN NOT NULL,
   "MANUAL_ISSUE" BOOLEAN NOT NULL,
   "TITLE" VARCHAR(500),
-  "MESSAGE" VARCHAR(4000),
+  "DESCRIPTION" VARCHAR(4000),
   "LINE" INTEGER,
   "COST" DOUBLE,
   "STATUS" VARCHAR(10),
@@ -532,8 +532,8 @@ CREATE TABLE "ISSUES" (
   "CHECKSUM" VARCHAR(1000),
   "USER_LOGIN" VARCHAR(40),
   "ASSIGNEE_LOGIN" VARCHAR(40),
-  "PERSON_ID" INTEGER,
-  "DATA" VARCHAR(1000),
+  "AUTHOR_LOGIN" VARCHAR(100),
+  "ATTRIBUTES" VARCHAR(1000),
   "CREATED_AT" TIMESTAMP,
   "UPDATED_AT" TIMESTAMP,
   "CLOSED_AT" TIMESTAMP,
@@ -541,8 +541,8 @@ CREATE TABLE "ISSUES" (
 
 CREATE TABLE "ISSUE_CHANGES" (
   "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
-  "ISSUE_UUID" VARCHAR(36) NOT NULL,
-  "USER_ID" INTEGER,
+  "ISSUE_KEY" VARCHAR(36) NOT NULL,
+  "USER_LOGIN" VARCHAR(40),
   "CHANGE_TYPE" VARCHAR(50),
   "CHANGE_DATA" VARCHAR(4000),
   "MESSAGE"  VARCHAR(16777215),
index 7f27c54d8de70c0f9f850bf48c9631883c7ba505..ace27be4a9c887849cf5e788b81ce2a6af8d25bb 100644 (file)
@@ -42,11 +42,11 @@ public class IssueChangeDaoTest extends AbstractDaoTestCase {
     setupData("insert");
 
     IssueChangeDto dto = new IssueChangeDto();
-    dto.setIssueUuid("100");
-    dto.setUserId(100L);
+    dto.setIssueKey("100");
+    dto.setUserLogin("arthur");
     dto.setChangeType("type");
     dto.setChangeData("data");
-    dto.setMessage("message");
+    dto.setMessage("some message");
 
     Date today = new Date();
     dto.setCreatedAt(today);
@@ -64,10 +64,10 @@ public class IssueChangeDaoTest extends AbstractDaoTestCase {
     IssueChangeDto dto = dao.findById(100L);
     assertThat(dto.getId()).isEqualTo(100L);
     assertThat(dto.getIssueUuid()).isEqualTo("100");
-    assertThat(dto.getUserId()).isEqualTo(100L);
+    assertThat(dto.getUserLogin()).isEqualTo("arthur");
     assertThat(dto.getChangeType()).isEqualTo("type");
     assertThat(dto.getChangeData()).isEqualTo("data");
-    assertThat(dto.getMessage()).isEqualTo("message");
+    assertThat(dto.getMessage()).isEqualTo("some message");
     assertThat(dto.getCreatedAt()).isNull();
     assertThat(dto.getUpdatedAt()).isNull();
   }
index cf670e9750d9542497f82b88c12307e906799043..41fef9417f57e137e3260aa0a7edf4e0f396e382 100644 (file)
@@ -49,7 +49,7 @@ public class IssueDaoTest extends AbstractDaoTestCase {
     setupData("insert");
 
     IssueDto issueDto = new IssueDto();
-    issueDto.setUuid("100");
+    issueDto.setKey("100");
     issueDto.setResourceId(400);
     issueDto.setRuleId(12);
     issueDto.setSeverity("BLOCKER");
@@ -59,7 +59,7 @@ public class IssueDaoTest extends AbstractDaoTestCase {
     issueDto.setDescription("the description");
     issueDto.setCost(10.0);
     issueDto.setChecksum("checksum");
-    issueDto.setPersonId(100L);
+    issueDto.setAuthorLogin("arthur");
 
     Date today = new Date();
     issueDto.setCreatedAt(today);
@@ -86,7 +86,7 @@ public class IssueDaoTest extends AbstractDaoTestCase {
     issue.setTitle("NEW_TITLE");
     issue.setCreatedAt(DateUtils.parseDate("2012-05-18"));
     issue.setUpdatedAt(DateUtils.parseDate("2012-07-01"));
-    issue.setData("big=bang");
+    issue.setAttributes("big=bang");
 
     dao.update(issues);
 
@@ -98,7 +98,7 @@ public class IssueDaoTest extends AbstractDaoTestCase {
     setupData("shared", "should_select_by_id");
     IssueDto issue = dao.selectById(100L);
     assertThat(issue.getId()).isEqualTo(100L);
-    assertThat(issue.getUuid()).isEqualTo("ABCDE");
+    assertThat(issue.getKey()).isEqualTo("ABCDE");
     assertThat(issue.getResourceId()).isEqualTo(400);
     assertThat(issue.getRuleId()).isEqualTo(500);
     assertThat(issue.getSeverity()).isEqualTo("BLOCKER");
@@ -114,7 +114,7 @@ public class IssueDaoTest extends AbstractDaoTestCase {
     assertThat(issue.getPersonId()).isNull();
     assertThat(issue.getUserLogin()).isEqualTo("arthur");
     assertThat(issue.getAssignee()).isEqualTo("perceval");
-    assertThat(issue.getData()).isEqualTo("JIRA=FOO-1234");
+    assertThat(issue.getAttributes()).isEqualTo("JIRA=FOO-1234");
     assertThat(issue.getCreatedAt()).isNotNull();
     assertThat(issue.getUpdatedAt()).isNotNull();
     assertThat(issue.getClosedAt()).isNotNull();
@@ -128,7 +128,7 @@ public class IssueDaoTest extends AbstractDaoTestCase {
     setupData("shared", "should_select_by_key");
 
     IssueDto issue = dao.selectByKey("ABCDE");
-    assertThat(issue.getUuid()).isEqualTo("ABCDE");
+    assertThat(issue.getKey()).isEqualTo("ABCDE");
     assertThat(issue.getId()).isEqualTo(100);
     assertThat(issue.getRuleRepo()).isEqualTo("squid");
     assertThat(issue.getRule()).isEqualTo("AvoidCycle");
index 224e3dfcec7954bd0eec5c410f082c5cf6305108..463ae39b6fb069235fa091a556baafbd789304cc 100644 (file)
@@ -37,13 +37,13 @@ public class IssueDtoTest {
   @Test
   public void set_data_check_maximal_length() {
     thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("Issue data must not exceed 1000 characters: ");
+    thrown.expectMessage("Issue attributes must not exceed 1000 characters: ");
 
     StringBuilder s = new StringBuilder(4500);
     for (int i = 0; i < 4500; i++) {
       s.append('a');
     }
-    new IssueDto().setData(s.toString());
+    new IssueDto().setAttributes(s.toString());
   }
 
   @Test
@@ -53,7 +53,7 @@ public class IssueDtoTest {
     Date closedAt = DateUtils.addDays(new Date(), -1);
 
     IssueDto dto = new IssueDto()
-        .setUuid("100")
+        .setKey("100")
         .setRuleId(1)
         .setRuleKey_unit_test_only("squid", "AvoidCycle")
         .setComponentKey_unit_test_only("component-key")
@@ -69,7 +69,7 @@ public class IssueDtoTest {
         .setManualIssue(true)
         .setUserLogin("arthur")
         .setAssignee("perceval")
-        .setData("key=value")
+        .setAttributes("key=value")
         .setCreatedAt(createdAt)
         .setUpdatedAt(updatedAt)
         .setClosedAt(closedAt);
index 1f82adef2f63695cd067ba4d18ca64417310721b..cf0a89b46106bdb522f604a3d4e38eb642b63326 100644 (file)
@@ -1,11 +1,11 @@
 <dataset>
 
   <issue_changes
-      issue_uuid="100"
-      user_id="100"
+      issue_key="100"
+      user_login="arthur"
       change_type="type"
       change_data="data"
-      message="message"
+      message="some message"
       />
 
 </dataset>
index a5d463ee468b5bde4e65b5b2f52e4ce4fb9cee31..e3e9559f8ca1207eecb137984559e6ac09953b23 100644 (file)
@@ -1,43 +1,23 @@
-<!--
-  ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2008-2012 SonarSource
-  ~ mailto:contact AT sonarsource DOT com
-  ~
-  ~ Sonar is free software; you can redistribute it and/or
-  ~ modify it under the terms of the GNU Lesser General Public
-  ~ License as published by the Free Software Foundation; either
-  ~ version 3 of the License, or (at your option) any later version.
-  ~
-  ~ Sonar is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  ~ Lesser General Public License for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public
-  ~ License along with Sonar; if not, write to the Free Software
-  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
-  -->
-
 <dataset>
 
   <issue_changes
       id="100"
-      issue_uuid="100"
-      user_id="100"
+      issue_key="100"
+      user_login="arthur"
       change_type="type"
       change_data="data"
-      message="message"
+      message="some message"
       created_at="[null]"
       updated_at="[null]"
       />
 
   <issue_changes
       id="101"
-      issue_uuid="100"
-      user_id="100"
+      issue_key="100"
+      user_login="arthur"
       change_type="type"
       change_data="data"
-      message="message"
+      message="some message"
       created_at="[null]"
       updated_at="[null]"
       />
index 461bc8c35301c395ddfa5a43765ff90a381bc601..36b63884e8de45f3c685d187c8ef5a497ebd233e 100644 (file)
@@ -1,14 +1,14 @@
 <dataset>
 
   <issues
-      uuid="100"
+      kee="100"
       resource_id="400"
       rule_id="12"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="the description"
+      description="the description"
       line="200"
       cost="10.0"
       status="OPEN"
@@ -16,8 +16,8 @@
       checksum="checksum"
       user_login="[null]"
       assignee_login="user"
-      person_id="100"
-      data="[null]"
+      author_login="arthur"
+      attributes="[null]"
       />
 
 </dataset>
index 7112b2b49803b4456604151693658606a632aaea..6ec982ab3dee0d341941d48aecf1240253d788b3 100644 (file)
@@ -1,23 +1,3 @@
-<!--
-  ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2008-2012 SonarSource
-  ~ mailto:contact AT sonarsource DOT com
-  ~
-  ~ Sonar is free software; you can redistribute it and/or
-  ~ modify it under the terms of the GNU Lesser General Public
-  ~ License as published by the Free Software Foundation; either
-  ~ version 3 of the License, or (at your option) any later version.
-  ~
-  ~ Sonar is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  ~ Lesser General Public License for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public
-  ~ License along with Sonar; if not, write to the Free Software
-  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
-  -->
-
 <dataset>
 
   <projects id="399" kee="struts" root_id="[null]" />
   <rules id="500" plugin_rule_key="AvoidCycle" plugin_name="squid" />
   <rules id="501" plugin_rule_key="NullRef" plugin_name="squid" />
 
-  <!--&lt;!&ndash; First resource &ndash;&gt;-->
-  <!--<issues-->
-      <!--id="100"-->
-      <!--uuid="100"-->
-      <!--resource_id="400"-->
-      <!--rule_id="500"-->
-      <!--severity="BLOCKER"-->
-      <!--manual_severity="[false]"-->
-      <!--manual_issue="[false]"-->
-      <!--title="[null]"-->
-      <!--message="[null]"-->
-      <!--line="200"-->
-      <!--cost="[null]"-->
-      <!--status="OPEN"-->
-      <!--resolution="[null]"-->
-      <!--checksum="[null]"-->
-      <!--user_login="[null]"-->
-      <!--assignee_login="user"-->
-      <!--person_id="[null]"-->
-      <!--data="[null]"-->
-      <!--created_at="[null]"-->
-      <!--updated_at="[null]"-->
-      <!--closed_at="[null]"-->
-      <!--/>-->
-
-  <!--<issues-->
-      <!--id="101"-->
-      <!--uuid="101"-->
-      <!--resource_id="400"-->
-      <!--rule_id="501"-->
-      <!--severity="MAJOR"-->
-      <!--manual_severity="[false]"-->
-      <!--manual_issue="[false]"-->
-      <!--title="[null]"-->
-      <!--message="[null]"-->
-      <!--line="120"-->
-      <!--cost="[null]"-->
-      <!--status="CLOSED"-->
-      <!--resolution="FIXED"-->
-      <!--checksum="[null]"-->
-      <!--user_login="[null]"-->
-      <!--assignee_login="user"-->
-      <!--person_id="[null]"-->
-      <!--data="[null]"-->
-      <!--created_at="[null]"-->
-      <!--updated_at="[null]"-->
-      <!--closed_at="[null]"-->
-      <!--/>-->
-
-
-  <!--&lt;!&ndash; Second resource &ndash;&gt;-->
-  <!--<issues-->
-      <!--id="102"-->
-      <!--uuid="102"-->
-      <!--resource_id="401"-->
-      <!--rule_id="500"-->
-      <!--severity="BLOCKER"-->
-      <!--manual_severity="[false]"-->
-      <!--manual_issue="[false]"-->
-      <!--title="[null]"-->
-      <!--message="[null]"-->
-      <!--line="200"-->
-      <!--cost="[null]"-->
-      <!--status="OPEN"-->
-      <!--resolution="FIXED"-->
-      <!--checksum="[null]"-->
-      <!--user_login="[null]"-->
-      <!--assignee_login="user"-->
-      <!--person_id="[null]"-->
-      <!--data="[null]"-->
-      <!--created_at="[null]"-->
-      <!--updated_at="[null]"-->
-      <!--closed_at="[null]"-->
-      <!--/>-->
-
-  <!--<issues-->
-      <!--id="103"-->
-      <!--uuid="103"-->
-      <!--resource_id="401"-->
-      <!--rule_id="500"-->
-      <!--severity="BLOCKER"-->
-      <!--manual_severity="[false]"-->
-      <!--manual_issue="[false]"-->
-      <!--title="[null]"-->
-      <!--message="[null]"-->
-      <!--line="200"-->
-      <!--cost="[null]"-->
-      <!--status="REOPENED"-->
-      <!--resolution="FIXED"-->
-      <!--checksum="[null]"-->
-      <!--user_login="[null]"-->
-      <!--assignee_login="user"-->
-      <!--person_id="[null]"-->
-      <!--data="[null]"-->
-      <!--created_at="[null]"-->
-      <!--updated_at="[null]"-->
-      <!--closed_at="[null]"-->
-      <!--/>-->
-
-  <!--<issues-->
-      <!--id="104"-->
-      <!--uuid="104"-->
-      <!--resource_id="401"-->
-      <!--rule_id="500"-->
-      <!--severity="BLOCKER"-->
-      <!--manual_severity="[false]"-->
-      <!--manual_issue="[false]"-->
-      <!--title="[null]"-->
-      <!--message="[null]"-->
-      <!--line="200"-->
-      <!--cost="[null]"-->
-      <!--status="[null]"-->
-      <!--resolution="FALSE-POSITIVE"-->
-      <!--checksum="[null]"-->
-      <!--user_login="[null]"-->
-      <!--assignee_login="user"-->
-      <!--person_id="[null]"-->
-      <!--data="[null]"-->
-      <!--created_at="[null]"-->
-      <!--updated_at="[null]"-->
-      <!--closed_at="[null]"-->
-      <!--/>-->
-
 </dataset>
index 39b6ef6681d4bc89e245a7c5a13d090b16054452..31c11303b4269dfcd60c25720f90fdb3ff6bdb5e 100644 (file)
@@ -3,14 +3,14 @@
   <!-- rule 500 -->
   <issues
       id="100"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -18,8 +18,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
 
   <issues
       id="101"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -42,8 +42,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
   <!-- rule 501 -->
   <issues
       id="102"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="501"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -68,8 +68,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
index a0d42686118be2f9d6e13fb6ab1df31fb22892c2..0d7e81eaa158fa8a6086c42f9d1158634312eeeb 100644 (file)
@@ -1,35 +1,15 @@
-<!--
-  ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2008-2012 SonarSource
-  ~ mailto:contact AT sonarsource DOT com
-  ~
-  ~ Sonar is free software; you can redistribute it and/or
-  ~ modify it under the terms of the GNU Lesser General Public
-  ~ License as published by the Free Software Foundation; either
-  ~ version 3 of the License, or (at your option) any later version.
-  ~
-  ~ Sonar is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  ~ Lesser General Public License for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public
-  ~ License along with Sonar; if not, write to the Free Software
-  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
-  -->
-
 <dataset>
 
   <issues
       id="100"
-      uuid="100"
+      kee="100"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="[null]"
       status="OPEN"
@@ -37,8 +17,8 @@
       checksum="[null]"
       user_login="user"
       assignee_login="user"
-      person_id="[null]"
-      data="[null]"
+      author_login="[null]"
+      attributes="[null]"
       created_at="[null]"
       updated_at="[null]"
       closed_at="[null]"
 
   <issues
       id="101"
-      uuid="101"
+      kee="101"
       resource_id="401"
       rule_id="501"
       severity="MAJOR"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="120"
       cost="[null]"
       status="CLOSED"
       checksum="[null]"
       user_login="[null]"
       assignee_login="user"
-      person_id="[null]"
-      data="[null]"
+      author_login="[null]"
+      attributes="[null]"
       created_at="[null]"
       updated_at="[null]"
       closed_at="[null]"
       />
 
-
-
 </dataset>
index 4e3977640cfd060fe7abbe2297a0193006b9c345..0be9f22976a9543ed1a9857445b1664f1c5b3819 100644 (file)
@@ -2,14 +2,14 @@
 
   <issues
       id="100"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -17,8 +17,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
index 2bd2c2ab619400b5ad704ec6a611c7e1e2d7af3d..0be9f22976a9543ed1a9857445b1664f1c5b3819 100644 (file)
@@ -1,35 +1,15 @@
-<!--
-  ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2008-2012 SonarSource
-  ~ mailto:contact AT sonarsource DOT com
-  ~
-  ~ Sonar is free software; you can redistribute it and/or
-  ~ modify it under the terms of the GNU Lesser General Public
-  ~ License as published by the Free Software Foundation; either
-  ~ version 3 of the License, or (at your option) any later version.
-  ~
-  ~ Sonar is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  ~ Lesser General Public License for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public
-  ~ License along with Sonar; if not, write to the Free Software
-  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
-  -->
-
 <dataset>
 
   <issues
       id="100"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -37,8 +17,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
index 4e3977640cfd060fe7abbe2297a0193006b9c345..0be9f22976a9543ed1a9857445b1664f1c5b3819 100644 (file)
@@ -2,14 +2,14 @@
 
   <issues
       id="100"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -17,8 +17,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
index 4e3977640cfd060fe7abbe2297a0193006b9c345..0be9f22976a9543ed1a9857445b1664f1c5b3819 100644 (file)
@@ -2,14 +2,14 @@
 
   <issues
       id="100"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -17,8 +17,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
index 39b6ef6681d4bc89e245a7c5a13d090b16054452..b4126a6a8e8a8c868c3095a39ab2b79b448b89ae 100644 (file)
@@ -3,14 +3,14 @@
   <!-- rule 500 -->
   <issues
       id="100"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -18,8 +18,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
 
   <issues
       id="101"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
@@ -42,8 +42,8 @@
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
   <!-- rule 501 -->
   <issues
       id="102"
-      uuid="ABCDE"
+      kee="ABCDE"
       resource_id="400"
       rule_id="501"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="4.2"
       status="OPEN"
       checksum="XXX"
       user_login="arthur"
       assignee_login="perceval"
-      person_id="[null]"
-      data="JIRA=FOO-1234"
+      author_login="[null]"
+      attributes="JIRA=FOO-1234"
       created_at="2013-04-16"
       updated_at="2013-04-16"
       closed_at="2013-04-16"
       />
+
 </dataset>
index 9f0f803543dc744027c845919672ff9420851d62..3457c42397748c1451ff5bd1e373298908c4ab61 100644 (file)
@@ -1,35 +1,15 @@
-<!--
-  ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2008-2012 SonarSource
-  ~ mailto:contact AT sonarsource DOT com
-  ~
-  ~ Sonar is free software; you can redistribute it and/or
-  ~ modify it under the terms of the GNU Lesser General Public
-  ~ License as published by the Free Software Foundation; either
-  ~ version 3 of the License, or (at your option) any later version.
-  ~
-  ~ Sonar is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  ~ Lesser General Public License for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public
-  ~ License along with Sonar; if not, write to the Free Software
-  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
-  -->
-
 <dataset>
 
   <issues
       id="100"
-      uuid="100"
+      kee="100"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="[null]"
       status="OPEN"
@@ -37,8 +17,8 @@
       checksum="[null]"
       user_login="user"
       assignee_login="user"
-      person_id="[null]"
-      data="[null]"
+      author_login="[null]"
+      attributes="[null]"
       created_at="2013-04-16"
       updated_at="[null]"
       closed_at="[null]"
 
   <issues
       id="101"
-      uuid="101"
+      kee="101"
       resource_id="401"
       rule_id="501"
       severity="MAJOR"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="120"
       cost="[null]"
       status="OPEN"
@@ -61,8 +41,8 @@
       checksum="[null]"
       user_login="[null]"
       assignee_login="user"
-      person_id="[null]"
-      data="[null]"
+      author_login="[null]"
+      attributes="[null]"
       created_at="2013-04-10"
       updated_at="[null]"
       closed_at="[null]"
 
   <issues
       id="102"
-      uuid="102"
+      kee="102"
       resource_id="401"
       rule_id="501"
       severity="MAJOR"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="120"
       cost="[null]"
       status="CLOSED"
       checksum="[null]"
       user_login="[null]"
       assignee_login="user"
-      person_id="[null]"
-      data="[null]"
+      author_login="[null]"
+      attributes="[null]"
       created_at="2013-04-10"
       updated_at="[null]"
       closed_at="[null]"
       />
+
 </dataset>
index 02d013be94b34ecb3f08128862e488b2d906cf58..7fa92d380bcc726a229eec4d3c3b4ad4f30b5b02 100644 (file)
@@ -2,14 +2,14 @@
 
   <issues
       id="100"
-      uuid="100"
+      kee="100"
       resource_id="400"
       rule_id="500"
       severity="NEW_SEV"
       manual_severity="[true]"
       manual_issue="[false]"
       title="NEW_TITLE"
-      message="[null]"
+      description="[null]"
       line="1000"
       cost="[null]"
       status="NEW_STATUS"
@@ -17,8 +17,8 @@
       checksum="[null]"
       user_login="user"
       assignee_login="new_user"
-      person_id="[null]"
-      data="big=bang"
+      author_login="[null]"
+      attributes="big=bang"
       created_at="2012-05-18"
       updated_at="2012-07-01"
       closed_at="[null]"
index 54735aedbb85d3c1158678deef270873a0674b99..b83b83c4670396740b6c3ec46747124af10dda58 100644 (file)
@@ -2,14 +2,14 @@
 
   <issues
       id="100"
-      uuid="100"
+      kee="100"
       resource_id="400"
       rule_id="500"
       severity="BLOCKER"
       manual_severity="[false]"
       manual_issue="[false]"
       title="[null]"
-      message="[null]"
+      description="[null]"
       line="200"
       cost="[null]"
       status="OPEN"
@@ -17,8 +17,8 @@
       checksum="[null]"
       user_login="user"
       assignee_login="user"
-      person_id="[null]"
-      data="prop1=foo;prop2=bar"
+      author_login="[null]"
+      attributes="prop1=foo;prop2=bar"
       created_at="[null]"
       updated_at="[null]"
       closed_at="[null]"
index 2c1b363080b28e6a5d8101adb304aa1fb02b929b..8a28f98bd473f9f422b9000e531ffcf1b0ca7c00 100644 (file)
@@ -25,14 +25,14 @@ class CreateIssues < ActiveRecord::Migration
 
   def self.up
     create_table :issues do |t|
-      t.column :uuid,                 :string,    :null => false,   :limit => 36
+      t.column :kee,                  :string,    :null => false,   :limit => 36
       t.column :resource_id,          :integer,   :null => false
       t.column :rule_id,              :integer,   :null => false
       t.column :severity,                                        :string,        :null => true,          :limit => 10
       t.column :manual_severity,      :boolean,   :null => false
       t.column :manual_issue,         :boolean,   :null => false
       t.column :title,                :string ,   :null => true,    :limit => 500
-      t.column :message,              :string,    :null => true,    :limit => 4000
+      t.column :description,          :string,    :null => true,    :limit => 4000
       t.column :line,                 :integer,   :null => true
       t.column :cost,                 :decimal,   :null => true,    :precision => 30,   :scale => 20
       t.column :status,               :string ,   :null => true,    :limit => 10
@@ -40,8 +40,8 @@ class CreateIssues < ActiveRecord::Migration
       t.column :checksum,             :string ,   :null => true,    :limit => 1000
       t.column :user_login,           :string,    :null => true,         :limit => 40
       t.column :assignee_login,       :string,    :null => true,         :limit => 40
-      t.column :person_id   ,         :integer,   :null => true
-      t.column :data,                 :string,    :null => true,    :limit => 1000
+      t.column :author_login,         :string,    :null => true,    :limit => 100
+      t.column :attributes,           :string,    :null => true,    :limit => 1000
       t.column :created_at,           :datetime,  :null => true
       t.column :updated_at,           :datetime,  :null => true
       t.column :closed_at,            :datetime,  :null => true
index 8dcb3f43020cc00821001cdfb1fa4595d67b0a73..995f98683383b7c3a946147bec15491c07e334a7 100644 (file)
@@ -25,8 +25,8 @@ class CreateIssueChanges < ActiveRecord::Migration
 
   def self.up
     create_table :issue_changes do |t|
-      t.column :issue_uuid,         :string,    :null => false,   :limit => 36
-      t.column :user_id,            :integer,   :null => true
+      t.column :issue_key,          :string,    :null => false,   :limit => 36
+      t.column :user_login,         :string,    :null => true,   :limit => 40
       t.column :change_type,                           :string,          :null => true,          :limit => 50
       t.column :change_data,        :string,    :null => true,    :limit => 4000
       t.column :message,            :text,      :null => true