Bugzilla – Attachment 42923 Details for
Bug 7677
Subscriptions: Ability to define default itemtype and automatically change itemtype of older issues on receive of next issue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
BZ7677 [Follow-up]: New areas in subscriptions and new functions when receiving.
BZ7677-Follow-up-New-areas-in-subscriptions-and-ne.patch (text/plain), 5.35 KB, created by
Matthias Meusburger
on 2015-09-28 14:30:52 UTC
(
hide
)
Description:
BZ7677 [Follow-up]: New areas in subscriptions and new functions when receiving.
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2015-09-28 14:30:52 UTC
Size:
5.35 KB
patch
obsolete
>From 2d2cd6ed284e0081880312a8ce56e5426af5bbd7 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Mon, 28 Sep 2015 16:29:16 +0200 >Subject: [PATCH] BZ7677 [Follow-up]: New areas in subscriptions and new > functions when receiving. > > - Various fixes. >--- > C4/Items.pm | 4 ++++ > installer/data/mysql/updatedatabase.pl | 2 +- > .../prog/en/modules/admin/preferences/serials.pref | 2 +- > .../intranet-tmpl/prog/en/modules/serials/subscription-add.tt | 2 +- > serials/serials-edit.pl | 8 +------- > 5 files changed, 8 insertions(+), 10 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index fe6905c..a9a2c02 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -3031,6 +3031,10 @@ sub PrepareItemrecordDisplay { > push @authorised_values, $itemtype; > $authorised_lib{$itemtype} = $description; > } >+ if ($defaultvalues && $defaultvalues->{'itemtype'}) { >+ $defaultvalue = $defaultvalues->{'itemtype'}; >+ } >+ > #---- class_sources > } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) { > push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 199b81f..717ee3f 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -10893,7 +10893,7 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > ADD `previousitemtype` VARCHAR( 10 ) NULL AFTER itemtype > }); > $dbh->do( >- "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('makePreviousSerialAvailable','0','make previous serial automatically available when collecting a new serial. Please note that the item-level_itypes syspref must be set to specific item.','','YesNo');" >+ "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('makePreviousSerialAvailable','0','make previous serial automatically available when receiving a new serial issue. The previous issue can also be set to another item type when receiving a new one. Please note that the item-level_itypes syspref must be set to specific item.','','YesNo');" > ); > print "Upgrade to $DBversion done (Bug 7677: Adds fields to subscription table and makePreviousSerialAvailable syspref)\n"; > SetVersion($DBversion); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >index f68df59..76c89a8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >@@ -55,4 +55,4 @@ Serials: > choices: > yes: Make > no: Do not make >- - previous serial automatically available when collecting a new serial. Please note that the item-level_itypes syspref must be set to specific item. >+ - previous serial automatically available when receiving a new serial issue. The previous issue can also be set to another item type when receiving a new one. Please note that the item-level_itypes syspref must be set to specific item. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index afb88d1..6d03543 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -620,7 +620,7 @@ $(document).ready(function() { > </li> > [%IF makePreviousSerialAvailable %] > <li> >- <label for="previousitemtype">Previous item type:</label> >+ <label for="previousitemtype">item type for older issues:</label> > <select name="previousitemtype" id="previousitemtype"> > <option value=""></option> > [% FOREACH previous IN previoustypeloop %] >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 4683f74..cbd86cc 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -251,13 +251,7 @@ if ( $op and $op eq 'serialchangestatus' ) { > my $previous = GetPreviousSerialid($subscriptionids[$i]); > if ($previous) { > >- # Getting the itemnumber matching the serialid >- my $query = "SELECT itemnumber FROM serialitems WHERE serialid=?"; >- my $sth = $dbh->prepare($query); >- $sth->execute($previous); >- my @row = $sth->fetchrow_array; >- if ($row[0]) { >- my $itemnumber = $row[0]; >+ if (my $itemnumber = GetItemnumberFromSerialId($previous)) { > > # Getting the itemtype to set from the database > my $subscriptioninfos = GetSubscription($subscriptionids[$i]); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7677
:
16339
|
16425
|
16456
|
20537
|
20538
|
24099
|
24635
|
25980
|
25981
|
25983
|
27774
|
28950
|
28951
|
28952
|
28953
|
29570
|
29571
|
29572
|
34220
|
34221
|
34222
|
34223
|
34665
|
36389
|
36446
|
36448
|
36449
|
36450
|
36451
|
36452
|
36453
|
36679
|
36680
|
36681
|
36682
|
36683
|
42923
|
42924
|
45938
|
45939
|
45940
|
45941
|
45942
|
45943
|
46216
|
47475
|
52010
|
54876
|
55000
|
55323
|
55466
|
55467
|
55468
|
55469
|
55470
|
55471
|
55472
|
55473
|
55474
|
55475