--- a/src/main/webapp/WEB-INF/jsp/issue-form.jsp Fri May 22 21:23:57 2020 +0200 +++ b/src/main/webapp/WEB-INF/jsp/issue-form.jsp Sat May 23 13:24:49 2020 +0200 @@ -31,10 +31,10 @@ <c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> +<jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" /> <jsp:useBean id="issue" type="de.uapcore.lightpit.entities.Issue" scope="request"/> <jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/> <jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/> -<jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/> <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/> <form action="./${moduleInfo.modulePath}/issues/commit" method="post"> @@ -45,6 +45,18 @@ </colgroup> <tbody> <tr> + <th><fmt:message key="thead.issue.project"/></th> + <td> + <select name="pid" required> + <c:forEach var="project" items="${projects}"> + <option value="${project.id}" <c:if test="${project eq issue.project}">selected</c:if> > + <c:out value="${project.name}" /> + </option> + </c:forEach> + </select> + </td> + </tr> + <tr> <th><fmt:message key="thead.issue.category"/></th> <td> <select name="category"> @@ -151,7 +163,15 @@ <tr> <td colspan="2"> <input type="hidden" name="id" value="${issue.id}"/> - <a href="./${moduleInfo.modulePath}/view?pid=${issue.project.id}" class="button"> + <c:choose> + <c:when test="${not empty issue.project and issue.project.id ge 0}"> + <c:set var="cancelUrl">./${moduleInfo.modulePath}/view?pid=${issue.project.id}</c:set> + </c:when> + <c:otherwise> + <c:set var="cancelUrl">./${moduleInfo.modulePath}/</c:set> + </c:otherwise> + </c:choose> + <a href="${cancelUrl}" class="button"> <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> </a> <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>