Skip to content

New controlling plugin: Amount of working hours #112

Discussion options

You must be logged in to vote

Hi Kevin,

here my changes I've done in WorkingTimeService.php:

  • adding third parameter $project in function private function getYearStatistics(\DateTimeInterface $year, User $user, int $project ): array

  • adding addwhere in the select:
    ->andWhere($qb->expr()->eq('t.project', ':project'))
    ->setParameter('project', $project)

  • calling the function in line 71 with projectid (hard coded because it's only for my own use).
    $stats = $this->getYearStatistics($yearDate, $user, 4);

Now I get only those timesheets created under my project which is considered for working time (and not times booked on customer projects for billable reasons).

Best regards
Klaus

Replies: 6 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@idemus
Comment options

@kevinpapst
Comment options

@kevinpapst
Comment options

@idemus
Comment options

Answer selected by idemus
@kevinpapst
Comment options

@Wbrugger
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@idemus
Comment options

Comment options

You must be logged in to vote
1 reply
@idemus
Comment options

Comment options

You must be logged in to vote
1 reply
@idemus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants