private void buildIssues( JsonNode issuesNode, String jiraUrl, String jiraProject )
{
issueList = new ArrayList<Issue>( );
for ( int ix = 0; ix < issuesNode.size(); ix++ )
{
JsonNode issueNode = issuesNode.get( ix );
assert issueNode.isObject();
Issue issue = new Issue();
JsonNode val;
val = issueNode.get( "id" );
if ( val != null )
{
issue.setId( val.asText() );
}
val = issueNode.get( "key" );
if ( val != null )
{
issue.setKey( val.asText() );
issue.setLink( String.format( "%s/browse/%s", jiraUrl, val.asText()) );
}
// much of what we want is in here.
JsonNode fieldsNode = issueNode.get( "fields" );
val = fieldsNode.get( "assignee" );
processAssignee( issue, val );
val = fieldsNode.get( "created" );
processCreated( issue, val );
val = fieldsNode.get( "comment" );
processComments( issue, val );
val = fieldsNode.get( "fixVersions" );
processFixVersions( issue, val );
val = fieldsNode.get( "priority" );
processPriority( issue, val );
val = fieldsNode.get( "reporter" );
processReporter( issue, val );
val = fieldsNode.get( "resolution" );
processResolution( issue, val );
val = fieldsNode.get( "status" );
processStatus( issue, val );
val = fieldsNode.get( "summary" );
if ( val != null )
{
issue.setSummary( val.asText() );
}