Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.6.0
-
Fix Version/s: 4.0.0-b1
-
Component/s: Staff Interface
-
Labels:None
Description
Creating a custom report using a 'Select' field option with a CSV of values leads to unusual behavior and an error.
Consider the following custom report:
SQL:
SELECT * FROM `clients`
INNER JOIN `client_settings`
WHERE `client_settings`.`key` = 'default_currency'
AND `client_settings`.`value` = :currency;
Field:
Label: Currency
Name: currency
Type: Select
Values: GBP,EUR,USD
When selecting to generate a report of this type, the drop-down will show the currencies duplicated. See http://www.blesta.com/forums/index.php?/topic/5676-custom-report-dropdown-bug/
The report will contain no results when there should be matches.
When going back to edit the custom report, the following error will be encountered attempting to populate the "Values" field:
strlen() expects parameter 1 to be string, array given on line 54 in /blesta/helpers/html/html.php
Additionally, the documentation (https://docs.blesta.com/display/user/Generating+Reports) is sparse on details. It would be useful to know whether field replacements should be encapsulated in quotes, or if this happens automatically.
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Creating a custom report using a 'Select' field option with a CSV of values leads to unusual behavior and an error.
Consider the following custom report: SQL: SELECT * FROM `clients` INNER JOIN `client_settings` WHERE `client_settings`.`key` = 'default_currency' AND `client_settings`.`value` = :currency; Field: Label: Currency Name: currency Type: Select Values: GBP,EUR,USD When selecting to generate a report of this type, the drop-down will show the currencies duplicated. See http://www.blesta.com/forums/index.php?/topic/5676-custom-report-dropdown-bug/ When going back to edit the custom report, the following error will be encountered attempting to populate the "Values" field: strlen() expects parameter 1 to be string, array given on line 54 in /blesta/helpers/html/html.php |
Creating a custom report using a 'Select' field option with a CSV of values leads to unusual behavior and an error.
Consider the following custom report: SQL: SELECT * FROM `clients` INNER JOIN `client_settings` WHERE `client_settings`.`key` = 'default_currency' AND `client_settings`.`value` = :currency; Field: Label: Currency Name: currency Type: Select Values: GBP,EUR,USD When selecting to generate a report of this type, the drop-down will show the currencies duplicated. See http://www.blesta.com/forums/index.php?/topic/5676-custom-report-dropdown-bug/ The report will contain no results when there should be matches. When going back to edit the custom report, the following error will be encountered attempting to populate the "Values" field: strlen() expects parameter 1 to be string, array given on line 54 in /blesta/helpers/html/html.php Additionally, the documentation (https://docs.blesta.com/display/user/Generating+Reports) is sparse on details. It would be useful to know whether field replacements should be encapsulated in quotes, or if this happens automatically. |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Status | In Review [ 5 ] | Closed [ 6 ] |
I think the docs are perfectly clear. You do not surround a variable with quotes, just like the example.