--- a/src/main/webapp/WEB-INF/jsp/project-details.jsp Mon Jan 04 15:34:41 2021 +0100 +++ b/src/main/webapp/WEB-INF/jsp/project-details.jsp Mon Jan 04 17:30:10 2021 +0100 @@ -27,6 +27,7 @@ <%@page pageEncoding="UTF-8" import="de.uapcore.lightpit.viewmodel.ProjectView" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectDetailsView" scope="request" /> @@ -35,7 +36,17 @@ <%@include file="../jspf/project-header.jspf"%> <div id="tool-area"> - <a href="./projects/${project.node}/create-issue" class="button"><fmt:message key="button.issue.create"/></a> + <c:remove var="createIssueParams"/> + <c:if test="${viewmodel.versionFilter.id gt 0}"> + <c:set var="createIssueParams">&vid=${viewmodel.versionFilter.id}</c:set> + </c:if> + <c:if test="${viewmodel.componentFilter.id gt 0}"> + <c:set var="createIssueParams">${createIssueParams}&cid=${viewmodel.componentFilter.id}</c:set> + </c:if> + <c:if test="${not empty createIssueParams}"> + <c:set var="createIssueParams">?${fn:substringAfter(createIssueParams, "&")}</c:set> + </c:if> + <a href="./projects/${project.node}/create-issue${createIssueParams}" class="button"><fmt:message key="button.issue.create"/></a> <c:if test="${viewmodel.versionFilter.id gt 0}"> <a href="./projects/${project.node}/versions/${viewmodel.versionFilter.node}/edit" class="button"><fmt:message key="button.version.edit"/></a> </c:if>