Skip to content

pass username strings instead of Dojo_User objects to create_notification in process_tag_notifications #14923

@donhluca

Description

@donhluca

Description

Fix user_mentioned notifications silently failing when a user is
@mentioned in a Finding or Test note.

Root Cause

process_tag_notifications() passed Dojo_User objects as recipients
to create_notification(), but _process_recipients() filters using
user__username__in=kwargs["recipients"] which expects username strings.
The type mismatch caused the queryset to return zero results → zero
notifications delivered.

Change

One-line fix in process_tag_notifications(): return username strings
from the list comprehension instead of Dojo_User objects.

Testing

Verified manually via Django shell:

  • Before fix: create_notification(recipients=[Dojo_User object]) → 0 alerts
  • After fix: create_notification(recipients=["username"]) → 1 alert created

Tested on DefectDojo 2.58.4, Docker Compose deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions