Page 1 of 1
Search Function in Admin Panel no longer working properly
Posted: Wed Jul 04, 2012 3:42 pm
by mkoch227
Script URL:
http://servicedesk.kandbconsult.com (localhost)
Version of script: 2.3
Hosting company: Bluehost
URL of phpinfo.php:
http://kandbconsult.com/phpinfo.php
URL of session_test.php: N/A
What terms did you try when SEARCHING for a solution: search admin not working
Write your message below:
After adding a few custom statuses of my own, the search tickets function in the Admin Panel is no longer working properly. If one of our custom statuses is checked off, resolved tickets show. If resolved is checked off, the the custom status (which causes them to show) is off, resolved tickets do
not show. How can I fix this issue?
Re: Search Function in Admin Panel no longer working properl
Posted: Wed Jul 04, 2012 3:51 pm
by steve
That sounds like a needle in a haystack to me.
I would go back and undo whatever edit you made. Then reedit one by one so if there is an issue you will know where to start looking.
Re: Search Function in Admin Panel no longer working properl
Posted: Wed Jul 04, 2012 3:59 pm
by mkoch227
I threw out my current show_search_form.inc.php file and re-added the default one from the HESK site. Upon adding back in my statuses, I realized that one of the status options was causing the entire search function to restart. Here's the table line for that one:
Code: Select all
<td width="33%"><label><input type="checkbox" name="s7" value="1" <?php if (isset($status[7])) {echo 'checked="checked"';} ?> /> <span class="pend_kb"><?php echo $hesklang['pend_kb']; ?></span></td>
If i change "s7" to "s8", the Resolved tickets no longer show, but it still causes all the checkboxes to reset. Any clue why as to why this is?
--EDIT: I also just realized that unchecking "New" also unchecks the problem one I have. Any knowledge as to why?
Re: Search Function in Admin Panel no longer working properl
Posted: Wed Jul 04, 2012 4:09 pm
by steve
Im not sure why the resolved tickets are not showing, I tried to replicate the issue using your code, I was unable to replicate.
The check boxes will reset if they are not set to your default view.
Re: Search Function in Admin Panel no longer working properl
Posted: Wed Jul 04, 2012 9:35 pm
by mkoch227
The Resolved tickets DO show when Resolved is checked. However, if I only choose the one specific option (the one in the code field in my previous post), the settings go back to default, and not the one specific option.
Re: Search Function in Admin Panel no longer working properl
Posted: Wed Jul 04, 2012 9:54 pm
by steve
Sorry, I misunderstood you.
I think the information you are looking for can he found in
this thread.
EDIT: Actually, now that I think about it, that is not at all what you were looking for! Sorry!
Re: Search Function in Admin Panel no longer working properl
Posted: Wed Jul 04, 2012 11:45 pm
by mkoch227
steve: I just sent you a PM a few minutes ago. Please check it
Re: Search Function in Admin Panel no longer working properl
Posted: Thu Jul 05, 2012 6:11 pm
by steve
The solution:
Open hsk/inc/print_tickets.inc.php
change
Code: Select all
if ($tmp == 0 || ($tmp == 6 && !isset($status[3])) )
to
Code: Select all
if ($tmp == 0 || ($tmp == 7 && !isset($status[3])) )
Also make sure servicedesk/inc/show_search_form.inc.php has the following for the show tickets checkbox table
Code: Select all
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="34%"><label><input type="checkbox" name="s0" value="1" <?php if (isset($status[0])) {echo 'checked="checked"';} ?> /> <span class="open"><?php echo $hesklang['open']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="s2" value="1" <?php if (isset($status[2])) {echo 'checked="checked"';} ?> /> <span class="replied"><?php echo $hesklang['replied']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="s4" value="1" <?php if (isset($status[4])) {echo 'checked="checked"';} ?> /> <span class="inprogress"><?php echo $hesklang['in_progress']; ?></span></label></td>
</tr>
<tr>
<td width="34%"><label><input type="checkbox" name="s1" value="1" <?php if (isset($status[1])) {echo 'checked="checked"';} ?> /> <span class="waitingreply"><?php echo $hesklang['wait_reply']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="s3" value="1" <?php if (isset($status[3])) {echo 'checked="checked"';} ?> /> <span class="resolved"><?php echo $hesklang['closed']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="s5" value="1" <?php if (isset($status[5])) {echo 'checked="checked"';} ?> /> <span class="onhold"><?php echo $hesklang['on_hold']; ?></span></td>
</tr>
<tr>
<td width="34%"><label><input type="checkbox" name="s6" value="1" <?php if (isset($status[6])) {echo 'checked="checked"';} ?> /> <span class="appt_sch"><?php echo $hesklang['appt_sch']; ?></span></td>
<td width="33%"><label><input type="checkbox" name="s7" value="1" <?php if (isset($status[7])) {echo 'checked="checked"';} ?> /> <span class="pend_kb"><?php echo $hesklang['pend_kb']; ?></span></td>
</table>
Re: Search Function in Admin Panel no longer working properl
Posted: Wed Aug 01, 2012 2:52 pm
by mkoch227
Please also note that you also have to change the following line:
to 1 more than the number here
Code: Select all
if ($tmp == 0 || ($tmp == 6 && !isset($status[3])) )
so in this case, it would be