// get the service
IterationService iterationService = AgilePlanningObjectFactory.getIterationService();
// list the stories for the iteration
Iteration iteration = iterationService.findByPersistanceId(Integer.parseInt((String) request.getParameter("iterationPersistanceId")));
// build the set of storyViews
Set<StoryView> storyViews = this.buildStoryViewsFromStories(iteration.getStories());
// put the storyViews in the request
request.setAttribute("storyList", storyViews);
// put the iterationPersistanceId back in the request (for the navigationBar)
request.setAttribute("iterationPersistanceId", request.getParameter("iterationPersistanceId"));
// put the release.number in the request (for the summary)
//request.setAttribute("release.number", release.getNumber());
// put the number or story in the request
request.setAttribute("numberOfStory", iteration.getStories().size());
int numberOfStoryCompleted = 0;
int numberOfStoryInProgress = 0;
int numberOfStoryLeft = 0;
for (Story story : iteration.getStories()) {
if (story.isCompleted()) {
numberOfStoryCompleted = numberOfStoryCompleted +1;
}
if (story.isInProgress()) {
numberOfStoryInProgress = numberOfStoryInProgress +1;