Hi Rich,
Calling the im viewissue command with the --showRichContent option in the CLI will pull the raw HTML in the appropriate fields.
To use this in the API, you would use something like the below code:
Command aCommand = new Command(Command.IM, "viewissue");
Response aResponse;
WorkItem aWI;
String fieldValue;
aCommand.addOption(new Option("showRichContent"));
aCommand.addOption(new Option("fields","field1,field2,field3,...fieldN"));
aCommand.addSelection("<item ID>");
try{
aResponse = cmdRunner.execute(aCommand);
/*cmdRunner is coming from a global function that handles all the try/catch and null checks for doing
IntegrationPointFactory
.getInstance()
.createIntegrationPoint(host, port, apiMajorVersion, apiMinorVersion)
.createSession(user, password)
.createCmdRunner();
*/
for (WorkItemIterator itr = aResponse.getWorkItems(); itr.hasNext();) {
aWI = itr.next();
//handle your workitem
fieldValue = aWI.getField("field1").getString();
}
} catch (APIException e){
//handle exception
}