}
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());
}
}
private void closeResolvedStandardIssues(IssueDto openIssue, Set<String> issueKeys) {
- if (!openIssue.isManualIssue() && !issueKeys.contains(openIssue.getUuid())) {
+ if (!openIssue.isManualIssue() && !issueKeys.contains(openIssue.getKey())) {
closeAndSave(openIssue);
}
}
@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");
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);
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);
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);
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);
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);
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);
<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
<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
<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
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;
}
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;
}
public final class IssueDto {
private Long id;
- private String uuid;
+ private String kee;
private Integer resourceId;
private Integer ruleId;
private String severity;
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;
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;
}
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;
}
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())
.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()
;
public DefaultIssue toDefaultIssue() {
DefaultIssue issue = new DefaultIssue();
- issue.setKey(uuid);
+ issue.setKey(kee);
issue.setStatus(status);
issue.setResolution(resolution);
issue.setDescription(description);
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);
<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,
</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 -->
<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">
<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>
<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,
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">
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">
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>
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),
"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,
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),
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);
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();
}
setupData("insert");
IssueDto issueDto = new IssueDto();
- issueDto.setUuid("100");
+ issueDto.setKey("100");
issueDto.setResourceId(400);
issueDto.setRuleId(12);
issueDto.setSeverity("BLOCKER");
issueDto.setDescription("the description");
issueDto.setCost(10.0);
issueDto.setChecksum("checksum");
- issueDto.setPersonId(100L);
+ issueDto.setAuthorLogin("arthur");
Date today = new Date();
issueDto.setCreatedAt(today);
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);
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");
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();
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");
@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
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")
.setManualIssue(true)
.setUserLogin("arthur")
.setAssignee("perceval")
- .setData("key=value")
+ .setAttributes("key=value")
.setCreatedAt(createdAt)
.setUpdatedAt(updatedAt)
.setClosedAt(closedAt);
<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>
-<!--
- ~ 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]"
/>
<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"
checksum="checksum"
user_login="[null]"
assignee_login="user"
- person_id="100"
- data="[null]"
+ author_login="arthur"
+ attributes="[null]"
/>
</dataset>
-<!--
- ~ 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" />
- <!--<!– First resource –>-->
- <!--<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]"-->
- <!--/>-->
-
-
- <!--<!– Second resource –>-->
- <!--<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>
<!-- 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"
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"
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"
-<!--
- ~ 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"
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>
<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"
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"
-<!--
- ~ 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"
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="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"
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="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"
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 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"
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"
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>
-<!--
- ~ 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"
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"
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>
<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"
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]"
<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"
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]"
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
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
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