kimai / kimai

Kimai is a web-based multi-user time-tracking application. Works great for everyone: freelancers, companies, organizations - everyone can track their times, generate reports, create invoices and do so much more. SaaS version available at https://www.kimai.cloud
https://www.kimai.org
GNU Affero General Public License v3.0
3.15k stars 550 forks source link

Filter by project broken #670

Closed srdco closed 5 years ago

srdco commented 5 years ago

Describe the bug Filter by project dropdown blank in all views.

To Reproduce Steps to reproduce the behavior:

  1. Update to latest version (not master)
  2. Go to any page -- invoice, my times, etc.
  3. Try to filter by project (after choosing customer etc)

Screenshots If applicable, add screenshots to help explain your problem.

Desktop/Smartphone Please complete the following information if this seems to be a frontend issue:

Additional context Add any other context about the problem here.

kevinpapst commented 5 years ago

No, it's not. Check the stable demo: https://www.kimai.org/demo/ You need to check your log files for more infos.

kevinpapst commented 5 years ago

???

StefanWinterberger commented 5 years ago

Hey @kevinpapst I face the same problem. Its also reproducable on the Demo-Server. I logged in with 'john_user' to the 'Last Stable' Server. Then in 'My times' i tried to filter by Project but the drop down is empty.

By the way. Tank you very much for your work on this project. We like to use it :)

I use:

kevinpapst commented 5 years ago

I am sorry, but I still cannot reproduce it. Tested with Safari 12.1, Firefox 66.0.2 and Chrome 73.0 on MacOS. I tried with the users susan_super and john_user on the "latest development" demo and the "latest stable" demo.

It simply works for me. I need more information, otherwise I can't help.

Please open your browser console and check it + the your network tab upon changing the customer. There should be a request like https://demo.kimai.org/api/projects?customer=9&orderBy=name&visible=1 What is the result? Is there an error?

StefanWinterberger commented 5 years ago

Hi again Ok, first point. I didn't get that i have to choose a Customer before i can filter by project. I expected the same list that i get when i open the Dropdown for Projects when i add a new timesheet entry (without selecting a Customer). So this part works on the Demo-Server.

Second point on our installation when i select a customer the following call is made: /api/projects?customer=29&orderBy=name&visible=3 and this calle returns an HTTP 500 (Internal Server Error). Saddly on the Server i didn't get any logs under /var/log/apache2/error.log Are there any other log files?

Additional Info: The Current DB was importet from a Kimai V1 Server. Maybe there is something on the DB i can check for you to help?

kevinpapst commented 5 years ago

Hm, I still don't know what the best UX is here. If you have only a couple of customers/projects a full list would work. But some people have hundreds of customers and even more projects, then the full list would be a pain to use...

Regarding the 500: check in your Kimai installation at var/log/prod.log. But I would guess that you don't have proper file-permissions set for var/cache/ - the API libraries store cache files upon the first request. If that fails a 500 is raised.

StefanWinterberger commented 5 years ago

Hey @kevinpapst Thank you very much for the hint. I repeated the chown and chmod command from the install documentation. And know it works :) It seems i messed something up while the installtion.

Regarding the UX. I see that for a lot of projects it could be a mess with such a big list. But then again, the user is still free to pre-filter it with the customer field. Maybe you can make it configurable if the user wants to show the list without customer selected? A second hint: If the projects field only can be used when a customer is selected, maybe you can disable it if no customer is selected. So it would be more clear how to use it :)

Thanks again. For me this issue can be closed.

kevinpapst commented 5 years ago

Any feedback @srdco ?

srdco commented 5 years ago

I'm sorry -- haven't been able to get back to it, as I've been completely swamped. I'll post back as soon as I have a chance to get to it again. I will note that I was used to choosing the customer first, so that wasn't a problem.

It only showed up after updating to 0.8.1.

I will check the log files, and get back to you. It may be a permissions problem -- seems like that plagued me on first install. I'll close for now, and can re-open if I find anything that's not just user error.

kevinpapst commented 5 years ago

@srdco check var/cache/prod/ - the API is trying to create cache files there

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.