.setDescription("To retrieve issues created in a specific analysis, identified by an ISO-formatted datetime stamp.")
.setExampleValue("2013-05-01T13:00:00+0100");
action.createParam(CREATED_AFTER)
- .setDescription("To retrieve issues created after the given date (exclusive). Format: date or datetime ISO formats. If this parameter is set, createdSince must not be set")
+ .setDescription("To retrieve issues created after the given date (inclusive). Format: date or datetime ISO formats. If this parameter is set, createdSince must not be set")
.setExampleValue("2013-05-01 (or 2013-05-01T13:00:00+0100)");
action.createParam(CREATED_BEFORE)
.setDescription("To retrieve issues created before the given date (exclusive). Format: date or datetime ISO formats")
IssueTesting.newDoc("ISSUE2", file).setFuncCreationDate(DateUtils.parseDate("2014-09-23")));
assertThat(index.search(IssueQuery.builder(userSessionRule).createdAfter(DateUtils.parseDate("2014-09-19")).build(), new SearchOptions()).getDocs()).hasSize(2);
- // Lower bound is excluded
- assertThat(index.search(IssueQuery.builder(userSessionRule).createdAfter(DateUtils.parseDate("2014-09-20")).build(), new SearchOptions()).getDocs()).hasSize(1);
+ // Lower bound is included
+ assertThat(index.search(IssueQuery.builder(userSessionRule).createdAfter(DateUtils.parseDate("2014-09-20")).build(), new SearchOptions()).getDocs()).hasSize(2);
assertThat(index.search(IssueQuery.builder(userSessionRule).createdAfter(DateUtils.parseDate("2014-09-21")).build(), new SearchOptions()).getDocs()).hasSize(1);
assertThat(index.search(IssueQuery.builder(userSessionRule).createdAfter(DateUtils.parseDate("2014-09-25")).build(), new SearchOptions()).getDocs()).isEmpty();
}
// 20 < createdAt < 25: excludes first issue
assertThat(index.search(IssueQuery.builder(userSessionRule)
.createdAfter(DateUtils.parseDate("2014-09-20")).createdBefore(DateUtils.parseDate("2014-09-25"))
- .build(), new SearchOptions()).getDocs()).hasSize(1);
+ .build(), new SearchOptions()).getDocs()).hasSize(2);
// 21 < createdAt < 25
assertThat(index.search(IssueQuery.builder(userSessionRule)