Highlight due date in overdue

Sergey Papurin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2012

How to highlight overdue issues in View Screen ?

1 answer

1 accepted

0 votes
Answer accepted
Sergey Papurin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2012

Velocity processed Message Custom Field (for view), 11100 - to hide name of your customfield:

<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('#customfield_11100-val').parent().hide();
var content = jQuery("#due-date").html();
var fullDate = new Date();
var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) : '0' + (fullDate.getMonth()+1);
var currentDate = fullDate.getFullYear() + "-" + twoDigitMonth + "-" + fullDate.getDate();
if (new Date(content) <= new Date(currentDate))
{
jQuery("#due-date").css('background-color', 'red');
}
});
</script>

Sergey Papurin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2012

It's for date format like "2012-02-17"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events