]> source.dussan.org Git - sonarqube.git/commitdiff
Add description in issues filters WS show action
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 13 Mar 2014 08:05:24 +0000 (09:05 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 13 Mar 2014 08:05:24 +0000 (09:05 +0100)
sonar-server/src/main/java/org/sonar/server/issue/filter/IssueFilterWs.java
sonar-server/src/test/java/org/sonar/server/issue/filter/IssueFilterWsTest.java
sonar-server/src/test/resources/org/sonar/server/issue/filter/IssueFilterWsTest/show_filter.json

index be196d4514113a6ff1c390d6104291f5825f017d..16ef871898716586dc8a643591ce0e671d5d76c7 100644 (file)
@@ -158,6 +158,7 @@ public class IssueFilterWs implements WebService {
     return json.beginObject()
       .prop("id", filter.id())
       .prop("name", filter.name())
+      .prop("description", filter.description())
       .prop("user", filter.user())
       .prop("shared", filter.shared())
       .prop("query", filter.data())
index 8260c4bdac1e1a2717b5449738ee9972eaaae620..87e1fef48e19e46d4b8890894b515029d07c39d9 100644 (file)
@@ -105,7 +105,7 @@ public class IssueFilterWsTest {
     // logged-in user is 'eric' but filter is owned by 'simon'
     MockUserSession session = MockUserSession.set().setLogin("eric").setUserId(123).setGlobalPermissions("none");
     when(service.find(13L, session)).thenReturn(
-      new DefaultIssueFilter().setId(13L).setName("Blocker issues").setData("severity=BLOCKER").setUser("simon").setShared(true)
+      new DefaultIssueFilter().setId(13L).setName("Blocker issues").setDescription("All Blocker Issues").setData("severity=BLOCKER").setUser("simon").setShared(true)
     );
 
     tester.newRequest("show").setParam("id", "13").execute()
index dd4ee41714856a20c3446d28f2b0d5fb12945458..447e43632f41a8ff5dc2c59d33861dcde53d31e3 100644 (file)
@@ -2,6 +2,7 @@
   "filter": {
     "id": 13,
     "name": "Blocker issues",
+    "description": "All Blocker Issues",
     "shared": true,
     "query": "severity=BLOCKER",
     "user": "simon",