payload: {"action":"created","issue":{"url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/issues/108","repository_url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning","labels_url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/issues/108/comments","events_url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/issues/108/events","html_url":"https://github.com/HUInstituteForICT/workplacelearning/issues/108","id":489038392,"node_id":"MDU6SXNzdWU0ODkwMzgzOTI=","number":108,"title":"Change computation of number of days (producing)","user":{"login":"EsthervdS","id":23473410,"node_id":"MDQ6VXNlcjIzNDczNDEw","avatar_url":"https://avatars0.githubusercontent.com/u/23473410?v=4","gravatar_id":"","url":"https://api.github.com/users/EsthervdS","html_url":"https://github.com/EsthervdS","followers_url":"https://api.github.com/users/EsthervdS/followers","following_url":"https://api.github.com/users/EsthervdS/following{/other_user}","gists_url":"https://api.github.com/users/EsthervdS/gists{/gist_id}","starred_url":"https://api.github.com/users/EsthervdS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EsthervdS/subscriptions","organizations_url":"https://api.github.com/users/EsthervdS/orgs","repos_url":"https://api.github.com/users/EsthervdS/repos","events_url":"https://api.github.com/users/EsthervdS/events{/privacy}","received_events_url":"https://api.github.com/users/EsthervdS/received_events","type":"User","site_admin":false},"labels":[{"id":752558598,"node_id":"MDU6TGFiZWw3NTI1NTg1OTg=","url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":757082713,"node_id":"MDU6TGFiZWw3NTcwODI3MTM=","url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/labels/must%20have","name":"must have","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-09-04T09:13:26Z","updated_at":"2019-09-11T17:57:36Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently, working days are counted whenever the minimum number of working hours is reached (SUM(duration) > hours_per_day). \r\n\r\nThis should be more flexible: the number of days that 'count' in a wplp should be the minimum of:\r\n\r\na. the number of days that hours are registered (COUNT(DISTINCT date))\r\nb. the floor of the total number of hours divided by the minimum number of hours per day (SUM(duration) / hours_per_day\r\n\r\n(Rationale: average hours per day should exceed 7.5 but 'overuren' do not count towards extra working days.)\r\n\r\nFor example: \r\n- If I register two days, one with 7 hours and one with 9 hours, a. is 2 and b. is also 2 (floor(16/7.5)=2). Result is 2.\r\n- If I register two days, one with 5 hours and one with 8 hours, a. is 2 and b. is 1 (floor(13/7.5) = \r\n 1). Result is 2.\r\n- If I register two days, both with 11.5 hours, a. is 2 and b. is 3 (floor(23/7.5) = 3) Result is 2."},"comment":{"url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/issues/comments/530494071","html_url":"https://github.com/HUInstituteForICT/workplacelearning/issues/108#issuecomment-530494071","issue_url":"https://api.github.com/repos/HUInstituteForICT/workplacelearning/issues/108","id":530494071,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDQ5NDA3MQ==","user":{"login":"rogierknoester","id":4541046,"node_id":"MDQ6VXNlcjQ1NDEwNDY=","avatar_url":"https://avatars1.githubusercontent.com/u/4541046?v=4","gravatar_id":"","url":"https://api.github.com/users/rogierknoester","html_url":"https://github.com/rogierknoester","followers_url":"https://api.github.com/users/rogierknoester/followers","following_url":"https://api.github.com/users/rogierknoester/following{/other_user}","gists_url":"https://api.github.com/users/rogierknoester/gists{/gist_id}","starred_url":"https://api.github.com/users/rogierknoester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogierknoester/subscriptions","organizations_url":"https://api.github.com/users/rogierknoester/orgs","repos_url":"https://api.github.com/users/rogierknoester/repos","events_url":"https://api.github.com/users/rogierknoester/events{/privacy}","received_events_url":"https://api.github.com/users/rogierknoester/received_events","type":"User","site_admin":false},"created_at":"2019-09-11T17:57:36Z","updated_at":"2019-09-11T17:57:36Z","author_association":"COLLABORATOR","body":"The total days interning counter is the sum of all days that fulfil the hours_per_day.\r\n\r\nWhile generating the Word document it loops over every week in the date range. For each day in each week it checks if hours > hours_per_day. If true, increase the day count of the week by 1. At the end of each week loop increase the total day count by the week's count.\r\n\r\nIn my test accounts it seems to work correctly."}}
other: {"actor":{"display_login":"rogierknoester"}}