Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2009

Custom Reports with 'Select' field options duplicate

    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

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        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.
        tyson Tyson Phillips (Inactive) made changes -
        Link This issue relates to CORE-2099 [ CORE-2099 ]
        tyson Tyson Phillips (Inactive) made changes -
        Link This issue relates to CORE-2098 [ CORE-2098 ]
        tyson Tyson Phillips (Inactive) made changes -
        Link This issue relates to CORE-2099 [ CORE-2099 ]
        tyson Tyson Phillips (Inactive) made changes -
        Link This issue relates to CORE-2098 [ CORE-2098 ]
        Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #129 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        Automated transition triggered when Cody Phillips (Inactive) merged pull request #129 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            cody Cody Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Sep/16