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

New notifications #16

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

New notifications #16

wants to merge 16 commits into from

Conversation

ebeers-png
Copy link
Collaborator

Any background context you want to provide?

What's this PR do?

When should it be merged in?

Do you want someone to review this before it gets merged in?

How should this be manually tested?

What are the relevant tickets?

Screenshots (if appropriate)

Copy link
Collaborator Author

@ebeers-png ebeers-png left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes, it's working great! I have some other notes:

  • Add notification messages for attaching a file; changing the priority; changing the due date; changing the title
  • The message "A ticket has been assigned to you" should be changed out for the message "You've been assigned to ticket <id> by <name>"

helpdesk/forms.py Outdated Show resolved Hide resolved
helpdesk/forms.py Outdated Show resolved Hide resolved
helpdesk/views/staff.py Outdated Show resolved Hide resolved
helpdesk/views/staff.py Outdated Show resolved Hide resolved
helpdesk/templates/helpdesk/create_announcement.html Outdated Show resolved Hide resolved
helpdesk/templates/helpdesk/notifications_index.html Outdated Show resolved Hide resolved
@ebeers-png
Copy link
Collaborator Author

One more task: create a management command that when run, deletes read notifications that are over a day old, and any expired announcements. Management commands are run with ./manage.py name-of-file (for example, ./manage.py get_email --debug runs the code in management/commands/get_email.py). Here's some documentation: https://docs.djangoproject.com/en/5.0/howto/custom-management-commands/ You can use create_queue_permissions.py as a base, that file looks pretty straightforward.

This command won't need any options, and we have a system that can run commands every x minutes on our servers, so don't worry about when it should run. The command should use the current time (like now()) and Notifications.objects.filter(...).exists() to check if read notifs over a day old exist (and delete them if so); and check if any expired announcements exist, and delete them if so. I think that should finish up what needs to be done with notifications!

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

Successfully merging this pull request may close these issues.

2 participants