I’m trying to generate a report that shows the number of completed tasks for the logged-in user during a date range. For the sake of keeping this simple, I want to hard code that date range to be: 1-JAN 2017 to 22-AUG 2017.
I’ve been following the online example found here for adding a custom report:
https://activecollab.com/help-classic/books/developing-activecollab-module/new-report
The report I would like to add would display two columns:
- Logged in User Name
- Sum of Completed Tasks (for 1-JAN 2017 to 22-AUG 2017)
If I was writing a raw SQL query I know I would just do something like: select a count of all projects where employee name is so-and-so and complete is true; within this date range.
But when I looked at the sample PHP code from this online help (in the above link), it seems Active Collab is using some kind of ORM.
I’ve been looking through our Active Collab code (we're self hosted) to see if I could find a list of the objects that represent the tables; but I’m not used to this framework, and I can’t find them. Is there a certain folder to look at to see what model I should call?
Are there examples in the code of doing a similar request like this; that I could look at?
Thanks!