Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification system #3216

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

SahilDhillon21
Copy link
Contributor

fixes #2560

A notification system is created for the users that looks like this:
screen-capture (1).webm

However, in order to fully close this issue we need to create a cron job via some scheduler to send these reminders to users.
If you can also review #3209 then it can be easily incorporated

DonnieBLT
DonnieBLT previously approved these changes Jan 16, 2025
@SahilDhillon21 SahilDhillon21 marked this pull request as ready for review January 16, 2025 11:36
@SahilDhillon21
Copy link
Contributor Author

I have added the command to the run_daily script, and also an optional link field to each notification. Should we add other notifications such as issue likes/comments, streaks etc?

@DonnieBLT DonnieBLT enabled auto-merge (squash) January 19, 2025 16:05
@DonnieBLT
Copy link
Collaborator

Yes notifications for all of those will be good. Thanks!

auto-merge was automatically disabled January 25, 2025 09:46

Head branch was pushed to by a user without write access

@SahilDhillon21
Copy link
Contributor Author

Fixed all the issues, please verify!

@SahilDhillon21
Copy link
Contributor Author

Also added the checkin_reminder_notification command in the run_daily schedule

@SahilDhillon21
Copy link
Contributor Author

@DonnieBLT Can this please be merged since it frequently gets merge conflicts due to the model addition

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

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

we would only want to show checkin reminders to users who belong to an organization that has check ins turned on.

def handle(self, *args, **options):
cutoff_date = now().date() - timedelta(days=1)

users_without_checkin = User.objects.exclude(dailystatusreport__date__gte=cutoff_date)
Copy link
Collaborator

Choose a reason for hiding this comment

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

we would only want to show checkin reminders to users who belong to an organization that has check ins turned on.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The organization model does not appear to have any attribute that indicates whether it has enabled check-ins. Could you please guide me on how to identify such organizations?

Copy link
Collaborator

Choose a reason for hiding this comment

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

it would be to join the DailyStatusReport to the organization so that daily status reports would only be sent to organizations that had reminders enabled. This would involve a migration.

@DonnieBLT
Copy link
Collaborator

I merged the conflict, hopefully that was right.

@SahilDhillon21
Copy link
Contributor Author

Thanks a lot for that! I'll make sure to finish this up as soon as possible

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