Page 1 of 1
How can I make "Owner" a required field if null on submit?
Posted: Sun Oct 30, 2011 12:53 am
by Lisaweb
On vesion 4.3:
I was getting a lot of email bounce notices from the server from Hesk and realized that many of our users were responding to tickets without assigning an owner, so email notifications are going to no-one. How can I change the submit form so that nothing can be done to the ticket before assigning it an owner?
Thanks for any help!

Re: How can I make "Owner" a required field if null on submi
Posted: Sun Oct 30, 2011 12:29 pm
by Klemen
You weren't getting bounces because no one was assigned - if no one is assigned notifications are sent to all users who have notifications to unassigned tickets enabled. For bounces, you should double-check email addresses of all users.
If bounces happen after staff replies, then the customer's email probably isn't correct. Check bounced messages for delivery errors/details.
Version 2.3, not 4.3, I presume

I would enable auto-assign, that should automatically assign tickets to users.
One way of disabling posting before a ticket is assigned: in admin_ticket.php just after
Code: Select all
$ticket = hesk_dbFetchAssoc($result);
add
Code: Select all
if ( ! $ticket['owner'])
{
$can_reply = 0;
}
But, again, the problem most likely lies elsewhere - with customer emails not being correct.
Re: How can I make "Owner" a required field if null on submi
Posted: Sun Oct 30, 2011 2:16 pm
by Lisaweb
Thanks soo much Klemen! I really like the fix, because it makes the reply box completely dissapear - rather than allowing users to waste time trying to reply only to have it rejected.
Hmm, since I told users to stop replying unless they assign an owner, those email bounces have really decreased to almost nothing. And the server reports that the recipient address is null. But I'll take a look and see what else might be causing it. Here's the type of bounced headers I am receiving:
----------------------------------------------------------------------------------------------------
A message that you sent contained no recipient addresses, and therefore no
delivery could be attempted.
------ This is a copy of your message, including all the headers. ------
To:
Subject: RESPONSE REQUIRED: Ticket assigned to you
From:
noreply@mysupportsite.com
Reply-To:
noreply@mysupportsite.com
Return-Path:
webdept@mysupportsite.com
Content-Type: text/plain; charset=iso-8859-1
Message-Id: <
E1RJofG-0001OB-5W@portal.mysupportsite.com>
Date: Fri, 28 Oct 2011 08:48:14 -0700
----------------------------------------------------------------------------------------------------
Oops on the 4.3, LOL. Guess I think that your software will be successful for a
long ways to come.

Re: How can I make "Owner" a required field if null on submi
Posted: Sun Oct 30, 2011 5:06 pm
by Klemen
Do these bounces by any chance happen when you move an unassigned ticket to a new category?
Re: How can I make "Owner" a required field if null on submi
Posted: Wed Nov 02, 2011 3:47 pm
by Lisaweb
Hi Klemen,
It took me a while to figure it out, but it seems to occur when an assigned ticket gets moved to a category that that same user does not have access to. Oddly, afterwards, in the main ticket list view, the owner field says the ticket is still assigned to that user, but in the actual ticket view it says "unassigned".
Your thoughts?
Re: How can I make "Owner" a required field if null on submi
Posted: Wed Nov 02, 2011 6:43 pm
by Klemen
Yep, thought so, that was a problem found and fixed few weeks ago.
If you didn't modify file "admin/move_category.php" please download 2.3 again and upload just this file. If you did any customizations to this file let me know and I will tell you what code to change.
When I release 2.4 remind me to keep a list of all changes after official release

Re: How can I make "Owner" a required field if null on submi
Posted: Fri Nov 04, 2011 3:11 pm
by Lisaweb
Hi Klemen,
Yes, I have modified that file, so I will definitely take you up on your offer to give me the code.
Thanks much!
Lisa
Re: How can I make "Owner" a required field if null on submi
Posted: Fri Nov 04, 2011 3:25 pm
by Klemen
Find
Code: Select all
if ($autoassign_owner)
{
$ticket['owner'] = $autoassign_owner['id'];
$history .= sprintf($hesklang['thist10'],hesk_date(),$autoassign_owner['name'].' ('.$autoassign_owner['user'].')');
}
and just below add
Find
Code: Select all
/* --> From autoassign? */
if ($need_to_reassign)
and change it to
Code: Select all
/* --> From autoassign? */
if ($need_to_reassign && ! empty($autoassign_owner['email']) )
That should do the trick.
Re: How can I make "Owner" a required field if null on submi
Posted: Tue Nov 08, 2011 2:48 pm
by Lisaweb
Yup, that seems to have fixed it.
Thanks Klemen!
