The issue details screen will display a warning three days before the due date.
チケット詳細画面で期日の3日前になったら警告を表示します。
None
Bottom of issue detail
JavaScript
$(function() {
const daysLeft = 3;
const dueDateArray = $('#issue_due_date').val().split('-');
const alertDate = new Date(dueDateArray[0], dueDateArray[1] - 1, dueDateArray[2] - daysLeft);
const now = new Date();
const nowDate = new Date(now.getFullYear(), now.getMonth(), now.getDate());
if (nowDate >= alertDate) {
$('#content').prepend('<div class="warning">It is only ' + daysLeft + ' days until the due date.</div>');
}
});