[Koha-bugs] [Bug 11603] Gather print notices: add csv and ods export

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 11 12:06:49 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11603

--- Comment #63 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 39034
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39034&action=edit
Bug 11603: Gather print notices - add a csv parameter

This patch adds:
- the ability to generate a csv file instead of a html file.
- a letter_code parameter.

>From now you are able to generate a csv file for print notices.

Imagine a template notice defined as:
cardnumber:patron:email:item
<<borrowers.cardnumber>>:<<borrowers.firstname>>
<borrowers.surname>>:<<borrowers.email>>:<<items.barcode>>

You would like to generate a csv file and not a html file.

Test plan:
- define your ODUE notice for the print template as:

cardnumber:patron:email:item
<<borrowers.cardnumber>>:<<borrowers.firstname>>
<<borrowers.surname>>:<<borrowers.email>>:<item><<items.barcode>></item>

- define overdues rules for a patron category
- check 2 items out using a due date in order to generate the overdue
  notices
- check these 2 items in
- launch the overdue_notices script
- the message_queue table should now contain 2 new entries
- launch the gather_print_notices cronjob with the following parameters:
 perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv
 --letter_code=OVERDUE --letter_code=CHECKIN
you should get an error

 perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv
you should get an error

 perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv
 --letter_code=OVERDUE -d=:
 will produce 1 csv file in your /tmp/test directory
- verify the csv file is correct and contain only 1 csv header column.

Signed-off-by: Frederic Demians <f.demians at tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer at bsz-bw.de>
QA note: Keep in mind that you can use all placeholders for the
csv that you can use for the normal templates. If you normally
get the item information from <item></item> you need to use that.
If you can use <<item.barcode>> directly, you can also do so
in the csv.

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


More information about the Koha-bugs mailing list