2 issues with piping

Helpdesk for my helpdesk software

Moderator: mkoch227

teodorpav
Posts: 15
Joined: Fri Nov 08, 2024 1:08 pm

Re: 2 issues with piping

Post 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!
teodorpav
Posts: 15
Joined: Fri Nov 08, 2024 1:08 pm

Re: 2 issues with piping

Post 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
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: 2 issues with piping

Post by Klemen »

Try removing

Code: Select all

            if (!in_array($tmpvar['email'], $customer_emails))
	        {
	        	$tmpvar['trackid'] = '';
	        }
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
teodorpav
Posts: 15
Joined: Fri Nov 08, 2024 1:08 pm

Re: 2 issues with piping

Post by teodorpav »

Sadly it doesn't work.

https://prnt.sc/jt8eH9m2ZJem

Any idea why this happened with some tickets?
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: 2 issues with piping

Post 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?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
teodorpav
Posts: 15
Joined: Fri Nov 08, 2024 1:08 pm

Re: 2 issues with piping

Post 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!
Post Reply