PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-28737

Add ability to support a list type parameter in the reports portlet

    Details

    • Similar Issues:
      Show 1 results 

      Description

      Allow the ability to store a parameter value with a comma delimited list when creating a definition in the Reports Portlet.

      1. Create jasper report template with a parameter of type java.util.List
      2. Deploy reports-portlet
      3. Go to Control Panel -> Reports Admin
      4. Go to Sources tab -> Add Source -> fill out the necessary database information, Save
      5. Go to the Definitions tab -> Add Report Definition
      6. Choose the Data Source previously created, upload the template created in Step 1, and fill in the key and comma delimited values for value, Save
      7. Go to the Definitions tab -> click on Actions on the definition you have just created -> Add Report -> Generate
      8. Go to Reports tab -> click on the link (Definition Name) on the report you have just created.
      9. Click on Actions on the file -> Download to view the report.

      A use example would be, for sports we want to be able to receive all the players names for a certain basketball team and active date range.

      • name (List of basketball Teams)
      • startDate (start of the active date)
      • endDate (end of the active date)

      So now the report would be able to retrieve all players for a list of basketball team names with a date range dynamically, whether it be one basketball team name or a list of them.

      And this example is very similar to a report for finance where a non-technical user can enter a name for a finance account and a date range, receive the data from all the finance accounts the user has entered.

      Originally it wasn't possible to put in a list of values so you would have to setup "basketballTeamName1", "basketballTeamName2", ... of definition parameters or generate single separate reports for each basketball team, but now since it's a list, its dynamic. Now it can be "basketballTeamNames" (list type, one or many, comma delimited): we can now generate a report that will return to us all the players in the list of basketball team names, dynamically all in one report.

        Issue Links

          Activity

          Hide
          Randy Zhu added a comment -

          In preparation for Ideation; we are merging New Feature and Improvement tickets into a singular ticket type called “Feature Request”.

          This ticket has been converted to story ticket type for you; so that the ticket may continue to progress through the workflow properly.

          However these tickets were not writing in the proper story format. Please format this ticket to story standards.

          Show
          Randy Zhu added a comment - In preparation for Ideation; we are merging New Feature and Improvement tickets into a singular ticket type called “Feature Request”. This ticket has been converted to story ticket type for you; so that the ticket may continue to progress through the workflow properly. However these tickets were not writing in the proper story format. Please format this ticket to story standards.
          Hide
          Juan Fernández added a comment -

          Code already in master. Ready for PM review

          Show
          Juan Fernández added a comment - Code already in master. Ready for PM review
          Hide
          Kenji Heigel added a comment -

          PASSED Manual Testing following the steps in the description:

          Fixed on:
          Tomcat 7.0.34 + MySQL 5. Portal 6.2.x GIT ID: 6981eaedc35d08ca671491a78afeffe491f72e5d.
          Plugins 6.2.x EE GIT ID: a070848bd667c67b983bb7cb014e231c1aa8bf6c.
          Tomcat 7.0.40 + MySQL 5. Portal 6.1.x EE GIT ID: 3d7aec5848e57cf0513dac19cf092a27867c7224.
          Plugins 6.1.x EE GIT ID: 3501a04efd3277ac4e442ea537bd7f4ef26331d6.

          When using a template that has the list type, the report will generate upon using the list parameter name, no errors will be thrown, and the .csv file will have the value that was searched. Previously, on 6.1.20 EE, a console error will occur and the list will not be generated. Additionally, 6.2.x had to be tested on a commit before the AUI upgrade, as at 6.2.x head testing is blocked by LPS-36727.

          Show
          Kenji Heigel added a comment - PASSED Manual Testing following the steps in the description: Fixed on: Tomcat 7.0.34 + MySQL 5. Portal 6.2.x GIT ID: 6981eaedc35d08ca671491a78afeffe491f72e5d. Plugins 6.2.x EE GIT ID: a070848bd667c67b983bb7cb014e231c1aa8bf6c. Tomcat 7.0.40 + MySQL 5. Portal 6.1.x EE GIT ID: 3d7aec5848e57cf0513dac19cf092a27867c7224. Plugins 6.1.x EE GIT ID: 3501a04efd3277ac4e442ea537bd7f4ef26331d6. When using a template that has the list type, the report will generate upon using the list parameter name, no errors will be thrown, and the .csv file will have the value that was searched. Previously, on 6.1.20 EE, a console error will occur and the list will not be generated. Additionally, 6.2.x had to be tested on a commit before the AUI upgrade, as at 6.2.x head testing is blocked by LPS-36727 .

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Structure Helper Panel