New time widget position and red on empty time entry

  • 13 December 2016
  • 5 replies
  • 45 views


Sometime I forget to add the time entry on my tickets. So I wrote a little Script to move the time widget up and make it red, if no time entry is set.




tcvulGtG_dK-jVNLZyq7c_3JLN7JjnoWSw.png



<script type="text/javascript">
jQuery('#TimesheetTab').insertBefore(jQuery('#TicketProperties'));

var myVar = setInterval(function(){ checkTimeentry() }, 2000);

function checkTimeentry() {
var time_total;
time_total = jQuery('#timeentry_timer_total').text();
if (time_total === '00:00') {
jQuery('#TimesheetTab').css('color', 'red');
} else {
jQuery('#TimesheetTab').css('color', '');
}
}
</script>



 



This topic has been closed for comments

5 replies


Hi Betram, 




Thanks for the app! Just what we needed. 




One question; Do you know if, and maybe how, it's possible to 'unfold'/'expand' the time widget by default?


I think that when the time registration widget is expanded by default, It's even more clear and agents can directly click the button.  



I am sorry, but we have another workflow and don't use the autofire app. So there is no need for me to change the app.


Hi Bertram Simon, I notice that your app disable this fonction : https://support.freshdesk.com/support/discussions/topics/297029 is it possible to get it fix together?


Thank you for sharing!


It works very well, 




* If you have time and want to develop another application, I have some to offer you.