Bugzilla – Attachment 19339 Details for
Bug 8836
Resurrect Rotating Collections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8836 - Resurrect Rotating Collections - QA Followup 3
Bug-8836---Resurrect-Rotating-Collections---Follow.patch (text/plain), 6.49 KB, created by
Kyle M Hall (khall)
on 2013-07-02 13:09:03 UTC
(
hide
)
Description:
Bug 8836 - Resurrect Rotating Collections - QA Followup 3
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-07-02 13:09:03 UTC
Size:
6.49 KB
patch
obsolete
>From 6dc7a1b8e1827d272e347f9d99e55170691643f7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 2 Jul 2013 07:45:11 -0400 >Subject: [PATCH] Bug 8836 - Resurrect Rotating Collections - Followup 3 > >* Fix bad TT Tag >* Fix bad sql query >* Fix capitalization ( HTML4 ) >* Allow a rotating collection's location to keep AutomaticItemReturn > from sending it back to the branch of origin >--- > C4/Circulation.pm | 31 ++++++++++++++++---- > C4/RotatingCollections.pm | 6 +-- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- > .../rotating_collections/editCollections.tt | 10 ++++-- > 4 files changed, 35 insertions(+), 14 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 30cbe2f..cd589e2 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -42,6 +42,7 @@ use C4::Koha qw( > GetKohaAuthorisedValueLib > ); > use C4::Overdues qw(CalcFine UpdateFine); >+use C4::RotatingCollections qw(GetCollectionItemBranches); > use Algorithm::CheckDigits; > > use Data::Dumper; >@@ -1911,15 +1912,32 @@ sub AddReturn { > logaction("CIRCULATION", "RETURN", $borrowernumber, $item->{'itemnumber'}) > if C4::Context->preference("ReturnLog"); > >- # FIXME: make this comment intelligible. >- #adding message if holdingbranch is non equal a userenv branch to return the document to homebranch >- #we check, if we don't have reserv or transfert for this document, if not, return it to homebranch . >- >- if (($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $hbr) and not $messages->{'WrongTransfer'}){ >+ # IF >+ # a) The item is so far returnable or hasn't been issued >+ # b) There is no hold for this item for pickup at this branch >+ # c) The item's branch is not this branch >+ # c) The should not have been transferred to another branch instead of this one >+ # d) The item is not part of a rotating collection that is currently at this branch >+ # THEN this return should be considered a transfer >+ # >+ # This transfer should be considered valid UNLESS >+ # a) AutomaticItemReturn is enabled >+ # OR >+ # b) There is branch transfer limit that should prevent this item from being transfered to this branch >+ # >+ # If the transfer is not valid, a new transfer back to the item's branch will be created >+ if ( >+ ( $doreturn or $messages->{'NotIssued'} ) >+ and !$resfound >+ and $branch ne $hbr >+ and !$messages->{'WrongTransfer'} >+ and [GetCollectionItemBranches( $item->{'itemnumber'} )]->[1] ne $branch >+ ){ > if ( C4::Context->preference("AutomaticItemReturn" ) or > (C4::Context->preference("UseBranchTransferLimits") and > ! IsBranchTransferAllowed($branch, $hbr, $item->{C4::Context->preference("BranchTransferLimitsType")} ) >- )) { >+ ) >+ ) { > $debug and warn sprintf "about to call ModItemTransfer(%s, %s, %s)", $item->{'itemnumber'},$branch, $hbr; > $debug and warn "item: " . Dumper($item); > ModItemTransfer($item->{'itemnumber'}, $branch, $hbr); >@@ -1928,6 +1946,7 @@ sub AddReturn { > $messages->{'NeedsTransfer'} = 1; # TODO: instead of 1, specify branchcode that the transfer SHOULD go to, $item->{homebranch} > } > } >+ > return ( $doreturn, $messages, $issue, $borrower ); > } > >diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm >index 7c5bb7c..c708a4d 100644 >--- a/C4/RotatingCollections.pm >+++ b/C4/RotatingCollections.pm >@@ -343,8 +343,8 @@ sub AddItemToCollection { > $sth = $dbh->prepare(" > INSERT INTO collections_tracking ( > ctId, >- colId, i >- temnumber >+ colId, >+ itemnumber > ) VALUES ( NULL, ?, ? ) > "); > $sth->execute( $colId, $itemnumber ) or return ( 0, 3, $sth->errstr() ); >@@ -480,8 +480,6 @@ sub GetCollectionItemBranches { > > my $row = $sth->fetchrow_hashref; > >- $sth->finish; >- > return ( $$row{'holdingbranch'}, $$row{'colBranchcode'}, ); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 98d2ae9..44daeb4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -67,7 +67,7 @@ $(document).ready(function () { > [% END %] > > [% IF ( collectionItemNeedsTransferred ) %] >- <div id="rotating-collection" class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div> >+ <div id="rotating-collection" class="dialog message">This item is part of a rotating collection and needs to be transferred to [% collectionBranch %]</div> > [% END %] > > <!-- Patron has fines --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt >index 4917ff2..e1bb2a8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt >@@ -44,13 +44,16 @@ > <div> > [% IF ( collectionsLoop ) %] > <table> >+ <thead> > <tr> > <th>Title</th> > <th>Description</th> > <th>Holding library</th> >- <td></td> >- <td></td> >+ <th> </th> >+ <th> </th> > </tr> >+ <thead> >+ <tbody> > [% FOREACH collectionsLoo IN collectionsLoop %] > <tr> > <td>[% collectionsLoo.colTitle %]</td> >@@ -60,6 +63,7 @@ > <td><a href="editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td> > </tr> > [% END %] >+ </tbody> > </table> > [% ELSE %] > There are no collections currently defined. >@@ -99,7 +103,7 @@ > <label for="description">Description: </label> > </td> > <td> >- [% IF (editColDescription ) %]<input type="text" size="50" name="description" value="[ editColDescription %]" /> >+ [% IF (editColDescription ) %]<input type="text" size="50" name="description" value="[% editColDescription %]" /> > [% ELSE %]<input type="text" size="50" name="description" />[% END %] > </td> > </tr> >-- >1.7.2.5
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 8836
:
12560
|
16746
|
19118
|
19119
|
19337
|
19339
|
21008
|
21009
|
21010
|
21011
|
23966
|
23967
|
23968
|
23969
|
23970
|
23971
|
23976
|
28140
|
28141
|
30838
|
30921
|
31087
|
32361
|
32362
|
32588
|
32589
|
32690
|
32691
|
32693
|
32773
|
32774
|
32973
|
32974
|
32975
|
32976
|
32994
|
32999
|
33000
|
33001
|
33002
|
33045
|
33046
|
33047
|
33048
|
33050
|
33051
|
33058
|
33059
|
33060
|
33061
|
33062
|
33063
|
33064
|
33065
|
33066
|
33068
|
33070
|
33095
|
33096
|
33097
|
33098
|
33099
|
33100
|
33101
|
33102
|
33103
|
33330
|
33331
|
33374