Bug 33039: Add ability to specify a template for serial subscription "Published on...
authorKyle Hall <kyle@bywatersolutions.com>
Wed, 22 Feb 2023 12:03:39 +0000 (07:03 -0500)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 14 Jul 2023 11:59:43 +0000 (08:59 -0300)
commitcc478eaaa9a7b6322dbd37daf6e96fe196701be9
treebb1e122df5b9de087f2e46c1e0b678b7e26a0456
parent930eb65c94342ae0f1a2bd993acaefcff8564e18
Bug 33039: Add ability to specify a template for serial subscription "Published on (text)" field

Some libraries would like to have the text version of the serials
"published on" field auto-generated from a template. This template
should be definable at the subscription level.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Create or edit a new subscription
5) Edit the "Publication date template", create a template toolkit
   template.
   Keys available are the Koha::Subscription object as 'subscription'
   and the following serial table columns as keys:
    serialseq
    serialseq_x
    serialseq_y
    serialseq_z
    subscriptionid
    biblionumber
    status
    planneddate
    publisheddate
    publisheddateext
    notes
    routingnotes
   So your example template could be "[% subscription.subscriptionid %] [% biblionumber %]"
6) Generate the next serial
7) Note the next issue has a "Date published (text)" field based on the
   template you set!

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Serials.pm
installer/data/mysql/atomicupdate/bug_33039.pl [new file with mode: 0755]
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
serials/subscription-add.pl
t/db_dependent/Koha/Items.t