@Test public void testSprintReport(){ String boarId = "15493"; String sprintId = "71231"; SprintReport sprintReport = jiraGhClient.sprintReport(boarId,sprintId); Assert.assertEquals(sprintId,sprintReport.getSprint().getId()); }
public SprintReport sprintReport(String boardId,String sprintId) { try { HttpGet httpGet = new HttpGet(JiraGhHttpHelper.sprintReportUri(boardId,sprintId)); HttpResponse httpResponse = request(httpGet); if (httpResponse.getStatusLine().getStatusCode() != 200) { throw new BentenJiraException(httpResponse.getStatusLine().getReasonPhrase()); } String json = EntityUtils .toString(httpResponse.getEntity()); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yy hh:mm a"); dateFormat.set2DigitYearStart(new GregorianCalendar(2001,1,1) .getTime()); objectMapper.setDateFormat(dateFormat); SprintReport sprintReport = objectMapper .readValue(json,SprintReport.class); return sprintReport; }catch(Exception e ){ logger.error(e.getMessage(),e); throw new BentenJiraException(e.getMessage()); } }
JiraGhClient extends BentenHttpClient { public SprintReport sprintReport(String boardId,String sprintId) { try { HttpGet httpGet = new HttpGet(JiraGhHttpHelper.sprintReportUri(boardId,sprintId)); HttpResponse httpResponse = request(httpGet); if (httpResponse.getStatusLine().getStatusCode() != 200) { throw new BentenJiraException(httpResponse.getStatusLine().getReasonPhrase()); } String json = EntityUtils .toString(httpResponse.getEntity()); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yy hh:mm a"); dateFormat.set2DigitYearStart(new GregorianCalendar(2001,1,1) .getTime()); objectMapper.setDateFormat(dateFormat); SprintReport sprintReport = objectMapper .readValue(json,SprintReport.class); return sprintReport; }catch(Exception e ){ logger.error(e.getMessage(),e); throw new BentenJiraException(e.getMessage()); } } }
JiraGhClient extends BentenHttpClient { public SprintReport sprintReport(String boardId,String sprintId) { try { HttpGet httpGet = new HttpGet(JiraGhHttpHelper.sprintReportUri(boardId,sprintId)); HttpResponse httpResponse = request(httpGet); if (httpResponse.getStatusLine().getStatusCode() != 200) { throw new BentenJiraException(httpResponse.getStatusLine().getReasonPhrase()); } String json = EntityUtils .toString(httpResponse.getEntity()); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yy hh:mm a"); dateFormat.set2DigitYearStart(new GregorianCalendar(2001,1,1) .getTime()); objectMapper.setDateFormat(dateFormat); SprintReport sprintReport = objectMapper .readValue(json,SprintReport.class); return sprintReport; }catch(Exception e ){ logger.error(e.getMessage(),e); throw new BentenJiraException(e.getMessage()); } }  }
JiraGhClient extends BentenHttpClient { public SprintReport sprintReport(String boardId,String sprintId) { try { HttpGet httpGet = new HttpGet(JiraGhHttpHelper.sprintReportUri(boardId,sprintId)); HttpResponse httpResponse = request(httpGet); if (httpResponse.getStatusLine().getStatusCode() != 200) { throw new BentenJiraException(httpResponse.getStatusLine().getReasonPhrase()); } String json = EntityUtils .toString(httpResponse.getEntity()); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yy hh:mm a"); dateFormat.set2DigitYearStart(new GregorianCalendar(2001,1,1) .getTime()); objectMapper.setDateFormat(dateFormat); SprintReport sprintReport = objectMapper .readValue(json,SprintReport.class); return sprintReport; }catch(Exception e ){ logger.error(e.getMessage(),e); throw new BentenJiraException(e.getMessage()); } }  List<Sprint> sprints(String boardId); SprintReport sprintReport(String boardId,String sprintId); }
JiraGhClient extends BentenHttpClient { public SprintReport sprintReport(String boardId,String sprintId) { try { HttpGet httpGet = new HttpGet(JiraGhHttpHelper.sprintReportUri(boardId,sprintId)); HttpResponse httpResponse = request(httpGet); if (httpResponse.getStatusLine().getStatusCode() != 200) { throw new BentenJiraException(httpResponse.getStatusLine().getReasonPhrase()); } String json = EntityUtils .toString(httpResponse.getEntity()); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yy hh:mm a"); dateFormat.set2DigitYearStart(new GregorianCalendar(2001,1,1) .getTime()); objectMapper.setDateFormat(dateFormat); SprintReport sprintReport = objectMapper .readValue(json,SprintReport.class); return sprintReport; }catch(Exception e ){ logger.error(e.getMessage(),e); throw new BentenJiraException(e.getMessage()); } }  List<Sprint> sprints(String boardId); SprintReport sprintReport(String boardId,String sprintId);  }