Skip to content

Commit 8221251

Browse files
committed
Fixed #183
1 parent 30b7d72 commit 8221251

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

src/main/java/org/woehlke/simpleworklist/task/Task.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -351,28 +351,18 @@ public boolean hasContext(Context context) {
351351
return (this.getContext().getId().longValue() == context.getId().longValue());
352352
}
353353

354-
@Transient
355-
public String getView(boolean project){
356-
if(project){
357-
if(this.project == null){
358-
return "redirect:/project/root";
359-
} else {
360-
return this.project.getUrl();
361-
}
362-
} else {
363-
return "redirect:/"+this.taskState.getUrl();
364-
}
365-
}
366-
367354
@Transient
368355
public String getUrl(){
369-
return getView(false);
356+
return this.taskState.getUrl();
370357
}
371358

372359
@Transient
373360
public String getProjectUrl() {
374-
375-
return getView(true);
361+
if(this.project == null){
362+
return "redirect:/project/root";
363+
} else {
364+
return this.project.getUrl();
365+
}
376366
}
377367

378368
public void merge(Task task) {

src/main/java/org/woehlke/simpleworklist/taskstate/TaskState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public String getCode() {
6060
}
6161

6262
public String getUrl() {
63-
return "/taskstate/"+this.name().toLowerCase();
63+
return "redirect:/taskstate/"+this.name().toLowerCase();
6464
}
6565

6666
public static List<TaskState> list() {

0 commit comments

Comments
 (0)