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

Target not correct for user notifications #1298

Open
carlobortolan opened this issue Jan 9, 2024 · 0 comments
Open

Target not correct for user notifications #1298

carlobortolan opened this issue Jan 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@carlobortolan
Copy link
Member

Describe the bug
When creating a "user notification" via the tumlive web-app, you should be able to define who the notification should be sent to (e.g., admin: target=5, lecturers: target=4, students target=3, loggedIn target=2, allUsers target=1). However, when doing so, internally it currently always sets the target to 1 targeting always all users.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the admin dashboard (localhost:8081/admin)
  2. Click on user notifications (localhost:8081/admin/notifications)
  3. Create a new user notification targeting "Loggedin users", "Students", "Lecturers" or "Admins" and when checking the records in the db, the target is always set to 1
  4. (See screenshots below)

Expected behavior
When creating a "user notification" via the tumlive web-app, you should be able to define who the notification should be sent to (e.g., admin: target=5, lecturers: target=4, students target=3, loggedIn target=2, allUsers target=1).

Screenshots
Create notification for "Admins" -> Target set to 1 instead of 5
Create notification for "Lecturers" -> Target set to 1 instead of 4.
Create notification for "Students" -> Target set to 1 instead of 3.
Create notification for "Loggedin users" -> Target set to 1 instead of 2.

image
image
image
image
image

Desktop:

  • OS: Manjaro Linux x86_64
  • Browser: Mozilla Firefox
  • Version: 121.0

Additional context

  • It may be that this issue occurs only locally and not on the deployed https://live.rbg.tum.de server, but an admin (/someone who can create notifications) would have to test this.

  • The issue appears to not be on the client's side as the client sends the correct target:
    image

  • The issue seems to be with the createNotification method, which doesn't bind the correct notification target resulting in the default target value (1) being used

@carlobortolan carlobortolan added the bug Something isn't working label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant