I tried to follow this as well today, on version 7.5.Because Grand total hours would be great and usefull feature (I dont list trought pages and sum them manually to get user´s sum of hours).But unfortunatelly it doesnt work: I see the row named "Grand total hours" but no numbers in columns, exactly as in previou sposts.

Other question: is possible to filter timepicker by milestone or Set of tasks? That would be usefull too...

ahecho wrote:I tried to follow this as well today, on version 7.5.Because Grand total hours would be great and usefull feature (I dont list trought pages and sum them manually to get user´s sum of hours).But unfortunatelly it doesnt work: I see the row named "Grand total hours" but no numbers in columns, exactly as in previou sposts.

I have rechecked my code, and am not sure how or what could be causing this problem. So I have went ahead and added debugging code to class.timetracker.php, that will check for errors, and if any are found, it will end the script and output the errors.

The mentioned class.timetracker.php file, with debugging code, can be found attached to my post. Replace your class.timetracker.php file, found in include directory, with the one provided here, then run collabtive, and go to either users profile page, or project time tracker page.

Well, I´m not receiving any errors, thats true. But unfortunatelly any results as well. If You have any idea, what can cause this... I would be very happy about it. This is quite essential functionality to us.

ahecho wrote:Well, I´m not receiving any errors, thats true. But unfortunatelly any results as well. If You have any idea, what can cause this... I would be very happy about it. This is quite essential functionality to us.

I would assume you replaced the class.timetracker.php file with the one that was provided in my last post.

If this is what you did, then, to me, it seems that the problem is outside the grand total hours function I wrote. The only thing that I can thing of is that you didn't replace all the files with those that I provided, particurarly manageuser.php and managetimetracker.php files. Go back and make sure that you replaced all the files with the ones that I provided.

If I had access to your system, using something like FTP, and a collabtive test account, then I could easily track down the problem. Trying to find the problem, and working from the outside is not so easy.

Sorry, You are right. I did some basic msitake, when copying files.Now it is working.But it stil showing "Grand total hours", it is not related to any filter. Is it how it is supposed to be or is it a mistake?I would preffer it is related to active filtering...

ahecho wrote:But it stil showing "Grand total hours", it is not related to any filter. Is it how it is supposed to be or is it a mistake?I would preffer it is related to active filtering...

When I made this I had no plans for filtering, did not even think about it at the time.

This was made using the original poster's premise that he/she wanted grand total hours for a particular user, that had a lot of time tracker entries, that then paginated a few pages.

You bringing up filtering and grand total hours, made me think this more throughly. It is quite possible that, once filtering, that the filtered results could span multiple pages. With the filter applied and having multiple pages, this would bring you back to the same problem, how do you easily get the grand total hours without having to go to each page. In this situation, this essentially makes my modifications useless.

For my modifications to become fully useful, I will need to make my "grand total hours" modifications reflect the current filter.

I will add support for filters and I will post the modifications with the filtering support included.

Thanks a lot. But unfortunatelly the filtring itself seems to be a little bugy. It wont remember filter setting trought pagination as well. So You can hold Your effort with Your mod grand hours till the basic function works properly I have to admit that we liked collabtive a lot and we give it a long try, but with not useful reporting in timetracker and some other issues we are thinking about to swith to another sw.

ahecho wrote:Thanks a lot. But unfortunatelly the filtring itself seems to be a little bugy. It wont remember filter setting trought pagination as well.

I have looked into this problem, and I have found a fix, as it was easy enough. The reason this problem occurred is because, when you go to the next paginated page, there was no way for the system to know which filter settings you had, as this information was not passed along on to the next page.

Solving this is easy. Setting the form to get method instead of post will fix the first problem. This makes it so that the browser passes the form data using the url.

For some reason this was not implemented for filtering in the project time tracker, but it was implemented for the reports found in the user's profile.

Now that is one small part, the other is to use something, javascript or php, to get the data and to construct pagination links. This part was already done and is part of the collabtive code. This is why fixing this was easy.

The fix for this involves, in managetimetracker.php, under $action == "showproject", setting all the post methods to get, as post can not be used as now get is being used to submit the form data. Next thing, in filtertracker.tpl, setting the form method to get instead of post. This is all that is needed to fix this bug.

On top of this I have also added support for filtering to my "grand total hours" modifications.

On another note, while testing my modifications, I noticed that there seems to be some problems with the report filtering, found in user's profile. It seems if you filter with more then one task selected it seems that it ends up missing some tasks, so the total will be wrong. But on the other hand my "Grand total hours" modification actually does show the correct grand totals for those multiple tasks. Not sure what is going on there but I do not have time to investigate and provide a fix, this is going to be left for someone else to do.

You will find the modifications to add filtering support to my "grand total hours" modifications, in the attached zip file below. And on top of that I am also providing the fix for the above mentioned bug, where the filtering settings are lost after going to a paginated page.

Provides support for grand total hours for all the paginated pages, that are found in user's reports, and project time tracker. On top of that it includes fixes to the bug where the filter settings are lost when going to one of the paginated pages.

sdecrane wrote:Has anyone experimented with adding a filtering criteria to allow the user to filter by Milestone?

Hmm, I will look into it, but from just thinking about it, I wouldn't think this would be that easy to add. This would have to be a script that would take the selected milestone, then look into what tasks are part of the milestone, and then load up all those tasks. If it ends up not being too difficult, and not time consuming, I will add it.

sdecrane wrote:Additionally, I'm still struggling to understand why my dates are listed as d/m/y in the timetracker when I have set them in every location I can see to be m/d/y. This is causing a lot of confusion.

Either it is a bug or those dates, in the time tracker, are hard coded.