1.1 --- a/src/main/webapp/WEB-INF/jsp/issue-form.jsp Fri May 22 21:23:57 2020 +0200 1.2 +++ b/src/main/webapp/WEB-INF/jsp/issue-form.jsp Sat May 23 13:24:49 2020 +0200 1.3 @@ -31,10 +31,10 @@ 1.4 1.5 <c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 1.6 1.7 +<jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" /> 1.8 <jsp:useBean id="issue" type="de.uapcore.lightpit.entities.Issue" scope="request"/> 1.9 <jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/> 1.10 <jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/> 1.11 -<jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/> 1.12 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/> 1.13 1.14 <form action="./${moduleInfo.modulePath}/issues/commit" method="post"> 1.15 @@ -45,6 +45,18 @@ 1.16 </colgroup> 1.17 <tbody> 1.18 <tr> 1.19 + <th><fmt:message key="thead.issue.project"/></th> 1.20 + <td> 1.21 + <select name="pid" required> 1.22 + <c:forEach var="project" items="${projects}"> 1.23 + <option value="${project.id}" <c:if test="${project eq issue.project}">selected</c:if> > 1.24 + <c:out value="${project.name}" /> 1.25 + </option> 1.26 + </c:forEach> 1.27 + </select> 1.28 + </td> 1.29 + </tr> 1.30 + <tr> 1.31 <th><fmt:message key="thead.issue.category"/></th> 1.32 <td> 1.33 <select name="category"> 1.34 @@ -151,7 +163,15 @@ 1.35 <tr> 1.36 <td colspan="2"> 1.37 <input type="hidden" name="id" value="${issue.id}"/> 1.38 - <a href="./${moduleInfo.modulePath}/view?pid=${issue.project.id}" class="button"> 1.39 + <c:choose> 1.40 + <c:when test="${not empty issue.project and issue.project.id ge 0}"> 1.41 + <c:set var="cancelUrl">./${moduleInfo.modulePath}/view?pid=${issue.project.id}</c:set> 1.42 + </c:when> 1.43 + <c:otherwise> 1.44 + <c:set var="cancelUrl">./${moduleInfo.modulePath}/</c:set> 1.45 + </c:otherwise> 1.46 + </c:choose> 1.47 + <a href="${cancelUrl}" class="button"> 1.48 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> 1.49 </a> 1.50 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>