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.

Assigned to
1 year, 3 months ago
a month ago
No labels applied.

~rwa 4 months ago

afaics this has already been fixed?

~sircmpwn 4 months ago

No, this still isn't implemented.

~rwa 4 months ago

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

~crocmagnon 4 months 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 4 months 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 4 months 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 3 months ago

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

~sircmpwn REPORTED FIXED a month ago

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