Fri, 23 Oct 2020 12:26:08 +0200
highlight passed ETA - fixes #23
1.1 --- a/src/main/java/de/uapcore/lightpit/entities/Issue.java Fri Oct 23 11:44:02 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/entities/Issue.java Fri Oct 23 12:26:08 2020 +0200 1.3 @@ -171,6 +171,15 @@ 1.4 this.eta = eta; 1.5 } 1.6 1.7 + /** 1.8 + * An issue is overdue, if it is not done and the ETA is before the current time. 1.9 + * @return true if this issue is overdue, false otherwise 1.10 + */ 1.11 + public boolean isOverdue() { 1.12 + return eta != null && status.getPhase() != IssueStatus.PHASE_DONE 1.13 + && eta.before(new Date(System.currentTimeMillis())); 1.14 + } 1.15 + 1.16 @Override 1.17 public boolean equals(Object o) { 1.18 if (this == o) return true;
2.1 --- a/src/main/webapp/WEB-INF/jspf/issue-list.jspf Fri Oct 23 11:44:02 2020 +0200 2.2 +++ b/src/main/webapp/WEB-INF/jspf/issue-list.jspf Fri Oct 23 12:26:08 2020 +0200 2.3 @@ -1,7 +1,6 @@ 2.4 <%-- 2.5 issues: List<Issue> 2.6 --%> 2.7 - 2.8 <table class="fullwidth datatable medskip"> 2.9 <colgroup> 2.10 <col width="auto" /> 2.11 @@ -31,7 +30,9 @@ 2.12 </div> 2.13 </td> 2.14 <td> 2.15 - <fmt:formatDate value="${issue.eta}" /> 2.16 + <span class="<c:if test="${issue.overdue}">eta-overdue</c:if> "> 2.17 + <fmt:formatDate value="${issue.eta}" /> 2.18 + </span> 2.19 </td> 2.20 </tr> 2.21 </c:forEach>
3.1 --- a/src/main/webapp/projects.css Fri Oct 23 11:44:02 2020 +0200 3.2 +++ b/src/main/webapp/projects.css Fri Oct 23 12:26:08 2020 +0200 3.3 @@ -149,3 +149,7 @@ 3.4 div.comment { 3.5 margin-bottom: 1.25em; 3.6 } 3.7 + 3.8 +span.eta-overdue { 3.9 + color: red; 3.10 +} 3.11 \ No newline at end of file