Skip to content

Error with workflow, and ticket email flow #120

Description

@Kraleemil

Which module is the bug in

Tickets / Workflows (Automations)

Describe the bug

Workflow actions related to ticket notes and ticket-related emails are broken in several ways:

  1. The "Add a note to the ticket" workflow action fails with a database integrity error because analyst_id is not being set:
    Action 1 (add_ticket_note): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'analyst_id' cannot be null
    
  2. The default sample workflow that emails a user when a ticket is created is misconfigured (or the mail-reply handling is broken): instead of appending the outgoing/incoming mail as a note or reply on the existing ticket, it creates a brand new ticket each time. This happens both when the "ticket created" notification is sent, and when the end user replies to that email.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Workflows/Automations and create (or open the sample) workflow that includes an "Add a note to the ticket" action.
  2. Trigger the workflow (e.g., on ticket creation) and check the ticket — the "add a note to the ticket" action fails with the analyst_id SQL error above.
  3. Separately, use the default sample workflow that emails the requester when a new ticket is created.
  4. Observe that, rather than attaching that notification email as a note/conversation entry on the original ticket, the system generates a new ticket.
  5. Reply to that notification email as the end user.
  6. Observe that the reply also creates a new ticket instead of being threaded onto the original ticket as a reply.

Expected behavior

  • The "Add a note to the ticket" workflow action should complete successfully without requiring/failing on analyst_id; if the action is triggered by the system/workflow (not a specific analyst), it should either allow a null/system value for analyst_id or default to a system/automation user.
  • Outbound notification emails generated by a workflow (e.g., "ticket created" confirmation) should be logged as a note/reply on the originating ticket, not spawn a new ticket.
  • Incoming replies from the requester to a ticket-related email should be threaded onto the existing ticket (matched via ticket ID/reference in subject or headers), not create a duplicate ticket.

Screenshots

Image Image

Any errors in console (dev tools)

Not checked/not applicable — the reported error is a backend/PHP SQL error (see above), not a browser console error.

Additional comments

Related feature request (not a bug, but tied to the same area): it would be great to have a compact "preview" entry in the ticket's conversation timeline for the automatic "ticket received" email — similar to TopDesk — rather than either a full note or (as currently happens) a duplicate ticket. This would make the conversation order/history much easier to follow.
Generally TopDesk does it really good, maybe research it a bit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions