diff --git a/src/main/java/edu/tamu/app/service/manager/GitHubService.java b/src/main/java/edu/tamu/app/service/manager/GitHubService.java index f458713f..e76281e1 100644 --- a/src/main/java/edu/tamu/app/service/manager/GitHubService.java +++ b/src/main/java/edu/tamu/app/service/manager/GitHubService.java @@ -122,8 +122,10 @@ public List getAdditionalActiveSprints() throws Exception { for (GHProject project : projects) { String sprintId = String.valueOf(project.getId()); Map> partitionedCards = getCards(project); + int count = 0; for (Entry> partition : partitionedCards.entrySet()) { - sprints.add(new Sprint(sprintId, partition.getKey(), ORGANIZATION, partition.getValue())); + sprints.add(new Sprint(sprintId + "-" + count, partition.getKey(), ORGANIZATION, partition.getValue())); + count++; } } return sprints; @@ -244,7 +246,10 @@ private Map> getCards(GHProject project) throws IOException { cardContents.put(card.getId(), card.getContent()); } Map> partitionedCards = projectCards.stream() + // Card without contents is a note .filter(c -> cardContents.get(c.getId()) != null) + // Card without a milestone is not on the sprint + .filter(c -> cardContents.get(c.getId()).getMilestone() != null) .collect(Collectors.groupingBy(c -> cardContents.get(c.getId()).getMilestone())); for (Entry> partition : partitionedCards.entrySet()) { List cards = new ArrayList();