Commit f4f2f96d authored by Florian Fittkau's avatar Florian Fittkau

minor changes

parent 6a20fcec
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>scrumboard</name> <name>scrumboard</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name> <name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name> <name>org.eclipse.jdt.core.javabuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.grails.ide.eclipse.core.nature</nature> <nature>org.grails.ide.eclipse.core.nature</nature>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature> <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures> </natures>
<linkedResources> <linkedResources>
<link> <link>
<name>.link_to_grails_plugins</name> <name>.link_to_grails_plugins</name>
<type>2</type> <type>2</type>
<locationURI>GRAILS_ROOT/2.1.0/projects/scrumboard/plugins</locationURI> <locationURI>GRAILS_ROOT/2.1.0/projects/scrumboard/plugins</locationURI>
</link> </link>
</linkedResources> </linkedResources>
</projectDescription> </projectDescription>
...@@ -33,38 +33,48 @@ class BootStrap { ...@@ -33,38 +33,48 @@ class BootStrap {
private createExampleProject() { private createExampleProject() {
def fmcockpit = new Project(name: "FMcockpit") def fmcockpit = new Project(name: "FMcockpit")
def ffi = User.findByUsername("ffi")
def productBacklog = new ProductBacklog() fmcockpit.setProductBacklog(createBacklog(ffi))
def userStoryInBacklog = new UserStory(title: "Energiekataster Layer", fmcockpit.addToSprints(createSprint(ffi))
description: "Energiekataster Layer im GIS um &uuml;ber jeder VE die Energieausweise direkt zu sehen.")
def ffi = User.findByUsername("ffi") fmcockpit.save(failOnError: true)
userStoryInBacklog.shortId = "V-1" }
private createBacklog(User ffi) {
def productBacklog = new ProductBacklog()
def userStoryInBacklog = new UserStory("V-1", "Energiekataster Layer")
userStoryInBacklog.description = "Energiekataster Layer im GIS um &uuml;ber jeder VE die Energieausweise direkt zu sehen."
userStoryInBacklog.author = ffi userStoryInBacklog.author = ffi
userStoryInBacklog.editor = ffi userStoryInBacklog.editor = ffi
userStoryInBacklog.points = 3 userStoryInBacklog.points = 3
userStoryInBacklog.save(failOnError: true)
productBacklog.addToUserstories(userStoryInBacklog) productBacklog.addToUserstories(userStoryInBacklog)
def sprintOne = new Sprint(number: 1) productBacklog
}
def userStoryInSprint = new UserStory(title: "Volltextsuche im GIS",
description: "Wenn man nach einer VE oder einer Adresse sucht, sollte diese in den Ergebnissen ber&uuml;cksichtigt werden.") private Sprint createSprint(User ffi) {
userStoryInSprint.shortId = "V-2" def sprintOne = new Sprint("Sprint 1")
sprintOne.due_date = new Date()
def userStoryInSprint = new UserStory("V-2", "Volltextsuche im GIS")
userStoryInSprint.description = "Volltextsuche im GIS ermglichen"
userStoryInSprint.author = ffi userStoryInSprint.author = ffi
userStoryInSprint.editor = ffi userStoryInSprint.editor = ffi
userStoryInSprint.points = 2 userStoryInSprint.points = 2
userStoryInSprint.status = UserStoryStatus.OPEN userStoryInSprint.status = UserStoryStatus.OPEN
userStoryInSprint.save(failOnError: true)
sprintOne.addToUserstories(userStoryInSprint) sprintOne.addToUserstories(userStoryInSprint)
sprintOne.due_date = new Date() sprintOne
fmcockpit.addToSprints(sprintOne)
fmcockpit.setProductBacklog(productBacklog)
fmcockpit.save(failOnError: true)
} }
def destroy = { def destroy = {
......
...@@ -14,4 +14,8 @@ class SprintController { ...@@ -14,4 +14,8 @@ class SprintController {
currentSprint: currentSprint, currentSprint: currentSprint,
sprintUserStories: sprintUserStories]) sprintUserStories: sprintUserStories])
} }
def create(String name) {
new Sprint(name)
}
} }
...@@ -36,6 +36,8 @@ class UserStoryController { ...@@ -36,6 +36,8 @@ class UserStoryController {
userStory.status = UserStoryStatus.DONE userStory.status = UserStoryStatus.DONE
} }
userStory.save()
render "" render ""
} }
} }
package scrumboard
class Color {
int red
int green
int blue
static constraints = {
red min: 0, max: 255
green min: 0, max: 255
blue min: 0, max: 255
}
Color(red, green, blue) {
this.red = red
this.green = green
this.blue = blue
}
}
package scrumboard package scrumboard
class Sprint { class Sprint {
int number String name
Date due_date Date due_date
static hasMany = [ userstories: UserStory ] static hasMany = [ userstories: UserStory ]
...@@ -10,7 +10,11 @@ class Sprint { ...@@ -10,7 +10,11 @@ class Sprint {
static constraints = { static constraints = {
} }
Sprint(String name) {
this.name = name
}
def String toString() { def String toString() {
"Sprint " + number name
}; };
} }
...@@ -13,11 +13,18 @@ class UserStory implements Comparable { ...@@ -13,11 +13,18 @@ class UserStory implements Comparable {
UserStoryStatus status = UserStoryStatus.IN_BACKLOG UserStoryStatus status = UserStoryStatus.IN_BACKLOG
Color color
User author User author
User editor User editor
static constraints = { static constraints = {
} }
UserStory(String shortId, String title) {
this.shortId = shortId
this.title = title
}
def String toString() {shortId + ": " + title}; def String toString() {shortId + ": " + title};
......
...@@ -57,8 +57,6 @@ ...@@ -57,8 +57,6 @@
</div> </div>
<div id="dialog-addSprint" title="Create new sprint"> <div id="dialog-addSprint" title="Create new sprint">
<p class="validateTips">All form fields are required.</p>
<form> <form>
<fieldset> <fieldset>
<label for="name">Name</label> <label for="name">Name</label>
...@@ -70,7 +68,6 @@ ...@@ -70,7 +68,6 @@
</div> </div>
<div id="dialog-showUserStory" title="Show User Story"> <div id="dialog-showUserStory" title="Show User Story">
x
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
...@@ -98,6 +95,7 @@ $(function() { ...@@ -98,6 +95,7 @@ $(function() {
var bValid = true; var bValid = true;
allFields.removeClass( "ui-state-error" ); allFields.removeClass( "ui-state-error" );
if ( bValid ) { if ( bValid ) {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
} }
}, },
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
<g:layoutBody/> <g:layoutBody/>
<br> <br>
<br> <br>
<div class="footer" role="contentinfo"><div class="center" style='text-align: center;' width='100%'><a href="http://se.informatik.uni-kiel.de">Scrumboard</a></div></div>
<r:layoutResources /> <r:layoutResources />
</body> </body>
</html> </html>
\ No newline at end of file
package scrumboard
import grails.test.mixin.*
import org.junit.*
/**
* See the API for {@link grails.test.mixin.domain.DomainClassUnitTestMixin} for usage instructions
*/
@TestFor(Color)
class ColorTests {
void testSomething() {
fail "Implement me"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment