Sun, 26 Sep 2021 14:59:36 +0200
fix assignee not respected in hasChanged()
<%-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2021 Mike Becker. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --%> <%@page pageEncoding="UTF-8" %> <%@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.IssueDetailView" scope="request"/> <c:set var="project" scope="page" value="${viewmodel.project}"/> <c:set var="component" scope="page" value="${viewmodel.component}"/> <c:set var="version" scope="page" value="${viewmodel.version}"/> <c:set var="issue" scope="page" value="${viewmodel.issue}" /> <c:set var="issuesHref" scope="page" value="./projects/${project.node}/issues/${empty version ? '-' : version.node }/${empty component ? '-' : component.node}/"/> <table class="issue-view fullwidth"> <colgroup> <col> <col style="width: 50%"> <col> <col style="width: 50%"> </colgroup> <tbody> <tr> <th><fmt:message key="issue.id"/></th> <td>${issue.id}</td> <td colspan="2"></td> </tr> <tr> <th><fmt:message key="issue.created"/></th> <td> <c:set var="dateValue" value="${issue.created}"/> <%@include file="../jspf/date-with-tooltip.jspf"%> </td> <th><fmt:message key="issue.updated"/></th> <td> <c:set var="dateValue" value="${issue.updated}"/> <%@include file="../jspf/date-with-tooltip.jspf"%> </td> </tr> <tr> <th><fmt:message key="project"/></th> <td> <c:out value="${issue.project.name}" /> </td> <th><fmt:message key="component"/></th> <td> <c:if test="${not empty issue.component}"> <c:out value="${issue.component.name}"/> </c:if> <c:if test="${empty issue.component}"> <fmt:message key="placeholder.null-component"/> </c:if> </td> </tr> <tr> <th><fmt:message key="issue.category"/></th> <td> <div class="issue-tag ${issue.category}"> <fmt:message key="issue.category.${issue.category}" /> </div> </td> <th><fmt:message key="issue.status"/></th> <td> <div class="issue-tag phase-${issue.status.phase.number}"> <fmt:message key="issue.status.${issue.status}" /> </div> </td> </tr> <tr> <th><fmt:message key="issue.resolved-versions"/></th> <td> <c:out value="${issue.resolved.name}"/> </td> <th><fmt:message key="issue.affected-versions"/></th> <td> <c:out value="${issue.affected.name}"/> </td> </tr> </tbody> </table> <table class="issue-view fullwidth"> <colgroup> <col> <col style="width: 100%"> </colgroup> <tbody> <tr> <th><fmt:message key="issue.subject"/></th> <td><c:out value="${issue.subject}"/></td> </tr> <tr> <th class="vtop"><fmt:message key="issue.description"/></th> <td> <div class="markdown-styled"> ${issue.description} </div> </td> </tr> <tr> <th><fmt:message key="issue.assignee"/></th> <td> <c:if test="${not empty issue.assignee}"> <c:if test="${not empty issue.assignee.mail}"> <a href="mailto:<c:out value="${issue.assignee.mail}"/>"> <c:out value="${issue.assignee.displayname}"/> </a> </c:if> <c:if test="${empty issue.assignee.mail}"> <c:out value="${issue.assignee.displayname}"/> </c:if> </c:if> <c:if test="${empty issue.assignee}"> <fmt:message key="placeholder.null-assignee" /> </c:if> </td> </tr> <tr> <th><fmt:message key="issue.eta"/></th> <td><fmt:formatDate value="${issue.eta}" /></td> </tr> </tbody> </table> <div class="hright"> <a href="${issuesHref}" class="button"> <fmt:message key="button.back"/> </a> <a href="${issuesHref}${issue.id}/edit" class="button submit"> <fmt:message key="button.issue.edit"/> </a> </div> <hr class="comments-separator"/> <h2> <fmt:message key="issue.comments"/> <c:if test="${not empty viewmodel.comments}"> (${fn:length(viewmodel.comments)}) </c:if> </h2> <c:if test="${viewmodel.issue.id ge 0}"> <form id="comment-form" action="${issuesHref}${issue.id}/comment" method="post"> <table class="formtable fullwidth"> <tbody> <tr> <td><textarea rows="3" name="comment" required></textarea></td> </tr> </tbody> <tfoot> <tr> <td> <button type="submit"><fmt:message key="button.comment"/></button> </td> </tr> </tfoot> </table> </form> <c:forEach var="comment" items="${viewmodel.comments}"> <div class="comment"> <div class="comment-author"> <c:if test="${not empty comment.author}"> <c:if test="${not empty comment.author.mail}"> <a class="comment-author-name" href="mailto:${comment.author.mail}"> </c:if> <c:out value="${comment.author.displayname}"/> <c:if test="${not empty comment.author.mail}"> </a> </c:if> <c:if test="${comment.author.username eq pageContext.request.remoteUser}"> <a class="comment-edit-icon" onclick="showCommentEditor(${comment.id})">✎</a> </c:if> </c:if> <c:if test="${empty comment.author}"> <fmt:message key="issue.comments.anonauthor"/> </c:if> </div> <div class="smalltext"> <fmt:formatDate type="BOTH" value="${comment.created}" /> <c:if test="${comment.updateCount gt 0}"> <span class="comment-edit-info"> (<fmt:message key="issue.comments.lastupdate"/> <fmt:formatDate type="BOTH" value="${comment.updated}" />, ${comment.updateCount} <fmt:message key="issue.comments.updateCount"/>) </span> </c:if> </div> <div id="comment-view-${comment.id}" class="medskip markdown-styled"> ${comment.commentFormatted} </div> <div id="comment-editor-${comment.id}" style="display: none"> <form id="comment-form-${comment.id}" action="${issuesHref}${issue.id}/comment" method="post"> <input type="hidden" name="commentid" value="${comment.id}"> <table class="formtable fullwidth"> <tbody> <tr> <td> <textarea rows="5" name="comment" required><c:out value="${comment.comment}"/></textarea> </td> </tr> </tbody> <tfoot> <tr> <td> <button type="submit"><fmt:message key="button.comment.edit"/></button> </td> </tr> </tfoot> </table> </form> </div> </div> </c:forEach> </c:if>