Commit dddf61c9 authored by Florian Fittkau's avatar Florian Fittkau

creation of tasks now possible

parent f90b46f8
......@@ -74,7 +74,7 @@ class UserStoryController {
parent.addToTasks(task)
parent.save()
println "Test: " + task.id
task = task.save()
render (template:"showTask", model: [task : task])
}
......
package scrumboard
class Task {
class Task implements Comparable {
static final int maxShortDescription = 60
String title
......@@ -10,7 +10,8 @@ class Task {
static belongsTo = [parent: UserStory]
static constraints = {
static constraints = {
}
Task(title, description) {
......@@ -21,14 +22,10 @@ class Task {
def String toString() {title};
int compareTo(obj) {
// if (obj.parent.compareTo(obj.parent) == 0)
// title.compareTo(obj.title)
// else
// obj.parent.compareTo(obj.parent)
title.compareTo(obj.title)
if (parent.compareTo(obj.parent) == 0)
title.compareTo(obj.title)
else
parent.compareTo(obj.parent)
}
def String getShortDescription() {
......
......@@ -28,7 +28,7 @@ class UserStory implements Comparable {
this.title = title
}
def String toString() {shortId + ": " + title};
def String toString() {shortId + ": " + title}
int compareTo(obj) {
shortId.compareTo(obj.shortId)
......
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