Added ability to store the working hours to the user profile #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there
This feature provides the ability to store the target working hours within the user profile.
The user can also set its own working hours using LUIS with something like:
"change my work hours to 8 hours".
The important part is, that LUIS only recognizes one time.
Cause i am using the WorkedDurationInMinutes method which will fail if a sentence like this will be used:
"my day has 9 hours" cause "WorkedDurationInMinutes" takes the first() element which will be a date instead of hours.
Additionaly to that, i have added two now environment variables:
DEFAULT_WORKING_HOURS MINIMUM_HOURS_FILLED_PERCENTAGE
The idea is the following: one can define a standard workday duration and also a minimum percentage of what needs to be reported till 5 PM.
I wrote the code in a way that the defaults are 8 hours and 75% if no environment variable has been set.
This way all existing setups will work also with this code