Loading

Time Caclulation Errors

Get help with problems, or report & discuss bugs in Collabtive

Time Caclulation Errors

Postby semide » 12.04.2015, 18:56

I just updated to latest Collabtive 2.1. Immediately ran into a problem entering a job -

I bill in .25 hour increments. The Project Screen -> Timetracker pane will only record time in whole hours. If the start time is entered as 8:00, and I enter 8:15 in end time, when I tab out the end time reverts to 8:00.

If I manually enter .25 into the Hours input, the end time input shows NaN:00 and the record refuses to save.

I can enter the time as an hour, and edit the entry in the Timetracker window, but that is not very efficient.

Any ideas how to fix this?
semide
 
Posts: 3
Joined: 06.03.2014, 02:11

Re: Time Caclulation Errors

Postby Eva » 14.04.2015, 08:21

Which browser did you use?
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Time Caclulation Errors

Postby semide » 21.04.2015, 15:11

Chrome, Firefox, and Safari.

Relevant Javascript seems to parse all time as int, which I believe would remove minutes, and for display add ":00" to result, if I read this correctly.

Code:

function populateEndtime()
{
var startVal = parseInt($('started').value,10);
var hrsVal = parseInt($('workhours').value,10);

var finVal = startVal + hrsVal;

finVal = zeroFill(finVal,2);
$('ended').value = finVal + ":00";
}
function populateHours()
{
var startVal = parseInt($('started').value,10);
var endVal = parseInt($('ended').value,10);
var hrsVal = parseInt($('workhours').value,10);

var finVal = endVal - startVal;
if(hrsVal != finVal && finVal >= 0)
{
$('workhours').value = finVal;
}
}
semide
 
Posts: 3
Joined: 06.03.2014, 02:11

Re: Time Caclulation Errors

Postby semide » 27.04.2015, 19:34

Bump. Any ideas here?
semide
 
Posts: 3
Joined: 06.03.2014, 02:11

Re: Time Caclulation Errors

Postby Eva » 28.04.2015, 00:56

I have a solution for you that works:

Use pre-filled start time: 08:00
Enter end time manually: 08:15 - Now DON'T leave the field via tab, but click in the comment field or the submit button via mouse!!! :D

(It doesn't matter that the time elapsed field still says 0 hours.)
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany


Return to Problems and Bugs

Who is online

Users browsing this forum: No registered users

cron