Bug 24163: DBRev 19.12.00.086

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-05-05 11:14:49 +01:00
parent 5eb07b28eb
commit cdf786b0aa
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
3 changed files with 20 additions and 19 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "19.12.00.085";
$VERSION = "19.12.00.086";
sub version {
return $VERSION;

View File

@ -1,18 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
INSERT IGNORE INTO export_format( profile, description, content, csv_separator, type, used_for ) VALUES
("Late orders (CSV profile)", "Default CSV export for late orders", 'Title[% separator %]Author[% separator %]Publication year[% separator %]ISBN[% separator %]Quantity[% separator %]Number of claims
[% FOR order IN orders ~%]
[%~ SET biblio = order.biblio ~%]
"[% biblio.title %]"[% separator ~%]
"[% biblio.author %]"[% separator ~%]
"[% bibio.biblioitem.publicationyear %]"[% separator ~%]
"[% biblio.biblioitem.isbn %]"[% separator ~%]
"[% order.quantity%]"[% separator ~%]
"[% order.claims.count%][% IF order.claims.count %]([% FOR c IN order.claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %])[% END %]"
[% END %]', ",", "sql", "late_orders")
});
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 24163 - Define a default CSV profile for late orders)\n";
}

View File

@ -22028,6 +22028,25 @@ if( CheckVersion( $DBversion ) ) {
NewVersion( $DBversion, 24161, "Add new join table aqorders_claims to keep track of claims");
}
$DBversion = '19.12.00.086';
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
INSERT IGNORE INTO export_format( profile, description, content, csv_separator, type, used_for ) VALUES
("Late orders (CSV profile)", "Default CSV export for late orders", 'Title[% separator %]Author[% separator %]Publication year[% separator %]ISBN[% separator %]Quantity[% separator %]Number of claims
[% FOR order IN orders ~%]
[%~ SET biblio = order.biblio ~%]
"[% biblio.title %]"[% separator ~%]
"[% biblio.author %]"[% separator ~%]
"[% bibio.biblioitem.publicationyear %]"[% separator ~%]
"[% biblio.biblioitem.isbn %]"[% separator ~%]
"[% order.quantity%]"[% separator ~%]
"[% order.claims.count%][% IF order.claims.count %]([% FOR c IN order.claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %])[% END %]"
[% END %]', ",", "sql", "late_orders")
});
NewVersion( $DBversion, 24163, "Define a default CSV profile for late orders");
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';