Add * automatically to normal queries.
This commit is contained in:
parent
9717296f7d
commit
72d22ad56b
4 changed files with 13 additions and 8 deletions
|
@ -185,6 +185,11 @@ return search result
|
|||
data['query']['bool']['must'] = []
|
||||
end
|
||||
|
||||
# add * on simple query search
|
||||
if query && query =~ /^\w+$/
|
||||
query += '*'
|
||||
end
|
||||
|
||||
# real search condition
|
||||
condition = {
|
||||
'query_string' => {
|
||||
|
|
|
@ -16,7 +16,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
|||
# create new ticket
|
||||
ticket1 = ticket_create(
|
||||
data: {
|
||||
customer: 'nico*',
|
||||
customer: 'nico',
|
||||
group: 'Users',
|
||||
title: 'overview count test #1',
|
||||
body: 'overview count test #1',
|
||||
|
@ -24,7 +24,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
|||
)
|
||||
ticket2 = ticket_create(
|
||||
data: {
|
||||
customer: 'nico*',
|
||||
customer: 'nico',
|
||||
group: 'Users',
|
||||
title: 'overview count test #2',
|
||||
body: 'overview count test #2',
|
||||
|
@ -178,7 +178,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
|||
# create new ticket
|
||||
ticket3 = ticket_create(
|
||||
data: {
|
||||
customer: 'nico*',
|
||||
customer: 'nico',
|
||||
group: 'Users',
|
||||
title: 'overview count test #3',
|
||||
body: 'overview count test #3',
|
||||
|
|
|
@ -52,7 +52,7 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
ticket1 = ticket_create(
|
||||
browser: browser1,
|
||||
data: {
|
||||
customer: 'nico*',
|
||||
customer: 'nico',
|
||||
priority: '1 low',
|
||||
group: 'Users',
|
||||
title: 'overview #1',
|
||||
|
@ -69,7 +69,7 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
ticket2 = ticket_create(
|
||||
browser: browser1,
|
||||
data: {
|
||||
customer: 'nico*',
|
||||
customer: 'nico',
|
||||
priority: '1 low',
|
||||
group: 'Users',
|
||||
title: 'overview #2',
|
||||
|
@ -80,7 +80,7 @@ class AgentTicketOverviewLevel1Test < TestCase
|
|||
ticket3 = ticket_create(
|
||||
browser: browser1,
|
||||
data: {
|
||||
customer: 'nico*',
|
||||
customer: 'nico',
|
||||
priority: '1 low',
|
||||
group: 'Users',
|
||||
title: 'overview #3',
|
||||
|
|
|
@ -1219,7 +1219,7 @@ wait untill text in selector disabppears
|
|||
element.clear
|
||||
|
||||
# workaround, sometimes focus is not triggered
|
||||
element.send_keys(params[:customer] + '*')
|
||||
element.send_keys(params[:customer])
|
||||
sleep 3.5
|
||||
|
||||
# check if pulldown is open, it's not working stable via selenium
|
||||
|
@ -1487,7 +1487,7 @@ wait untill text in selector disabppears
|
|||
element.clear
|
||||
|
||||
# workaround, sometimes focus is not triggered
|
||||
element.send_keys(data[:customer] + '*')
|
||||
element.send_keys(data[:customer])
|
||||
sleep 3.5
|
||||
|
||||
# check if pulldown is open, it's not working stable via selenium
|
||||
|
|
Loading…
Reference in a new issue