Hi
I have a problem which is in atkmanytoonerelation (atk 6.4.3) as follows -
In my customers table a custid field value is "10" (varchar) and the corresponding billname field value is "FORDE SHEARING LTD" (varchar)
The descriptor for the customer table is "[custid] - [billname]"
On the Admin screen the atkmanytoone relation dropdown for fkcustomer works fine and I can select "10 - FORDE SHEARING LTD"
However when I click on SEARCH button I get
No results found for the current search query.I traced this problem to function function
Code:
getConcatFilter($searchValue,$fieldaliasprefix="")
The $searchcondition returned from this function for this data is -
UPPER(REPLACE ( CONCAT_WS('', fkcustomer.custid,fkcustomer.billname), ' ', '') ) LIKE UPPER('%10FORDE SHEARING LTD%')
and of course the UPPER/REPACE/CONCAT_WS sequence evaluated to "10FORDESHEARINGLTD" without spaces !
Therefore NO match
So in the code
Code:
2317 foreach ($concatSeparators as $separator)
2318 {
2319 $value = str_replace($separator, "", $value);
2320 }
2321
2322 $db = $this->getDb();
after line 2320 I inserted
Code:
$value = str_replace(" ", "", $value);
to strip the spaces from the value being search for
All now works !!
Am I making the a good fix ?
If so how do I submit as a patch ?
Thanks
Wayne