[Koha-bugs] [Bug 24163] Ability to define a CSV profile for late orders export

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 9 17:47:07 CET 2020


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

--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 97120
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97120&action=edit
Bug 24163: Allow to define CSV profile for late orders export

This new enhancement adds the ability to create a CSV profile for the late
orders export.
Prior to this, the CSV profile was hardcoded in a template and not
editable (unless you modify the .tt file of course).

The main difficulty of the request was to make the multiple claims dates
accessible from the CSV profile. So far we only accept columns from the
database. However we would like to use the Koha::Acquisition::Order
object to make things easier (it had a ->claims method to access the
different claims).
To acchieve this, we are going to accept the TT syntax for that CSV profile.
It means that only CSV profiles created for 'late_orders' will have the
capability to use the TT syntax (can be extended later of course if
needed).
The alternative was to use specific placeholders, like %claims_count%,
%claimed_date%, but it sounded more powerful and flexible to allow the
TT syntax instead.

Note that the former export (template based) still exists and is the
default option.

Test plan:
0. Apply the patches and execute the update database entry
1. Create some orders, close the basket
2. Claim some of the orders
3. Note the new button at the bottom of the table that have several
entries.
=> The first entry will generate a CSV file using the previous method
=> The second entry will generate it using the new CSV profile, note
that the number of claims as well as the different claims date are
displayed.

4. Bonus point: Edit the CSV profile (Home › Tools › CSV export
profiles) that is named "Late orders (csv profile)", or create a new
one, and modify it.
Export the late orders using this CSV profile and confirm that the
generated CSV file is the one you expect.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list