Issue 11477

Title
is_full_text evaluates undefined variable at SAO
Priority
bug
Status
resolved
Superseder
SAO DomainParser gets caught in infinite loop (issue 11472)
Nosy list
ced, hodeinavarro, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2022-05-11.23:33:44 by hodeinavarro, last changed 5 months ago by roundup-bot.

Messages

New changeset 633dff5a57e5 by Cédric Krier in branch '6.4':
Correctly complete after opening OR-ed parenthesis
https://hg.tryton.org/sao/rev/633dff5a57e5

New changeset c55b81b597f7 by Cédric Krier in branch '6.2':
Correctly complete after opening OR-ed parenthesis
https://hg.tryton.org/sao/rev/c55b81b597f7

New changeset c3988bee232c by Cédric Krier in branch '6.0':
Correctly complete after opening OR-ed parenthesis
https://hg.tryton.org/sao/rev/c3988bee232c

New changeset afc0250b772d by Cédric Krier in branch '5.0':
Correctly complete after opening OR-ed parenthesis
https://hg.tryton.org/sao/rev/afc0250b772d
New changeset ef83fc5b3638 by Cédric Krier in branch 'default':
Correctly complete after opening OR-ed parenthesis
https://hg.tryton.org/tryton-env/rev/ef83fc5b3638
New changeset 30db515c84d6 by Cédric Krier in branch 'default':
Add test for completion after opening OR-ed parenthesis
https://hg.tryton.org/tryton/rev/30db515c84d6
New changeset b4f0e27a3198 by Cédric Krier in branch 'default':
Correctly complete after opening OR-ed parenthesis
https://hg.tryton.org/sao/rev/b4f0e27a3198
Author: [hidden] (hodeinavarro)
Date: 2022-05-11.23:35:20

I miss-typed the correct link for the mentioned test, here is the correct one.
https://hg.tryton.org/sao/file/tip/tests/sao.js#l2185

Author: [hidden] (hodeinavarro)
Date: 2022-05-11.23:33:44

string function receives "AND" or "OR" strings as the domain parameter which is later destructured into clauses, specifically first, second and third index.

"AND" is not giving any errors because the very word is formed by 3 characters, but "OR" throws the error when trying to use is_full_text function

The error is persistent from SAO 5.0 to 6.4 on demos, type in the "FILTERS" text box the following example:
Name: Albright (Code: 1 or "T

TypeError: undefined is not an object (evaluating 'i.charAt')

It could be fixed with a simple filter before mapping the domain, but what caught my eye is that this very scenario (unless I've read wrongly) is tested, but yet not raising.

History
Date User Action Args
2022-06-02 13:43:22roundup-botsetmessages: + msg76924
2022-05-19 21:59:04roundup-botsetmessages: + msg76724
2022-05-19 21:58:56roundup-botsetmessages: + msg76722
2022-05-19 21:58:50roundup-botsetmessages: + msg76720
nosy: + roundup-bot
status: testing -> resolved
2022-05-17 17:46:42reviewbotsetmessages: + msg76703
2022-05-12 01:18:27reviewbotsetmessages: + msg76609
nosy: + reviewbot
2022-05-12 01:15:42cedsetassignedto: ced
keyword: + review
nosy: + ced
reviews: 421151003
status: unread -> testing
superseder: + SAO DomainParser gets caught in infinite loop
2022-05-11 23:35:20hodeinavarrosetmessages: + msg76608
2022-05-11 23:33:44hodeinavarrocreate