Description
Owen Leonard
2011-07-18 19:36:29 UTC
Created attachment 4665 [details] [review] Proposed fix To test, choose a MEDIUMTEXT column like borrowers.surname in Step 3 of adding a new dictionary definition. Before the patch, in Step 4 you would not see any kind of form field for entering a comparison. After patching Step 4 will offer you a field labeled "Search string matches." The problem here is that this patch generates something like this: AND borrowers.surname='en%' If you enter a string with a wildcard - shouldn't the text strings be LIKE instead of equals? This patch works in that it creates the rule, but I can't test the rule cause of the bug I reported that definitions aren't used in guided reports. This patch doesn't attempt to change anything about how SQL is generated. The patch only allows that text field to show up when it is required (in cases where the table column is TEXT or MEDIUMTEXT). Then it's only part of a fix ... or we need a note on the page that says not to enter wildcards and only enter exact matches. My patch is a whole fix for the problem I identified in this bug. Created attachment 4996 [details] [review] [SIGNED-OFF] Fix for Bug 6602 - Reports dictionary doesn't properly recognize text columns Reports dictionary won't let you set a comparison for MEDIUMTEXT columns. To test, choose a MEDIUMTEXT column like borrowers.surname in Step 3 of adding a new dictionary definition. Before the patch, in Step 4 you would not see any kind of form field for entering a comparison. After patching Step 4 will offer you a field labeled "Search string matches." Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixes described problem with mediumtext columns. Created attachment 4997 [details] [review] [SIGNED-OFF] Fix for Bug 6602 - Reports dictionary doesn't properly recognize text columns Reports dictionary won't let you set a comparison for MEDIUMTEXT columns. To test, choose a MEDIUMTEXT column like borrowers.surname in Step 3 of adding a new dictionary definition. Before the patch, in Step 4 you would not see any kind of form field for entering a comparison. After patching Step 4 will offer you a field labeled "Search string matches." Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixes described problem with mediumtext columns. Signed-off, because the problem described in this bug is solved by Owen's patch. I filed bug 6719 for a problem I noticed with varchar(255). I think the reports dictionary in general needs some work. *** Bug 5148 has been marked as a duplicate of this bug. *** Pushed, please test The fix for this bug was published in the 3.4.5 release. If you were the reporter of this bug, please take time to verify the fix and update the status of this bug report accordingly. If the bug is fixed to your satisfaction, please close this report. This bug was reintroduced by the fix for Bug 7993 (I presume unintentionally). Created attachment 13569 [details] [review] Bug 6602 - Reports dictionary doesn't properly recognize text columns Reports dictionary won't let you set a comparison for MEDIUMTEXT columns. To test, choose a MEDIUMTEXT column like borrowers.surname in Step 3 of adding a new dictionary definition. Before the patch, in Step 4 you would not see any kind of form field for entering a comparison. After patching Step 4 will offer you a field labeled "Search string matches." Created attachment 13698 [details] [review] [Signed off] Bug 6602 - Reports dictionary doesn't properly recognize text columns Reports dictionary won't let you set a comparison for MEDIUMTEXT columns. To test, choose a MEDIUMTEXT column like borrowers.surname in Step 3 of adding a new dictionary definition. Before the patch, in Step 4 you would not see any kind of form field for entering a comparison. After patching Step 4 will offer you a field labeled "Search string matches." Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com> I had to add a patch complexity to sign this off. Hopefully "small patch" is ok, but if not, someone please change it! Created attachment 13798 [details] [review] [SIGNED-OFF] Bug 6602 - Reports dictionary doesn't properly recognize text columns Reports dictionary won't let you set a comparison for MEDIUMTEXT columns. To test, choose a MEDIUMTEXT column like borrowers.surname in Step 3 of adding a new dictionary definition. Before the patch, in Step 4 you would not see any kind of form field for entering a comparison. After patching Step 4 will offer you a field labeled "Search string matches." Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and perlcritic pass. Test plan: 1) Reports > Reports dictionary > New definition 2) Step 1: Some name 3) Step 2: Patrons 4) Step 3: First name (mediumtext) 5) Step 4: Verify 'Search string matches' is offered. For both, surname (mediumtext) and first name (text) the program should offer you "Search string matches" on step 4. This patch has been pushed to master. Pushed to 3.10.x, will be in 3.10.1 |