This can be done most simply by just copying you on the notification email, I think.
Please let me know if I misunderstood something:
- When receiving a message,
get_participant_for_emailwhich finds a user or a participant if it exists or creates a participant
handle_tracker_messagein case it's a new ticket
submit_ticketcreates a subscription linking the submitter and the ticket if the submitter isn't already following the tracker
submit_ticketsends a notification to all subscribers except for the submitter:if sub.participant != submitter: _send_new_ticket_notification(sub, ticket)
Wouldn't that be "as simple as" also notifying the submitter when a new ticket is filed? Maybe only when the submission is done by email?
If that's the case I'm willing to work on it :)
I would try something like this...but as I can't test the patch, i didn't send it to the list:index 3175c2f..60a2985 100644 --- a/todosrht/tickets.py +++ b/todosrht/tickets.py @@ -471,7 +471,7 @@ def submit_ticket(tracker, submitter, title, description, importing=False): # Send notifications for sub in tracker.subscriptions: _create_event_notification(sub.participant, event) - if sub.participant != submitter: + if sub.participant != submitter or submitter.participant_type == ParticipentType.email: _send_new_ticket_notification(sub, ticket) notified_users = [sub.participant for sub in tracker.subscriptions]
I guess that wouldn't work for existing users submitting an issue by email because in that case it would have a type of
I was more thinking of sending another parameter to the
I submitted a patch for this ticket: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/10941