Closed (fixed)
Project:
Support Ticketing System
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2010 at 15:00 UTC
Updated:
13 Oct 2011 at 11:11 UTC
Hey jeremy,
when viewing a ticket list for any given client, the autoassign field did not return any user suggestions when entering text.
After debugging your code I was able to solve it by changing the following:
// File: support.module
// Function: support_page_form()
// Line: around 2550 (within the while loop)
$form['assigned']["assigned-$ticket->nid"] = array(
'#type' => 'textfield',
'#autocomplete_path' => 'support/autocomplete/assigned/'. $ticket->client,
'#default_value' => $assigned,
'#size' => '15',
'#attributes' => array('class' => 'ticket-assigned'),
);
into the following: (changed $ticket->client into $client)
$form['assigned']["assigned-$ticket->nid"] = array(
'#type' => 'textfield',
'#autocomplete_path' => 'support/autocomplete/assigned/'. $client,
'#default_value' => $assigned,
'#size' => '15',
'#attributes' => array('class' => 'ticket-assigned'),
);
I dsm'ed the ticket object, but it never contains a client property. Can you confirm this is a bug (cause after this change everything seems to work as expected)?
Comments
Comment #1
ledom commentedHi,
What about this? I just install last dev version and autocomplete does not seems to work at all, into admin pages (auto-assign, auto-subscribe), support page (list all tickets) or ticket page.
Entering part of a user name does not show user suggestion.
Looking at console show:
GET http://www.mysite.com/support/autocomplete/assigned/1/max
result: [ ]
Comment #2
ledom commentedFirst point: autocomplete does not work on admin page and ticket page
Solved with giving Acces MYCLIENT client permission to role. If a user is
Authenticated user and Role1 role, to give Authenticated user permission to acces client does not allow to get this user into suggestion box. Using Role1 works fine.
Second point: no suggestion on support page (list all tickets)
Solved by modifying following line
'#autocomplete_path' => 'support/autocomplete/assigned/'. $client,else the get request was
GET http://www.mysite.com/support/autocomplete/assigned//max
with double slash and return nothing.
Maybe it would be good to commit this, no?
Comment #3
jeremy commentedSorry for the delay on committing a fix; I didn't understand the original report. I see now that the issue is with the multi-ticket views.
Fixed in 6.x here:
http://drupalcode.org/project/support.git/commit/8635307
Comment #4
jeremy commentedThis is already fixed in the 7.x branch.