Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Matthew Frost
    odd still get bad parameters
    on projects also
    found it 2020-10-15T09:10:41
    Matthew Frost
    dont get any records back as admin user if i just set start and end time
    do i need to be in the teams also?
    Kevin Papst
    start with no parameters and then work your way up to find out, which parameter causes the list to be empty
    Matthew Frost
    ok :)
    even blank gives nothingh
    only on my none admin user it returns data
    Kevin Papst
    Lets change roles for a second and pretend you are me: when reading your posts, would you understand what you are trying to achieve and what you need help with? Because I don't. What is blank? What is "it" (that returns data)? You are talking about users, timesheet, projects, dates, blank parameters ... The easiest way is to post an example here, querying the Kimai demo and then we can have a look what is wrong(going on.
    Matthew Frost
    sure :)
    we GET from the /api/timesheets endpoint
    with only two parameters
    start and end
    they are set to the first day of the last month and the last day of the last month
    when i run the API query i get data back showing me a timesheet
    but i dont get all the records i should
    so for example i get 1 record back when i have 5 records in my time tracking and 20 in the general time tracking of all team members
    headers are set to content type json and the xauth headers needed
    Matthew Frost
    ok its my account apprently i get different results if i use a system admin account
    vs my normal user account
    normal = teamlead
    Matthew Frost
    @kevinpapst seems to be ok if i use my other user so nothing to worry about for now
    is there anyway i can ask the API to resolve these values for me: 'activity': 3, 'project': 10, 'user': 4,
    so i dont have to do any look ups ?
    Kevin Papst
    There is a pagination bug in timesheets when working with with team permissions (which is already in work). You get around that with either using an admin account or setting the "view_all_data" permission to the teamlead role.
    The other question is documented in the /timesheets endpoint - check the parameter "full"
    be aware that it might change with the next version: kevinpapst/kimai2#1984
    Matthew Frost
    ah i see
    so far i only see my own records via the API i think
    but i am a "system administrator"
    do i need to be "administrator"
    Matthew Frost
    think i found a small bug
    if you make a user called api
    you cant browse to the edit page of the user
    Matthew Frost
    whatever i set i cant view timesheets that are not my own via the api
    Matthew Frost
    also hitting error after upgrading
    Loading composer repositories with package information
    Installing dependencies from lock file
    Nothing to install or update
    Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
    Package zendframework/zend-escaper is abandoned, you should avoid using it. Use laminas/laminas-escaper instead.
    Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
    Generating optimized autoload files
    composer/package-versions-deprecated: Generating version class...
    composer/package-versions-deprecated: ...done generating version class
    Executing script cache:clear [KO]
    Script cache:clear returned with error code 255
    !!  Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#77
    !!    #message: """
    !!      Attempted to load class "DoctrineFixturesBundle" from namespace "Doctrine\Bundle\FixturesBundle".\n
    !!      Did you forget a "use" statement for another namespace?
    !!      """
    !!    #code: 0
    !!    #file: "./src/Kernel.php"
    !!    #line: 100
    !!    trace: {
    !!      ./src/Kernel.php:100 {
    !!        App\Kernel->registerBundles()
    !!        › if (isset($envs['all']) || isset($envs[$this->environment])) {
    !!        ›     yield new $class();
    !!        › }
    !!      }
    !!      ./vendor/symfony/http-kernel/Kernel.php:446 { …}
    !!      ./vendor/symfony/http-kernel/Kernel.php:133 { …}
    !!      ./vendor/symfony/framework-bundle/Console/Application.php:169 { …}
    !!      ./vendor/symfony/framework-bundle/Console/Application.php:75 { …}
    !!      ./vendor/symfony/console/Application.php:147 { …}
    !!      ./bin/console:29 { …}
    !!    }
    !!  }
    !!  2020-10-15T18:01:45+02:00 [critical] Uncaught Error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle' not found
    Script @auto-scripts was called via post-install-cmd
    Kevin Papst
    Be careful with mixing APP_ENV=dev and then executing composer install with --no-dev
    Bildschirmfoto 2020-10-15 um 18.17.30.png
    You should carefully read the API descriptions
    Matthew Frost
    thats funny i dont have that in mine
    i think i am just a version behind
    as i dont even have that permission in my list
    any way i can get rid of that error i did switch back to prod
    Matthew Frost
    fixed it :)