https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37077

Pedro Amorim <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #167765|0                           |1
        is obsolete|                            |

--- Comment #5 from Pedro Amorim <[email protected]> ---
Created attachment 167785
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167785&action=edit
Bug 37077: Fix report muti select for zero and single selections

This patch updates the javascript overriding the form submission when reports
have multi select parameters.

When there are more than one multi selects, and the user selcts one value from
each, it skips updating the value of the select, so it doens't send duplicate
parameters anymore.

If there are no selections made it will pass '%' for all values. This allows
the multi select to be optional in the report. If no selections are made it is
assumed that you are not using that parameter to limit the report.

Test plan:
1. Go to Reports and create a report from SQL
   select *
   from items
   where
   homebranch in <<Libraries|branches:in>>
   and
   itype in <<Item type|itemtypes:in>>
3. Run the report but pick only 1 library and 1 item type
4. Click the "Show SQL code"
5. Notice that the two parameters were filled correctly
6. Run the report again with zero selections
7. Click the "Show SQL code"
8. Notice that the '%' is used for the parameter
9. Run the report again with combinations of single, multiple and zero
selections
10. confirm the SQL code is generated as you would expect.

Signed-off-by: Pedro Amorim <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to