aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws-client')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java5
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java4
2 files changed, 8 insertions, 1 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
index dea74706900..5589f5c7ee7 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
@@ -80,6 +80,11 @@ public class IssueQuery {
return addParam("assignees", s);
}
+ public IssueQuery assigned(Boolean assigned) {
+ params.put("assigned", assigned);
+ return this;
+ }
+
public IssueQuery createdAfter(Date d) {
params.put("createdAfter", EncodingUtils.toQueryParam(d, true));
return this;
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
index de00cb0af06..cffe192920d 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
@@ -36,6 +36,7 @@ public class IssueQueryTest {
IssueQuery query = IssueQuery.create()
.issues("ABCDE", "FGHIJ")
.assignees("arthur", "perceval")
+ .assigned(true)
.components("Action.java", "Filter.java")
.componentRoots("struts")
.resolutions("FIXED", "FALSE-POSITIVE")
@@ -48,9 +49,10 @@ public class IssueQueryTest {
.pageSize(5)
.pageIndex(4);
- assertThat(query.urlParams()).hasSize(13);
+ assertThat(query.urlParams()).hasSize(14);
assertThat(query.urlParams()).includes(entry("issues", "ABCDE,FGHIJ"));
assertThat(query.urlParams()).includes(entry("assignees", "arthur,perceval"));
+ assertThat(query.urlParams()).includes(entry("assigned", true));
assertThat(query.urlParams()).includes(entry("components", "Action.java,Filter.java"));
assertThat(query.urlParams()).includes(entry("componentRoots", "struts"));
assertThat(query.urlParams()).includes(entry("resolutions", "FIXED,FALSE-POSITIVE"));