~sircmpwn/todo.sr.ht#180: 
Filing tickets by email should email you back the assigned ticket number

This can be done most simply by just copying you on the notification email, I think.

Status
REPORTED
Submitter
~sircmpwn
Assigned to
No-one
Submitted
1 year, 29 days ago
Updated
a month ago
Labels
No labels applied.

~rwa a month ago

afaics this has already been fixed?

~sircmpwn a month ago

No, this still isn't implemented.

~rwa a month ago

yep, messed up my open tabs...sorry.

~crocmagnon a month ago

Please let me know if I misunderstood something:

  • When receiving a message, handle_DATA is called
  • handle_DATA calls _handle_DATA
  • _handle_DATA calls get_participant_for_email which finds a user or a participant if it exists or creates a participant
  • _handle_DATA then calls handle_tracker_message in case it's a new ticket
  • _handle_DATA calls submit_ticket
  • submit_ticket creates a subscription linking the submitter and the ticket if the submitter isn't already following the tracker
  • submit_ticket sends 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 :)

~rwa a month ago

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]

~crocmagnon a month ago

I guess that wouldn't work for existing users submitting an issue by email because in that case it would have a type of ParticipantType.user.

I was more thinking of sending another parameter to the submit_ticket method, like email_submission=False.

~crocmagnon a month ago

I submitted a patch for this ticket: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/10941

Register here or Log in to comment, or comment via email.