mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
Retrofit from trunk
N°1553 - Search: Fix operator on indexed attributes. It was previously always forced to '=', now it's only defaulted to '=' [from revision 5950] SVN:2.5[5955]
This commit is contained in:
@@ -152,7 +152,7 @@ $(function()
|
||||
_initChooseDefaultOperator: function()
|
||||
{
|
||||
//if the class has an index, in order to maximize the performance, we force the default operator to "equal"
|
||||
if (this.options.field.has_index && typeof this.options.available_operators['='] == 'object')
|
||||
if (this.options.field.has_index && typeof this.options.available_operators['='] == 'object' && this.options.values.length == 0)
|
||||
{
|
||||
this.options.operator = '=';
|
||||
this.options.available_operators['='].rank = -1;//we want it to be the first displayed
|
||||
|
||||
Reference in New Issue
Block a user