Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

How would the OQL statement be like to select agent when closing work order?

Erik
2014-04-02
2015-04-17
  • Erik
    Erik
    2014-04-02

    Trying to figure out what to use as OQL statement when creating an action on Work order, triggered when it is closed.
    I want to send an email to the corresponding agent assigned to the change involved.

     
  • Gene Matthews
    Gene Matthews
    2015-04-17

    I've been struggling with this very thing. After much trial and error I came up with this:

    SELECT Person AS p
    JOIN Ticket AS t ON t.agent_id = p.id
    JOIN WorkOrder AS w ON w.ticket_id = t.id
    WHERE t.id=:this->ticket_id

    it seems to work for me.

    Gene