]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9567 drop fields "attributes", "gap" and "updatedAt" from ES index "issues"
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 18 Jul 2017 17:55:06 +0000 (19:55 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 19 Jul 2017 18:47:45 +0000 (20:47 +0200)
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueDoc.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndexDefinition.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIteratorForSingleChunk.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueDocTesting.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIteratorFactoryTest.java

index 4f649b9343e69e9694e9fe05166f64d0d99cad96..c0027758b0df6dfd5c6a9d871a9774db27ff6280 100644 (file)
@@ -21,23 +21,18 @@ package org.sonar.server.issue.index;
 
 import com.google.common.collect.Maps;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Date;
-import java.util.List;
 import java.util.Map;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 import org.apache.commons.lang.BooleanUtils;
-import org.sonar.api.issue.Issue;
-import org.sonar.api.issue.IssueComment;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.rules.RuleType;
 import org.sonar.api.utils.Duration;
-import org.sonar.api.utils.KeyValueFormat;
 import org.sonar.server.es.BaseDoc;
 
-public class IssueDoc extends BaseDoc implements Issue {
+public class IssueDoc extends BaseDoc {
 
   public IssueDoc(Map<String, Object> fields) {
     super(fields);
@@ -62,17 +57,10 @@ public class IssueDoc extends BaseDoc implements Issue {
     return projectUuid();
   }
 
-  @Override
   public String key() {
     return getField(IssueIndexDefinition.FIELD_ISSUE_KEY);
   }
 
-  @Override
-  public String componentKey() {
-    throw new IllegalStateException("componentKey is not available on server side");
-  }
-
-  @Override
   public String componentUuid() {
     return getField(IssueIndexDefinition.FIELD_ISSUE_COMPONENT_UUID);
   }
@@ -86,27 +74,18 @@ public class IssueDoc extends BaseDoc implements Issue {
     return getField(IssueIndexDefinition.FIELD_ISSUE_MODULE_PATH);
   }
 
-  @Override
-  public String projectKey() {
-    throw new IllegalStateException("projectKey is not available on server side");
-  }
-
-  @Override
   public String projectUuid() {
     return getField(IssueIndexDefinition.FIELD_ISSUE_PROJECT_UUID);
   }
 
-  @Override
   public RuleKey ruleKey() {
     return RuleKey.parse(getField(IssueIndexDefinition.FIELD_ISSUE_RULE_KEY));
   }
 
-  @Override
   public String language() {
     return getField(IssueIndexDefinition.FIELD_ISSUE_LANGUAGE);
   }
 
-  @Override
   public String severity() {
     return getField(IssueIndexDefinition.FIELD_ISSUE_SEVERITY);
   }
@@ -120,56 +99,25 @@ public class IssueDoc extends BaseDoc implements Issue {
     return getNullableField(IssueIndexDefinition.FIELD_ISSUE_CHECKSUM);
   }
 
-  @Override
   @CheckForNull
   public String message() {
     return getNullableField(IssueIndexDefinition.FIELD_ISSUE_MESSAGE);
   }
 
-  @Override
   @CheckForNull
   public Integer line() {
     return getNullableField(IssueIndexDefinition.FIELD_ISSUE_LINE);
   }
 
-  /**
-   * @deprecated since 5.5, replaced by {@link #gap()}
-   */
-  @Deprecated
-  @Override
-  @CheckForNull
-  public Double effortToFix() {
-    throw new UnsupportedOperationException("effortToFix is replaced by gap");
-  }
-
-  @Override
-  @CheckForNull
-  public Double gap() {
-    return getNullableField(IssueIndexDefinition.FIELD_ISSUE_GAP);
-  }
-
-  @Override
   public String status() {
     return getField(IssueIndexDefinition.FIELD_ISSUE_STATUS);
   }
 
-  @Override
   @CheckForNull
   public String resolution() {
     return getNullableField(IssueIndexDefinition.FIELD_ISSUE_RESOLUTION);
   }
 
-  /**
-   * @deprecated since 5.5
-   */
-  @Deprecated
-  @Override
-  @CheckForNull
-  public String reporter() {
-    throw new UnsupportedOperationException("manual issue feature has been dropped");
-  }
-
-  @Override
   @CheckForNull
   public String assignee() {
     return getNullableField(IssueIndexDefinition.FIELD_ISSUE_ASSIGNEE);
@@ -178,7 +126,6 @@ public class IssueDoc extends BaseDoc implements Issue {
   /**
    * Functional date
    */
-  @Override
   public Date creationDate() {
     return getFieldAsDate(IssueIndexDefinition.FIELD_ISSUE_FUNC_CREATED_AT);
   }
@@ -186,71 +133,24 @@ public class IssueDoc extends BaseDoc implements Issue {
   /**
    * Functional date
    */
-  @Override
   public Date updateDate() {
     return getFieldAsDate(IssueIndexDefinition.FIELD_ISSUE_FUNC_UPDATED_AT);
   }
 
-  @Override
   @CheckForNull
   public Date closeDate() {
     return getNullableFieldAsDate(IssueIndexDefinition.FIELD_ISSUE_FUNC_CLOSED_AT);
   }
 
-  @Override
-  @CheckForNull
-  public String attribute(String key) {
-    return attributes().get(key);
-  }
-
-  @Override
-  public Map<String, String> attributes() {
-    String data = getNullableField(IssueIndexDefinition.FIELD_ISSUE_ATTRIBUTES);
-    if (data == null) {
-      return Collections.emptyMap();
-    } else {
-      return KeyValueFormat.parse(data);
-    }
-  }
-
-  @Override
   @CheckForNull
   public String authorLogin() {
     return getNullableField(IssueIndexDefinition.FIELD_ISSUE_AUTHOR_LOGIN);
   }
 
-  @Override
-  @CheckForNull
-  public String actionPlanKey() {
-    // since 5.5, action plan is dropped. Kept for API compatibility
-    return null;
-  }
-
   public RuleType type() {
     return RuleType.valueOf(getField(IssueIndexDefinition.FIELD_ISSUE_TYPE));
   }
 
-  @Override
-  public List<IssueComment> comments() {
-    throw new IllegalStateException("Comments are not availables in index");
-  }
-
-  @Override
-  public boolean isNew() {
-    throw new IllegalStateException("isNew is only available for batch");
-  }
-
-  /**
-   * @deprecated since 5.5, replaced by {@link #effort()}
-   */
-  @Override
-  @CheckForNull
-  @Deprecated
-  public Duration debt() {
-    throw new UnsupportedOperationException("debt is replaced by effort");
-  }
-
-  @Override
   @CheckForNull
   public Duration effort() {
     Number effort = getNullableField(IssueIndexDefinition.FIELD_ISSUE_EFFORT);
@@ -328,11 +228,6 @@ public class IssueDoc extends BaseDoc implements Issue {
     return this;
   }
 
-  public IssueDoc setGap(@Nullable Double d) {
-    setField(IssueIndexDefinition.FIELD_ISSUE_GAP, d);
-    return this;
-  }
-
   public IssueDoc setStatus(@Nullable String s) {
     setField(IssueIndexDefinition.FIELD_ISSUE_STATUS, s);
     return this;
@@ -358,25 +253,11 @@ public class IssueDoc extends BaseDoc implements Issue {
     return this;
   }
 
-  public Date getTechnicalUpdateDate() {
-    return getFieldAsDate(IssueIndexDefinition.FIELD_ISSUE_TECHNICAL_UPDATED_AT);
-  }
-
-  public IssueDoc setTechnicalUpdateDate(@Nullable Date d) {
-    setField(IssueIndexDefinition.FIELD_ISSUE_TECHNICAL_UPDATED_AT, d);
-    return this;
-  }
-
   public IssueDoc setFuncCloseDate(@Nullable Date d) {
     setField(IssueIndexDefinition.FIELD_ISSUE_FUNC_CLOSED_AT, d);
     return this;
   }
 
-  public IssueDoc setAttributes(@Nullable String s) {
-    setField(IssueIndexDefinition.FIELD_ISSUE_ATTRIBUTES, s);
-    return this;
-  }
-
   public IssueDoc setAuthorLogin(@Nullable String s) {
     setField(IssueIndexDefinition.FIELD_ISSUE_AUTHOR_LOGIN, s);
     return this;
@@ -402,9 +283,8 @@ public class IssueDoc extends BaseDoc implements Issue {
     return this;
   }
 
-  @Override
   @CheckForNull
-  public Collection<String> tags() {
+  public Collection<String> getTags() {
     return getNullableField(IssueIndexDefinition.FIELD_ISSUE_TAGS);
   }
 
index 37c1cf6d8abedd5292e42abaf15cdc11a4f40147..14acde7b959efe5266d4bc17f1d2c3093e57c7ec 100644 (file)
@@ -33,11 +33,9 @@ public class IssueIndexDefinition implements IndexDefinition {
 
   public static final IndexType INDEX_TYPE_ISSUE = new IndexType("issues", "issue");
   public static final String FIELD_ISSUE_ASSIGNEE = "assignee";
-  public static final String FIELD_ISSUE_ATTRIBUTES = "attributes";
   public static final String FIELD_ISSUE_AUTHOR_LOGIN = "authorLogin";
   public static final String FIELD_ISSUE_COMPONENT_UUID = "component";
   public static final String FIELD_ISSUE_EFFORT = "effort";
-  public static final String FIELD_ISSUE_GAP = "gap";
   public static final String FIELD_ISSUE_FILE_PATH = "filePath";
   /**
    * Functional date
@@ -69,10 +67,6 @@ public class IssueIndexDefinition implements IndexDefinition {
   public static final String FIELD_ISSUE_CHECKSUM = "checksum";
   public static final String FIELD_ISSUE_TAGS = "tags";
   public static final String FIELD_ISSUE_TYPE = "type";
-  /**
-   * Technical date
-   */
-  public static final String FIELD_ISSUE_TECHNICAL_UPDATED_AT = "updatedAt";
 
   private final Configuration config;
 
@@ -91,11 +85,9 @@ public class IssueIndexDefinition implements IndexDefinition {
     type.requireProjectAuthorization();
 
     type.stringFieldBuilder(FIELD_ISSUE_ASSIGNEE).disableNorms().addSubFields(SORTABLE_ANALYZER).build();
-    type.stringFieldBuilder(FIELD_ISSUE_ATTRIBUTES).disableNorms().disableSearch().build();
     type.stringFieldBuilder(FIELD_ISSUE_AUTHOR_LOGIN).disableNorms().build();
     type.stringFieldBuilder(FIELD_ISSUE_COMPONENT_UUID).disableNorms().build();
     type.createLongField(FIELD_ISSUE_EFFORT);
-    type.createDoubleField(FIELD_ISSUE_GAP);
     type.stringFieldBuilder(FIELD_ISSUE_FILE_PATH).disableNorms().addSubFields(SORTABLE_ANALYZER).build();
     type.createDateTimeField(FIELD_ISSUE_FUNC_CREATED_AT);
     type.createDateTimeField(FIELD_ISSUE_FUNC_UPDATED_AT);
@@ -115,7 +107,6 @@ public class IssueIndexDefinition implements IndexDefinition {
     type.createByteField(FIELD_ISSUE_SEVERITY_VALUE);
     type.stringFieldBuilder(FIELD_ISSUE_STATUS).disableNorms().addSubFields(SORTABLE_ANALYZER).build();
     type.stringFieldBuilder(FIELD_ISSUE_TAGS).disableNorms().build();
-    type.createDateTimeField(FIELD_ISSUE_TECHNICAL_UPDATED_AT);
     type.stringFieldBuilder(FIELD_ISSUE_TYPE).disableNorms().build();
   }
 }
index 66acfe99ddf05d8ed6401f6d3e7b61a256d48c13..ff61ab972e5aca5ce721b47b9261967b96f39390 100644 (file)
@@ -28,7 +28,6 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.Collection;
-import java.util.Date;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 import javax.annotation.CheckForNull;
@@ -56,19 +55,16 @@ class IssueIteratorForSingleChunk implements IssueIterator {
     // column 1
     "i.kee",
     "root.uuid",
-    "i.updated_at",
     "i.assignee",
-    "i.gap",
-    "i.issue_attributes",
     "i.line",
     "i.message",
     "i.resolution",
     "i.severity",
-
-    // column 11
     "i.manual_severity",
     "i.checksum",
     "i.status",
+
+    // column 11
     "i.effort",
     "i.author_login",
     "i.issue_close_date",
@@ -76,11 +72,11 @@ class IssueIteratorForSingleChunk implements IssueIterator {
     "i.issue_update_date",
     "r.plugin_name",
     "r.plugin_rule_key",
-
-    // column 21
     "r.language",
     "p.uuid",
     "p.module_uuid_path",
+
+    // column 21
     "p.path",
     "p.scope",
     "p.organization_uuid",
@@ -199,38 +195,35 @@ class IssueIteratorForSingleChunk implements IssueIterator {
       // all the fields must be present, even if value is null
       doc.setKey(key);
       doc.setProjectUuid(projectUuid);
-      doc.setTechnicalUpdateDate(new Date(rs.getLong(3)));
-      doc.setAssignee(rs.getString(4));
-      doc.setGap(DatabaseUtils.getDouble(rs, 5));
-      doc.setAttributes(rs.getString(6));
-      doc.setLine(DatabaseUtils.getInt(rs, 7));
-      doc.setMessage(rs.getString(8));
-      doc.setResolution(rs.getString(9));
-      doc.setSeverity(rs.getString(10));
-      doc.setManualSeverity(rs.getBoolean(11));
-      doc.setChecksum(rs.getString(12));
-      doc.setStatus(rs.getString(13));
-      doc.setEffort(getLong(rs, 14));
-      doc.setAuthorLogin(rs.getString(15));
-      doc.setFuncCloseDate(longToDate(getLong(rs, 16)));
-      doc.setFuncCreationDate(longToDate(getLong(rs, 17)));
-      doc.setFuncUpdateDate(longToDate(getLong(rs, 18)));
-      String ruleRepo = rs.getString(19);
-      String ruleKey = rs.getString(20);
+      doc.setAssignee(rs.getString(3));
+      doc.setLine(DatabaseUtils.getInt(rs, 4));
+      doc.setMessage(rs.getString(5));
+      doc.setResolution(rs.getString(6));
+      doc.setSeverity(rs.getString(7));
+      doc.setManualSeverity(rs.getBoolean(8));
+      doc.setChecksum(rs.getString(9));
+      doc.setStatus(rs.getString(10));
+      doc.setEffort(getLong(rs, 11));
+      doc.setAuthorLogin(rs.getString(12));
+      doc.setFuncCloseDate(longToDate(getLong(rs, 13)));
+      doc.setFuncCreationDate(longToDate(getLong(rs, 14)));
+      doc.setFuncUpdateDate(longToDate(getLong(rs, 15)));
+      String ruleRepo = rs.getString(16);
+      String ruleKey = rs.getString(17);
       doc.setRuleKey(RuleKey.of(ruleRepo, ruleKey).toString());
-      doc.setLanguage(rs.getString(21));
-      doc.setComponentUuid(rs.getString(22));
-      String moduleUuidPath = rs.getString(23);
+      doc.setLanguage(rs.getString(18));
+      doc.setComponentUuid(rs.getString(19));
+      String moduleUuidPath = rs.getString(20);
       doc.setModuleUuid(extractModule(moduleUuidPath));
       doc.setModuleUuidPath(moduleUuidPath);
-      String scope = rs.getString(25);
-      String filePath = extractFilePath(rs.getString(24), scope);
+      String scope = rs.getString(22);
+      String filePath = extractFilePath(rs.getString(21), scope);
       doc.setFilePath(filePath);
       doc.setDirectoryPath(extractDirPath(doc.filePath(), scope));
-      doc.setOrganizationUuid(rs.getString(26));
-      String tags = rs.getString(27);
+      doc.setOrganizationUuid(rs.getString(23));
+      String tags = rs.getString(24);
       doc.setTags(ImmutableList.copyOf(IssueIteratorForSingleChunk.TAGS_SPLITTER.split(tags == null ? "" : tags)));
-      doc.setType(RuleType.valueOf(rs.getInt(28)));
+      doc.setType(RuleType.valueOf(rs.getInt(25)));
       return doc;
     }
 
index 1f0f41b509942eef9f03c810fdf17bf57d80b313..f3195d162d928a70c9db9bbaea19b82d7ceccabb 100644 (file)
@@ -40,7 +40,6 @@ public class IssueDocTesting {
     doc.setAuthorLogin("roger");
     doc.setLanguage("xoo");
     doc.setComponentUuid("FILE_1");
-    doc.setGap(3.14);
     doc.setFilePath("src/Foo.xoo");
     doc.setDirectoryPath("/src");
     doc.setMessage("the message");
@@ -48,7 +47,6 @@ public class IssueDocTesting {
     doc.setModuleUuidPath("MODULE_1");
     doc.setProjectUuid("PROJECT_1");
     doc.setLine(42);
-    doc.setAttributes(null);
     doc.setStatus(Issue.STATUS_OPEN);
     doc.setResolution(null);
     doc.setSeverity(Severity.MAJOR);
@@ -58,7 +56,6 @@ public class IssueDocTesting {
     doc.setFuncCreationDate(DateUtils.parseDate("2014-09-04"));
     doc.setFuncUpdateDate(DateUtils.parseDate("2014-12-04"));
     doc.setFuncCloseDate(null);
-    doc.setTechnicalUpdateDate(DateUtils.parseDate("2014-12-04"));
     return doc;
   }
 
index 526768f9998ed39fc883343632803c78d89bea4f..cc753f3b3e8be8018748310eb24116847b208dde 100644 (file)
@@ -40,9 +40,6 @@ import org.sonar.db.organization.OrganizationTesting;
 import org.sonar.db.rule.RuleDao;
 import org.sonar.db.rule.RuleDto;
 import org.sonar.db.rule.RuleTesting;
-import org.sonar.server.es.SearchOptions;
-import org.sonar.server.es.SearchResult;
-import org.sonar.server.issue.index.IssueDoc;
 import org.sonar.server.issue.index.IssueIndex;
 import org.sonar.server.issue.index.IssueIndexer;
 import org.sonar.server.permission.index.PermissionIndexer;
@@ -50,7 +47,6 @@ import org.sonar.server.rule.index.RuleIndexer;
 import org.sonar.server.tester.ServerTester;
 import org.sonar.server.tester.UserSessionRule;
 
-import static com.google.common.collect.Lists.newArrayList;
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -171,9 +167,4 @@ public class IssueServiceMediumTest {
     tester.get(IssueIndexer.class).index(asList(issue.getKey()));
     return issue;
   }
-
-  private Issue getIssueByKey(String key) {
-    SearchResult<IssueDoc> result = issueIndex.search(IssueQuery.builder().issueKeys(newArrayList(key)).build(), new SearchOptions());
-    return result.getDocs().get(0);
-  }
 }
index 16d46b6f3a70f5ee1ce7eb7a04c2b3a4d257e461..8417ea9602d1d833c7250d1262126787b2086f64 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.sonar.server.issue.index;
 
-import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterators;
 import com.google.common.collect.Lists;
 import java.util.Date;
@@ -37,7 +36,6 @@ import org.sonar.api.resources.Scopes;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.rule.Severity;
 import org.sonar.api.utils.Duration;
-import org.sonar.api.utils.KeyValueFormat;
 import org.sonar.api.utils.System2;
 import org.sonar.db.DbTester;
 import org.sonar.db.component.ComponentDto;
@@ -115,51 +113,18 @@ public class IssueIndexTest {
       .setEffort(100L);
     indexIssues(issue);
 
-    Issue loaded = getByKey(issue.key());
+    IssueDoc loaded = getByKey(issue.key());
     assertThat(loaded).isNotNull();
 
     assertThat(loaded.key()).isEqualTo("ISSUE1");
     assertThat(loaded.effort()).isEqualTo(Duration.create(100L));
   }
 
-  private Issue getByKey(String key) {
+  private IssueDoc getByKey(String key) {
     SearchResult<IssueDoc> result = underTest.search(IssueQuery.builder().issueKeys(newArrayList(key)).build(), new SearchOptions());
     return result.getDocs().get(0);
   }
 
-  @Test
-  public void get_by_key_with_attributes() {
-    ComponentDto project = ComponentTesting.newPrivateProjectDto(newOrganizationDto());
-    ComponentDto file = newFileDto(project, null);
-    IssueDoc issue = newDoc("ISSUE1", file).setAttributes((KeyValueFormat.format(ImmutableMap.of("jira-issue-key", "SONAR-1234"))));
-    indexIssues(issue);
-
-    Issue result = getByKey(issue.key());
-    assertThat(result.attribute("jira-issue-key")).isEqualTo("SONAR-1234");
-  }
-
-  @Test(expected = IllegalStateException.class)
-  public void comments_field_is_not_available() {
-    ComponentDto project = ComponentTesting.newPrivateProjectDto(newOrganizationDto());
-    ComponentDto file = newFileDto(project, null);
-    IssueDoc issue = newDoc("ISSUE1", file);
-    indexIssues(issue);
-
-    Issue result = getByKey(issue.key());
-    result.comments();
-  }
-
-  @Test(expected = IllegalStateException.class)
-  public void is_new_field_is_not_available() {
-    ComponentDto project = ComponentTesting.newPrivateProjectDto(newOrganizationDto());
-    ComponentDto file = newFileDto(project, null);
-    IssueDoc issue = newDoc("ISSUE1", file);
-    indexIssues(issue);
-
-    Issue result = getByKey(issue.key());
-    result.isNew();
-  }
-
   @Test
   public void filter_by_keys() {
     ComponentDto project = ComponentTesting.newPrivateProjectDto(newOrganizationDto());
index 410aae889c6ab3d7f09db84eb5150d45cb20fd9e..d19e6a6078abc073dcb0996cd39d0fc8d2dcffa3 100644 (file)
@@ -21,7 +21,6 @@ package org.sonar.server.issue.index;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Date;
 import java.util.List;
 import java.util.NoSuchElementException;
 import org.apache.commons.lang.StringUtils;
@@ -173,8 +172,6 @@ public class IssueIndexerTest {
     assertThat(doc.organizationUuid()).isEqualTo(org.getUuid());
     // functional date
     assertThat(doc.updateDate().getTime()).isEqualTo(issue.getIssueUpdateTime());
-    // technical date
-    assertThat(doc.getTechnicalUpdateDate().getTime()).isEqualTo(issue.getUpdatedAt());
   }
 
   @Test
@@ -241,7 +238,6 @@ public class IssueIndexerTest {
   public void index_issue_without_parent_should_work() {
     IssueDoc issueDoc = new IssueDoc();
     issueDoc.setKey("key");
-    issueDoc.setTechnicalUpdateDate(new Date());
     issueDoc.setProjectUuid("non-exitsing-parent");
     new IssueIndexer(esTester.client(), new IssueIteratorFactory(dbTester.getDbClient()))
       .index(asList(issueDoc).iterator());
index de0d57a9372624d6c078661512eb6a37d1dccc7c..81249569b4e3a066a53ed2fade993e293e1180fa 100644 (file)
@@ -59,10 +59,8 @@ public class IssueIteratorFactoryTest {
     assertThat(issue.modulePath()).isEqualTo(".PROJECT1.");
     assertThat(issue.directoryPath()).isEqualTo("src/main/java");
     assertThat(issue.filePath()).isEqualTo("src/main/java/Action.java");
-    assertThat(issue.tags()).containsOnly("tag1", "tag2", "tag3");
+    assertThat(issue.getTags()).containsOnly("tag1", "tag2", "tag3");
     assertThat(issue.effort().toMinutes()).isGreaterThan(0L);
-    assertThat(issue.gap()).isEqualTo(2d);
-    assertThat(issue.attribute("JIRA")).isEqualTo("http://jira.com");
     assertThat(issue.type().getDbConstant()).isEqualTo(2);
   }
 
@@ -82,7 +80,7 @@ public class IssueIteratorFactoryTest {
     assertThat(issue.modulePath()).isEqualTo(".PROJECT1.");
     assertThat(issue.directoryPath()).isEqualTo("src/main/java");
     assertThat(issue.filePath()).isEqualTo("src/main/java/Action.java");
-    assertThat(issue.tags()).containsOnly("tag1", "tag2", "tag3");
+    assertThat(issue.getTags()).containsOnly("tag1", "tag2", "tag3");
     assertThat(issue.effort().toMinutes()).isGreaterThan(0L);
     assertThat(issue.type().getDbConstant()).isEqualTo(1);
 
@@ -95,7 +93,7 @@ public class IssueIteratorFactoryTest {
     assertThat(issue.modulePath()).isEqualTo(".PROJECT1.MODULE1.");
     assertThat(issue.directoryPath()).isNull();
     assertThat(issue.filePath()).isNull();
-    assertThat(issue.tags()).containsOnly("tag1", "tag2", "tag3");
+    assertThat(issue.getTags()).containsOnly("tag1", "tag2", "tag3");
     assertThat(issue.effort().toMinutes()).isGreaterThan(0L);
     assertThat(issue.type().getDbConstant()).isEqualTo(2);
 
@@ -108,7 +106,7 @@ public class IssueIteratorFactoryTest {
     assertThat(issue.modulePath()).isEqualTo(".PROJECT1.");
     assertThat(issue.directoryPath()).isEqualTo("src/main/java");
     assertThat(issue.filePath()).isEqualTo("src/main/java/Action.java");
-    assertThat(issue.tags()).isEmpty();
+    assertThat(issue.getTags()).isEmpty();
     assertThat(issue.effort().toMinutes()).isGreaterThan(0L);
     assertThat(issue.type().getDbConstant()).isEqualTo(1);
 
@@ -121,7 +119,7 @@ public class IssueIteratorFactoryTest {
     assertThat(issue.modulePath()).isEqualTo(".PROJECT1.MODULE1.");
     assertThat(issue.directoryPath()).isEqualTo("src/main/java");
     assertThat(issue.filePath()).isEqualTo("src/main/java");
-    assertThat(issue.tags()).isEmpty();
+    assertThat(issue.getTags()).isEmpty();
     assertThat(issue.effort().toMinutes()).isGreaterThan(0L);
     assertThat(issue.type().getDbConstant()).isEqualTo(1);
   }