Menu

QOL for Userrequest information

Shorty1
2024-06-21
2024-06-21
  • Shorty1

    Shorty1 - 2024-06-21

    Hi there,

    we'ld like to have a query for a notification that will allow us to use the data of ticket -> last_update and user request -> assignment_date
    How can we combine both to get this data?

    SELECT UserRequest AS u JOIN Ticket AS t ON u.id = t.id WHERE u.assignment_date < t.last_update AND u.status = 'assigned'
    

    doesnt' work and it returns:

    Unknown key in join condition (left expression), found 'id' in: SELECT UserRequest AS u JOIN Ticket AS t ON u.id = t.id WHERE u.assignment_date < t.last_update AND u.status = 'assigned' , expecting {org_id, caller_id, team_id, agent_id, service_id, servicesubcategory_id, parent_request_id, parent_incident_id, parent_problem_id, parent_change_id}

    Cheers
    Shorty

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2024-06-21

    A ticket already inherits the properties of the user request, so not sure why you're joining this. Not needed in the OQL :)

     
  • Shorty1

    Shorty1 - 2024-06-21

    Hi Jeffrey,

    you made my day. If someone needs this QOL to get notified when an agent of a UserRequest has changed after it was assigned to an agent.

    SELECT UserRequest WHERE assignment_date < last_update AND status = 'assigned'
    

    Cheers Shorty

     

Log in to post a comment.