Skip to content

Commit

Permalink
Bug fix: Redirect page after saving testplan.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitorko committed Feb 22, 2016
1 parent c8cf5b1 commit 7812f81
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main/java/com/deem/excord/controller/TestPlanController.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ public String cloneTestplan(HttpSession session, HttpServletRequest request, Mod
}
historyUtil.addHistory("Cloned testplan: [" + tpObj.getName() + "]", tpObj.getSlug(), request, session);
session.setAttribute("flashMsg", "Successfully Cloned TestPlan " + tpObj.getName());

return "redirect:/testplan";
if (newTpObj.getEnabled()) {
return "redirect:/testplan_active";
} else {
return "redirect:/testplan";
}
}

@RequestMapping(value = "/testplan_history", method = RequestMethod.GET)
Expand Down Expand Up @@ -249,7 +252,11 @@ public String saveTestPlan(HttpSession session, Model model, HttpServletRequest
historyUtil.addHistory("Added/Updated testplan: [" + tname + "]", tp.getSlug(), request, session);
session.setAttribute("flashMsg", "Successfully Saved TestPlan " + tp.getName());

return "redirect:/testplan_active";
if (tp.getEnabled()) {
return "redirect:/testplan_active";
} else {
return "redirect:/testplan";
}
} catch (Exception ex) {
LOGGER.error(ex.getMessage());
}
Expand Down

0 comments on commit 7812f81

Please sign in to comment.