forked from hogi/kunagi
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
/* | ||
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi | ||
* | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero | ||
* General Public License as published by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | ||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
@@ -68,7 +68,6 @@ public class Project extends GProject implements ForumSupport { | |
private static final String effortUnit = "pts"; | ||
public static final String INIT_LABEL = "New Project"; | ||
|
||
public transient boolean historyLoaded; | ||
private transient RequirementsOrderComparator requirementsOrderComparator; | ||
private transient Comparator<Issue> issuesOrderComparator; | ||
|
||
|
52 changes: 52 additions & 0 deletions
52
src/main/java/scrum/client/sprint/LoadSprintHistoryAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2011 Witoslaw Koczewsi <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero | ||
* General Public License as published by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | ||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along with this program. If not, | ||
* see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package scrum.client.sprint; | ||
|
||
import scrum.client.common.AScrumAction; | ||
import scrum.client.common.TooltipBuilder; | ||
import scrum.client.core.EventBus; | ||
|
||
public class LoadSprintHistoryAction extends AScrumAction { | ||
|
||
private Sprint sprint; | ||
|
||
public LoadSprintHistoryAction(Sprint sprint) { | ||
super(); | ||
this.sprint = sprint; | ||
} | ||
|
||
@Override | ||
protected void updateTooltip(TooltipBuilder tb) { | ||
tb.setText("Request details for this sprints history"); | ||
} | ||
|
||
@Override | ||
protected void onExecute() { | ||
new RequestHistorySprintServiceCall(sprint.getId()).execute(new Runnable() { | ||
|
||
@Override | ||
public void run() { | ||
sprint.historyLoaded = true; | ||
EventBus.get().visibleDataChanged(); | ||
} | ||
}); | ||
} | ||
|
||
@Override | ||
public String getLabel() { | ||
return "Load Sprint history details"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
/* | ||
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi | ||
* | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero | ||
* General Public License as published by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | ||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
@@ -52,6 +52,8 @@ public class Sprint extends GSprint implements ForumSupport, ReferenceSupport, L | |
private transient Comparator<Task> tasksOrderComparator; | ||
private transient RequirementsOrderComparator requirementsOrderComparator; | ||
|
||
public transient boolean historyLoaded; | ||
|
||
public Sprint(Project project, String label) { | ||
setProject(project); | ||
setLabel(label); | ||
|
@@ -431,7 +433,7 @@ public String getValue() { | |
for (StoryInfo story : stories) { | ||
sb.append("\n* ").append(story.getReference()).append(" ").append(story.getLabel()); | ||
sb.append(" ''").append(story.getEstimatedWorkAsString()).append(", ") | ||
.append(story.getBurnedWorkAsString()).append("''"); | ||
.append(story.getBurnedWorkAsString()).append("''"); | ||
for (TaskInfo task : story.getTasks()) { | ||
sb.append("\n * ").append(task.getReference()).append(" ").append(task.getLabel()); | ||
sb.append(" ''").append(task.getBurnedWork()).append(" hrs.''"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
/* | ||
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi | ||
* | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero | ||
* General Public License as published by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | ||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
@@ -41,7 +41,6 @@ protected Widget onInitialization() { | |
|
||
@Override | ||
public void run() { | ||
getCurrentProject().historyLoaded = true; | ||
update(); | ||
} | ||
}); | ||
|
@@ -54,7 +53,8 @@ protected void onUpdate() { | |
if (changeIndicator.update(sprints)) { | ||
page.clear(); | ||
for (Sprint sprint : sprints) { | ||
page.addHeader(sprint.getReferenceAndLabel()); | ||
page.addHeader(sprint.getReferenceAndLabel() + " | " + sprint.getBegin().format() + " - " | ||
+ sprint.getEnd()); | ||
|
||
SprintHistorySprintWidget widget = sprintWidgets.get(sprint); | ||
if (widget == null) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
/* | ||
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi | ||
* | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero | ||
* General Public License as published by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the | ||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
@@ -88,6 +88,8 @@ public class ScrumServiceImpl extends GScrumServiceImpl { | |
private transient CommentDao commentDao; | ||
private transient ScrumWebApplication webApplication; | ||
private transient ChangeDao changeDao; | ||
|
||
@In | ||
private transient SprintDao sprintDao; | ||
|
||
@In | ||
|
@@ -227,8 +229,15 @@ public void onRequestHistorySprint(GwtConversation conversation, String sprintId | |
assertProjectSelected(conversation); | ||
Sprint sprint = sprintDao.getById(sprintId); | ||
SprintReport report = sprint.getSprintReport(); | ||
conversation.sendToClient(report); | ||
conversation.sendToClient(getAssociatedEntities(report)); | ||
if (report != null) { | ||
conversation.sendToClient(report); | ||
conversation.sendToClient(getAssociatedEntities(report)); | ||
conversation.sendToClient(report.getCompletedRequirements()); | ||
conversation.sendToClient(report.getRejectedRequirements()); | ||
conversation.sendToClient(report.getSprintSwitchRequirementChanges()); | ||
conversation.sendToClient(report.getClosedTasks()); | ||
conversation.sendToClient(report.getOpenTasks()); | ||
} | ||
} | ||
|
||
@Override | ||
|
@@ -242,7 +251,7 @@ public void onPullStoryToSprint(GwtConversation conversation, String storyId) { | |
sprint.pullStory(story, currentUser); | ||
|
||
postProjectEvent(conversation, currentUser.getName() + " pulled " + story.getReferenceAndLabel() | ||
+ " to current sprint", story); | ||
+ " to current sprint", story); | ||
|
||
sendToClients(conversation, sprint); | ||
sendToClients(conversation, story); | ||
|
@@ -259,7 +268,7 @@ public void onKickStoryFromSprint(GwtConversation conversation, String storyId) | |
sprint.kickRequirement(story, currentUser); | ||
|
||
postProjectEvent(conversation, currentUser.getName() + " kicked " + story.getReferenceAndLabel() | ||
+ " from current sprint", story); | ||
+ " from current sprint", story); | ||
|
||
sendToClients(conversation, story.getTasksInSprint()); | ||
sendToClients(conversation, story); | ||
|
@@ -729,7 +738,7 @@ private void onRequirementChanged(GwtConversation conversation, Requirement requ | |
} else { | ||
postProjectEvent(conversation, | ||
currentUser.getName() + " kicked " + requirement.getReferenceAndLabel() | ||
+ " from current sprint", requirement); | ||
+ " from current sprint", requirement); | ||
subscriptionService.notifySubscribers(requirement, "Story kicked from current Sprint", | ||
conversation.getProject(), null); | ||
} | ||
|
@@ -909,11 +918,6 @@ private Set<AEntity> getAssociatedEntities(AEntity entity) { | |
if (entity instanceof SprintReport) { | ||
SprintReport report = (SprintReport) entity; | ||
ret.add(report.getSprint()); | ||
ret.addAll(report.getCompletedRequirements()); | ||
ret.addAll(report.getRejectedRequirements()); | ||
ret.addAll(report.getSprintSwitchRequirementChanges()); | ||
ret.addAll(report.getClosedTasks()); | ||
ret.addAll(report.getOpenTasks()); | ||
} | ||
|
||
return ret; | ||
|