Set in the Announcement banner of jira a code like this:

<font color="red"><b>Today at 10:30 AM (Spanish hour) we will RESTART JIRA due an unexpected maintenance</b></font>
<script>
var end = new Date('03/18/2016 10:30 AM');

    var _second = 1000;
    var _minute = _second * 60;
    var _hour = _minute * 60;
    var _day = _hour * 24;
    var timer;

    function showRemaining() {
        var now = new Date();
        var distance = end - now;
        if (distance < 0) {

            clearInterval(timer);
            document.getElementById('countdown').innerHTML = '<b>RESTARTING JIRA!</b>';

            return;
        }
        var days = Math.floor(distance / _day);
        var hours = Math.floor((distance % _day) / _hour);
        var minutes = Math.floor((distance % _hour) / _minute);
        var seconds = Math.floor((distance % _minute) / _second);

        document.getElementById('countdown').innerHTML = '<b>'+ days + ' days </b>';
        document.getElementById('countdown').innerHTML +='<b>'+  hours + ' hrs </b>';
        document.getElementById('countdown').innerHTML +='<b>'+  minutes + ' mins </b>';
        document.getElementById('countdown').innerHTML +='<b>'+  seconds + ' secs to RESTART</b>';
    }

    timer = setInterval(showRemaining, 1000);
</script>
<div id="countdown"></div>
Posted by:.

4 replies on “Set a countdown to your Banner Announcements for maintenances in JIRA

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s