I've created a statistik/report which shows me the topic, the customer_user, ticket number, and status of all tickets. What I still need is the city of the customer_user. I've found viewtopic.php?t=23142#p91263 but it doesn't work for me. Here's my SQL-Query:
Code: Select all
SELECT st.id, st.queue_id, st.ticket_state_id, st.ticket_lock_id, st.ticket_priority_id,
st.create_time_unix, st.create_time, st.tn, st.customer_id, st.customer_user_id,
st.user_id, st.responsible_user_id, st.until_time, st.change_time, st.title,
st.escalation_update_time, st.timeout, st.type_id, st.service_id, st.sla_id,
st.escalation_response_time, st.escalation_solution_time, st.escalation_time, st.archive_flag,
st.create_by, st.change_by, customer_user.city
FROM ticket st
JOIN customer_user ON customer_user.customer_id = st.customer_id
WHERE customer_user.email like "%@nxxx.de" and st.id = ?',
Bind => [ \$Param{TicketID} ],
Limit => 1,
PS: OTRS: 5.0.19