aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-08-12 12:27:03 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-08-12 17:35:17 +0200
commitb2b78e6333268b30e8d5825de2ed5d2c5958d7a8 (patch)
tree08a01019bc0f4b0216f18a02a2484321ffb510cd /sonar-plugin-api/src
parent8fcb46a50cda99df2d35e4ecf93425c011ce96cd (diff)
downloadsonarqube-b2b78e6333268b30e8d5825de2ed5d2c5958d7a8.tar.gz
sonarqube-b2b78e6333268b30e8d5825de2ed5d2c5958d7a8.zip
SONAR-4563 Use strict comparison for createdAfter in the Issues search engine
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java13
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/RubyIssueService.java4
2 files changed, 16 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
index 23e21d30ab6..d7ce899c4f8 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java
@@ -70,6 +70,7 @@ public class IssueQuery {
private final Boolean assigned;
private final Boolean planned;
private final Boolean resolved;
+ private final Date createdAtOrAfter;
private final Date createdAfter;
private final Date createdBefore;
private final String sort;
@@ -96,6 +97,7 @@ public class IssueQuery {
this.assigned = builder.assigned;
this.planned = builder.planned;
this.resolved = builder.resolved;
+ this.createdAtOrAfter = builder.createdAtOrAfter;
this.createdAfter = builder.createdAfter;
this.createdBefore = builder.createdBefore;
this.sort = builder.sort;
@@ -166,6 +168,11 @@ public class IssueQuery {
}
@CheckForNull
+ public Date createdAtOrAfter() {
+ return (createdAtOrAfter == null ? null : new Date(createdAtOrAfter.getTime()));
+ }
+
+ @CheckForNull
public Date createdBefore() {
return (createdBefore == null ? null : new Date(createdBefore.getTime()));
}
@@ -219,6 +226,7 @@ public class IssueQuery {
private Boolean assigned = null;
private Boolean planned = null;
private Boolean resolved = null;
+ private Date createdAtOrAfter;
private Date createdAfter;
private Date createdBefore;
private String sort;
@@ -307,6 +315,11 @@ public class IssueQuery {
return this;
}
+ public Builder createdAtOrAfter(@Nullable Date d) {
+ this.createdAtOrAfter = (d == null ? null : new Date(d.getTime()));
+ return this;
+ }
+
public Builder createdAfter(@Nullable Date d) {
this.createdAfter = (d == null ? null : new Date(d.getTime()));
return this;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/RubyIssueService.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/RubyIssueService.java
index 440105e5787..1afd5e480ee 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/RubyIssueService.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/RubyIssueService.java
@@ -63,7 +63,9 @@ public interface RubyIssueService extends ServerComponent {
* <li>'reporters': list of reporter logins. Note that reporters are defined only on "manual" issues.</li>
* <li>'assignees': list of assignee logins.</li>
* <li>'assigned': true to get only assigned issues, false to get only unassigned issues. By default no filtering is done.</li>
- * <li>'createdAfter': match all the issues created after the given date (inclusive).
+ * <li>'createdAfter': match all the issues created after the given date (strictly).
+ * Both date and datetime ISO formats are supported: 2013-05-18 or 2010-05-18T15:50:45+0100</li>
+ * <li>'createdAtOrAfter': match all the issues created after the given date (inclusive).
* Both date and datetime ISO formats are supported: 2013-05-18 or 2010-05-18T15:50:45+0100</li>
* <li>'createdBefore': match all the issues created before the given date (exclusive).
* Both date and datetime ISO formats are supported: 2013-05-18 or 2010-05-18T15:50:45+0100</li>