Page 3 of 3
Re: 2 issues with piping
Posted: Thu Jan 02, 2025 5:17 pm
by teodorpav
I saw this, but I didn't think it applied to this case.
Since the email they are replying from is the same, the subject contains the ticket number Re: [#37Z-NDX-ZZU9]
I've looked more closely now and this doesn't happen every time, I need to look into it more closely.
Thanks for the help!
Re: 2 issues with piping
Posted: Thu Jan 02, 2025 10:50 pm
by teodorpav
Please help me how to modify here:
Code: Select all
if (hesk_dbNumRows($res))
{
$ticket = hesk_dbFetchAssoc($res);
// Do email addresses match?
$customers = hesk_get_customers_for_ticket($ticket['id']);
$customer_emails = array_map(function($customer) { return $customer['email']; }, $customers);
if (!in_array($tmpvar['email'], $customer_emails))
{
$tmpvar['trackid'] = '';
}
// Is this ticket locked? Force create a new one if it is
if ($ticket['locked'])
{
$tmpvar['trackid'] = '';
}
}
else
{
$tmpvar['trackid'] = '';
}
}
Thank you
Re: 2 issues with piping
Posted: Fri Jan 03, 2025 7:05 am
by Klemen
Try removing
Code: Select all
if (!in_array($tmpvar['email'], $customer_emails))
{
$tmpvar['trackid'] = '';
}
Re: 2 issues with piping
Posted: Sat Jan 04, 2025 12:06 pm
by teodorpav
Sadly it doesn't work.
https://prnt.sc/jt8eH9m2ZJem
Any idea why this happened with some tickets?
Re: 2 issues with piping
Posted: Sat Jan 04, 2025 4:58 pm
by Klemen
Hard to say what is going on without seeing your database and all the original emails.
I see two different tracking IDs in the second ticket subject - maybe that caused an issue?
Re: 2 issues with piping
Posted: Sat Jan 04, 2025 10:57 pm
by teodorpav
I had merged the previous tickets and apparently the numbers of the two tickets remain in the subject.
I can give you access to database if is necessary.
Thank you!