Skip to content

Don't send mail to warn user fill timesheet (weekend and holiday) - #206

Open
bport wants to merge 1 commit into
digitalfox:masterfrom
bport:dont_send_timesheet_mail_we
Open

Don't send mail to warn user fill timesheet (weekend and holiday)#206
bport wants to merge 1 commit into
digitalfox:masterfrom
bport:dont_send_timesheet_mail_we

Conversation

@bport

@bport bport commented Feb 23, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@bport
bport force-pushed the dont_send_timesheet_mail_we branch from dab2129 to bc814bf Compare February 23, 2025 22:22
@bport bport changed the title Don't send mail to fill timesheet weekend and holiday Don't send mail to warn user fill timesheet (weekend and holiday) Feb 23, 2025
@bport
bport marked this pull request as ready for review February 23, 2025 22:23

@digitalfox digitalfox left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same code already exists here (except the async decorator)

def outside_business_hours():

Even if the business rules if quite simple it may be better to factorize it (staffing/utils.py maybe ?)

@bport
bport force-pushed the dont_send_timesheet_mail_we branch from bc814bf to 3006ba7 Compare March 23, 2025 19:54
…end / public holiday

We still sent it in holidays, because we still want to warn manager for example
@bport
bport force-pushed the dont_send_timesheet_mail_we branch from 3006ba7 to 55c97f4 Compare March 23, 2025 21:27
Comment thread bot/pydici_bot.py
import random
import pytz

from staffing.utils import is_outside_business_hours

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import cannot work so early in the file before env has been set. It fails with ModuleNotFoundError: No module named 'staffing'.
It should be moved around line 49 with others pydici imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants