RM-2203 (Show selected classification reason id's rather than description)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105215 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-06-01 10:08:26 +00:00
parent 16bde534af
commit 1acae0e403
2 changed files with 4 additions and 3 deletions

View File

@@ -6,7 +6,8 @@
<#list reasons as reason>
{
"id": "${reason.id?json_string}",
"displayLabel": "${reason.displayLabel?json_string}"
"displayLabel": "${reason.displayLabel?json_string}",
"fullReason": "${reason.id?json_string}: ${reason.displayLabel?json_string}"
}<#if reason_has_next>,</#if>
</#list>
]

View File

@@ -95,7 +95,7 @@ public class ReasonsGetUnitTest extends BaseWebScriptUnitTest
// check the JSON result using Jackson to allow easy equality testing.
ObjectMapper mapper = new ObjectMapper();
String expectedJSONString = "{\"data\":{\"items\":[{\"displayLabel\":\"labelA\",\"id\":\"idA\"},{\"displayLabel\":\"labelB\",\"id\":\"idB\"}]}}";
String expectedJSONString = "{\"data\":{\"items\":[{\"displayLabel\":\"labelA\",\"id\":\"idA\",\"fullReason\":\"idA: labelA\"},{\"displayLabel\":\"labelB\",\"id\":\"idB\",\"fullReason\":\"idB: labelB\"}]}}";
JsonNode expected = mapper.readTree(expectedJSONString);
assertEquals(expected, mapper.readTree(actualJSONString));
}