in js/work-items-control/prohibit-adding-work-items-in-future.js [9:16]
action: function(ctx) {
ctx.issue.workItems.added.forEach(function(item) {
var itemDate = new Date(item.date).setUTCHours(0, 0, 0, 0);
var today = new Date().setUTCHours(0, 0, 0, 0);
workflow.check(itemDate <= today,
'Adding work items in future is not allowed!');
});
},