Skip to content
Snippets Groups Projects
Commit dddf61c9 authored by Florian Fittkau's avatar Florian Fittkau
Browse files

creation of tasks now possible

parent f90b46f8
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ class UserStoryController { ...@@ -74,7 +74,7 @@ class UserStoryController {
parent.addToTasks(task) parent.addToTasks(task)
parent.save() parent.save()
println "Test: " + task.id task = task.save()
render (template:"showTask", model: [task : task]) render (template:"showTask", model: [task : task])
} }
......
package scrumboard package scrumboard
class Task { class Task implements Comparable {
static final int maxShortDescription = 60 static final int maxShortDescription = 60
String title String title
...@@ -11,6 +11,7 @@ class Task { ...@@ -11,6 +11,7 @@ class Task {
static belongsTo = [parent: UserStory] static belongsTo = [parent: UserStory]
static constraints = { static constraints = {
} }
Task(title, description) { Task(title, description) {
...@@ -21,14 +22,10 @@ class Task { ...@@ -21,14 +22,10 @@ class Task {
def String toString() {title}; def String toString() {title};
int compareTo(obj) { int compareTo(obj) {
if (parent.compareTo(obj.parent) == 0)
// if (obj.parent.compareTo(obj.parent) == 0)
// title.compareTo(obj.title)
// else
// obj.parent.compareTo(obj.parent)
title.compareTo(obj.title) title.compareTo(obj.title)
else
parent.compareTo(obj.parent)
} }
def String getShortDescription() { def String getShortDescription() {
......
...@@ -28,7 +28,7 @@ class UserStory implements Comparable { ...@@ -28,7 +28,7 @@ class UserStory implements Comparable {
this.title = title this.title = title
} }
def String toString() {shortId + ": " + title}; def String toString() {shortId + ": " + title}
int compareTo(obj) { int compareTo(obj) {
shortId.compareTo(obj.shortId) shortId.compareTo(obj.shortId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment