[Bug 13881] New: Add desk management
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Bug ID: 13881 Summary: Add desk management Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: nicolas.legrand@bulac.fr QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com A Library may have multiple desks inside its public space. If desks are defined in Koha, a librarion in public space should set her desk when opening her session as she should set her library. When items are checked-in and trigger a hold, the hold may be attachable to a desk and the patron may be advertised where she can retreive her hold. This may also be usefull when items come from closed stacked. Some may be kept as hold behind the everyday items issue desk, some may be behind the rare books section desks. Such a module was developped by Progilone for the BULAC Koha 3.2, check: <https://github.com/BULAC/koha/blob/bulac-dead_end-3.02.04/C4/Stack/Desk.pm>. The BULAC is going to port it to current master, with a more Kohaish style and comments. The circulation logic will be a bit different from those sources, as the BULAC plans to use Holds for books coming from closed stacked and dumps its overkill stack request module. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored CC| |nicolas.legrand@bulac.fr -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #1 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 37808 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37808&action=edit Add desk management Test plan : 1/ perl installer/data/mysql/updatedatabase.pl (create new table desks) 2/ prove t/db_dependent/Desks.t 3/ go to admin page, click on desk management, try to create, modify and delete desks -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Hi, can this be tested? Comments: 1) Can this be defined into Koha namespace? 2) You could use GetBranchesLoop to get an ordered (by branchname) list of branches 3) Many backticks (`) (Coding guidelines SQL6: Backticks Don't use ` in table or column names (this is a mySQLism)) 4) I think we can't use smartmatch (~~). In test "ok($deskcode ~~ @$desks, 'GetDesks returns desk codes');" Look at http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11468#c6 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #3 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Hey, thanks a lot for your comments. (In reply to Bernardo Gonzalez Kriegel from comment #2)
Hi, can this be tested?
It's not really functionnal yet, It'll be soon I hope, next week at least :).
Comments: 1) Can this be defined into Koha namespace?
I'm not sure about it. I'm mostly unaware of namespace policy, I thought this kind of code was for C4. Where can I find policy for namespaces ?
2) You could use GetBranchesLoop to get an ordered (by branchname) list of branches
Ho, thanks, I missed the note in the doc and didn't catch the function cause it's not documented.
3) Many backticks (`) (Coding guidelines SQL6: Backticks Don't use ` in table or column names (this is a mySQLism))
argh, ok, thanks.
4) I think we can't use smartmatch (~~). In test "ok($deskcode ~~ @$desks, 'GetDesks returns desk codes');" Look at http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11468#c6
Thanks again. I'll try to fix those soon. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #4 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 39837 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39837&action=edit Bug 13881: Select desk in an intranet session the selected Desk appears in the header. The desk can be selecting in the menu beside username, branchname. Test plan : 1/ Go to the intranet administration, remove all desks if you have any. The desks should not appear in the header. 2/ add some desks in administration, without selecting some. The message « NO DESK SET » should appear at the left of the branchname. 3/ set a desk for your session. The desk deskcode should appear beside the branchname. 4/ change desk, the new name should appear also. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #5 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 40186 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40186&action=edit Bug 13881: attach a reserve to a desk In the intranet, if desks are defined, a librarian can set her desk as she sets her branch. If the desk is set, and she checks in an items on which a patron made a hold, the desk deskcode is attached to the reserve and can be viewed in the Holds awaiting pickup circulation report. Test plan: Set a desk, put a book on hold, check it in, confirm hold, it should appear in the "holds awaiting pickup" circulation page, it should appear as waiting at the desk on the patron's session. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #6 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- It seems to do now what we mostly expect from it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40186|0 |1 is obsolete| | --- Comment #7 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 40569 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40569&action=edit Bug 13881: attach a reserve to a desk In the intranet, if desks are defined, a librarian can set her desk as she sets her branch. If the desk is set, and she checks in an items on which a patron made a hold, the desk deskcode is attached to the reserve and can be viewed in the Holds awaiting pickup circulation report. Test plan: Set a desk, put a book on hold, check it in, confirm hold, it should appear in the "holds awaiting pickup" circulation page, it should appear as waiting at the desk on the patron's session. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #8 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 40709 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40709&action=edit Bug 13881: Basic desk management Permits to add desks to Koha in the Admin Basic Parameters. Test plan : 1/ perl installer/data/mysql/updatedatabase.pl (create new table desks) 2/ prove t/db_dependent/Desks.t 3/ go to admin page, click on desk management, try to create, modify and delete desks -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37808|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Nicolas, are the patches in the right order? Could they be squashed? I am not sure how they are divided up and the first seems to refer +use C4::Desks;, which is only added by the third patch. Also, should this be needs sign-off? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nicolas.legrand@bulac.fr |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #10 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 40895 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40895&action=edit Bug 13881: Add desk management Desks can be created for a branch. If a librarian sets a desk in the intranet and check in a document on hold, the document is then attached to a desk. Test plan, basic desk creation/modification/deletion: 1/ perl installer/data/mysql/updatedatabase.pl (create new table desks) 2/ prove t/db_dependent/Desks.t 3/ go to admin page, click on desk management, try to create, modify and delete desks Test plan, setting desk in the intranet: 1/ Go to the intranet administration, remove all desks if you have any. The desks should not appear in the header. 2/ add some desks in administration, without selecting some. The message « NO DESK SET » should appear at the left of the branchname. 3/ set a desk for your session. The desk deskcode should appear beside the branchname. 4/ change desk, the new name should appear also. Test plan, attach holds awaiting pickup to a desk: Set a desk, put a book on hold, check it in, confirm hold, it should appear in the "holds awaiting pickup" circulation page, it should appear as waiting at the desk on the patron's session. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39837|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40569|0 |1 is obsolete| | --- Comment #11 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Comment on attachment 40569 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40569 Bug 13881: attach a reserve to a desk
From 61e00bd675d86d6f3f3f6590c0ad403e19e2a1e0 Mon Sep 17 00:00:00 2001 From: Nicolas Legrand <nicolas.legrand@bulac.fr> Date: Wed, 24 Jun 2015 12:20:27 +0200 Subject: [PATCH] Bug 13881: attach a reserve to a desk
In the intranet, if desks are defined, a librarian can set her desk as she sets her branch. If the desk is set, and she checks in an items on which a patron made a hold, the desk deskcode is attached to the reserve and can be viewed in the Holds awaiting pickup circulation report.
Test plan:
Set a desk, put a book on hold, check it in, confirm hold, it should appear in the "holds awaiting pickup" circulation page, it should appear as waiting at the desk on the patron's session. --- C4/Auth.pm | 32 ++++++++++---------- C4/Reserves.pm | 20 ++++++++++-- circ/returns.pl | 3 +- circ/waitingreserves.pl | 9 ++++++ .../bug_138881_link_desk_to_reserves.sql | 10 ++++++ installer/data/mysql/kohastructure.sql | 6 +++- .../prog/en/modules/circ/waitingreserves.tt | 6 ++++ .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 2 +- opac/opac-user.pl | 7 +++++ 9 files changed, 73 insertions(+), 22 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_138881_link_desk_to_reserves.sql
diff --git a/C4/Auth.pm b/C4/Auth.pm index 5cd5823..2dd92d5 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -392,21 +392,6 @@ sub get_template_and_user { persona => C4::Context->preference("persona"), OPACBaseURL => C4::Context->preference('OPACBaseURL'), ); - if (C4::Context->userenv->{"branch"}) { - my $desksaref = GetDesks(C4::Context->userenv->{"branch"}); - if ($#$desksaref > -1) { - $template->param( - LoginDeskcode => ( C4::Context->userenv ? C4::Context->userenv->{"deskcode"} : undef ), - LoginDeskname => ( C4::Context->userenv ? C4::Context->userenv->{"deskname"} : undef ), - HasDesk => (1), - ); - } - else { - $template->param( - HasDesk => (undef), - ); - } - } if ( $in->{'type'} eq "intranet" ) { $template->param( AmazonCoverImages => C4::Context->preference("AmazonCoverImages"), @@ -441,7 +426,22 @@ sub get_template_and_user { UseKohaPlugins => C4::Context->preference('UseKohaPlugins'), UseCourseReserves => C4::Context->preference("UseCourseReserves"), useDischarge => C4::Context->preference('useDischarge'), - ); + ); + if ( C4::Context->userenv ? C4::Context->userenv->{"branch"} : undef) { + my $desksaref = GetDesks(C4::Context->userenv->{"branch"}); + if ($#$desksaref > -1) { + $template->param( + LoginDeskcode => ( C4::Context->userenv->{"deskcode"} ), + LoginDeskname => ( C4::Context->userenv->{"deskname"} ), + HasDesk => (1), + ); + } + else { + $template->param( + HasDesk => ( undef ), + ); + } + } } else { warn "template type should be OPAC, here it is=[" . $in->{'type'} . "]" unless ( $in->{'type'} eq 'opac' ); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 9c760b6..9a43585 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -843,7 +843,7 @@ sub GetReservesForBranch { my $dbh = C4::Context->dbh;
my $query = " - SELECT reserve_id,borrowernumber,reservedate,itemnumber,waitingdate + SELECT reserve_id,borrowernumber,reservedate,itemnumber,waitingdate, deskcode FROM reserves WHERE priority='0' AND found='W' @@ -1353,7 +1353,7 @@ sub ModReserveStatus {
=head2 ModReserveAffect
- &ModReserveAffect($itemnumber,$borrowernumber,$diffBranchSend); + &ModReserveAffect($itemnumber,$borrowernumber,$diffBranchSend, $deskcode);
This function affect an item and a status for a given reserve The itemnumber parameter is used to find the biblionumber. @@ -1367,7 +1367,7 @@ take care of the waiting status =cut
sub ModReserveAffect { - my ( $itemnumber, $borrowernumber,$transferToDo ) = @_; + my ( $itemnumber, $borrowernumber,$transferToDo, $deskcode ) = @_; my $dbh = C4::Context->dbh;
# we want to attach $itemnumber to $borrowernumber, find the biblionumber @@ -1398,6 +1398,19 @@ sub ModReserveAffect { AND biblionumber = ? "; } + elsif ($deskcode) { + # add deskcode with waiting + $query = " + UPDATE reserves + SET priority = 0, + found = 'W', + waitingdate = NOW(), + deskcode = '$deskcode', + itemnumber = ? + WHERE borrowernumber = ? + AND biblionumber = ? + "; + } else { # affect the reserve to Waiting as well. $query = " @@ -1405,6 +1418,7 @@ sub ModReserveAffect { SET priority = 0, found = 'W', waitingdate = NOW(), + deskcode = NULL, itemnumber = ? WHERE borrowernumber = ? AND biblionumber = ? diff --git a/circ/returns.pl b/circ/returns.pl index 8b70e1a..67864e9 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -144,12 +144,13 @@ if ( $query->param('resbarcode') ) { my $resbarcode = $query->param('resbarcode'); my $diffBranchReturned = $query->param('diffBranch'); my $iteminfo = GetBiblioFromItemNumber($item); + my $deskcode = C4::Context->userenv->{"deskcode"} || undef; # fix up item type for display $iteminfo->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $iteminfo->{'itype'} : $iteminfo->{'itemtype'}; my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef; # diffBranchSend tells ModReserveAffect whether document is expected in this library or not, # i.e., whether to apply waiting status - ModReserveAffect( $item, $borrowernumber, $diffBranchSend); + ModReserveAffect( $item, $borrowernumber, $diffBranchSend, $deskcode); # check if we have other reserves for this document, if we have a return send the message of transfer my ( $messages, $nextreservinfo ) = GetOtherReserves($item);
diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 5471643..0ce4eb3 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -24,6 +24,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output; use C4::Branch; # GetBranchName +use C4::Desks; use C4::Auth; use C4::Dates qw/format_date/; use C4::Circulation; @@ -93,18 +94,26 @@ foreach my $num (@getreserves) { my $itemnumber = $num->{'itemnumber'}; my $gettitle = GetBiblioFromItemNumber( $itemnumber ); my $borrowernum = $num->{'borrowernumber'}; + my $deskcode = $num->{'deskcode'}; + my $desk = GetDesk($deskcode); + my $deskname; + if ($desk) { + $deskname = $desk->{'deskname'}; + } my $holdingbranch = $gettitle->{'holdingbranch'}; my $homebranch = $gettitle->{'homebranch'};
my %getreserv = ( itemnumber => $itemnumber, borrowernum => $borrowernum, + deskname => $deskname, );
# fix up item type for display $gettitle->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $gettitle->{'itype'} : $gettitle->{'itemtype'}; my $getborrower = GetMember(borrowernumber => $num->{'borrowernumber'}); my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); # using the fixed up itype/itemtype + $getreserv{'waitingdate'} = $num->{'waitingdate'}; my ( $waiting_year, $waiting_month, $waiting_day ) = split (/-/, $num->{'waitingdate'}); ( $waiting_year, $waiting_month, $waiting_day ) = diff --git a/installer/data/mysql/atomicupdate/bug_138881_link_desk_to_reserves.sql b/installer/data/mysql/atomicupdate/bug_138881_link_desk_to_reserves.sql new file mode 100644 index 0000000..e412527 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_138881_link_desk_to_reserves.sql @@ -0,0 +1,10 @@ +ALTER TABLE reserves ADD COLUMN deskcode VARCHAR(10) DEFAULT NULL AFTER branchcode + ADD KEY deskcode (deskcode) + ADD CONSTRAINT reserves_ibfk_5 + FOREIGN KEY (deskcode) REFERENCES desks (deskcode) + ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE old_reserves ADD COLUMN deskcode VARCHAR(10) DEFAULT NULL AFTER branchcode + ADD KEY deskcode (deskcode) + ADD CONSTRAINT old_reserves_ibfk_4 + FOREIGN KEY (deskcode) REFERENCES desks (deskcode) + ON DELETE SET NULL ON UPDATE SET NULL; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index d3fca1d..554ca7e 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1676,6 +1676,7 @@ CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b `biblionumber` int(11) default NULL, -- foreign key from the biblio table defining which bib record this hold is on `constrainttype` varchar(1) default NULL, `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at + `deskcode` varchar(10) default NULL, -- foreign key from the desks table defining which desk the patron may pick this hold up from `notificationdate` date default NULL, -- currently unused `reminderdate` date default NULL, -- currently unused `cancellationdate` date default NULL, -- the date this hold was cancelled @@ -1863,6 +1864,7 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha `biblionumber` int(11) NOT NULL default 0, -- foreign key from the biblio table defining which bib record this hold is on `constrainttype` varchar(1) default NULL, `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at + `deskcode` varchar(10) default NULL, -- foreign key from the desks table defining which desk the patron may pick this hold up from `notificationdate` date default NULL, -- currently unused `reminderdate` date default NULL, -- currently unused `cancellationdate` date default NULL, -- the date this hold was cancelled @@ -1882,10 +1884,12 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha KEY `biblionumber` (`biblionumber`), KEY `itemnumber` (`itemnumber`), KEY `branchcode` (`branchcode`), + KEY `deskcode` (`deskcode`), CONSTRAINT `reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`deskcode`) REFERENCES `desks` (`deskcode`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt index 1d5faf4..31294ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt @@ -82,6 +82,9 @@ <th class="anti-the">Title</th> <th>Patron</th> <th>Location</th> + [% IF HasDesk %] + <th>Desk</th> + [% END %] <th>Copy number</th> <th>Enumeration</th> <th>Action</th> @@ -101,6 +104,9 @@ [% reserveloo.borrowermail %]</a>[% END %] </td> <td>[% Branches.GetName( reserveloo.homebranch ) %]<br />[% reserveloo.itemcallnumber %]</td> + [% IF HasDesk %] + <td>[% reserveloo.deskname %]</td> + [% END %] <td>[% reserveloo.copynumber %]</td> <td>[% reserveloo.enumchron %]</td> <td> diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 85c985d..5945492 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -566,7 +566,7 @@ [% IF ( RESERVE.wait ) %] [% IF ( RESERVE.atdestination ) %] [% IF ( RESERVE.found ) %] - Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %] + Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF (RESERVE.wdkname) %], [% RESERVE.wdkname %][% END %][% IF ( RESERVE.waitingdate ) %], since [% RESERVE.waitingdate | $KohaDates %][% END %] <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" /> [% ELSE %] Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b> diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 18dfec6..a8cdd38 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -34,6 +34,7 @@ use C4::Biblio; use C4::Items; use C4::Letters; use C4::Branch; # GetBranches +use C4::Desks; use Koha::DateUtils; use Koha::Borrower::Debarments qw(IsDebarred);
@@ -325,6 +326,12 @@ foreach my $res (@reserves) { $res->{'wbrcode'} = $res->{'branchcode'}; $res->{'itemnumber'} = $res->{'itemnumber'}; $res->{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'}; + if ($res->{'deskcode'}) { + my $desk = GetDesk($res->{'deskcode'}); + if ($desk) { + $res->{'wdkname'} = $desk->{'deskname'}; + } + } if($res->{'holdingbranch'} eq $res->{'wbrcode'}){ $res->{'atdestination'} = 1; } -- 1.7.10.4
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40709|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #12 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- (In reply to Katrin Fischer from comment #9) Hey Katrin,
are the patches in the right order? Could they be squashed? I am not sure how they are divided up and the first seems to refer +use C4::Desks;, which is only added by the third patch.
Yes, I wanted to change the first commit and then it appeared at the end of the list. Anyway, I just squashed them as you suggested.
Also, should this be needs sign-off?
Sadely, there is a bit more work on databases, I'm fighting with constraints, the db updates doesn't work yet. I have been working on something else hoping it will be plain clear next time I look upon it ^^. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40895|0 |1 is obsolete| | --- Comment #13 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 41233 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41233&action=edit Bug 13881: Add desk management Desks can be created for a branch. If a librarian sets a desk in the intranet and check in a document on hold, the document is then attached to a desk. Test plan, basic desk creation/modification/deletion: 1/ perl installer/data/mysql/updatedatabase.pl (create new table desks) 2/ prove t/db_dependent/Desks.t 3/ go to admin page, click on desk management, try to create, modify and delete desks Test plan, setting desk in the intranet: 1/ Go to the intranet administration, remove all desks if you have any. The desks should not appear in the header. 2/ add some desks in administration, without selecting some. The message « NO DESK SET » should appear at the left of the branchname. 3/ set a desk for your session. The desk deskcode should appear beside the branchname. 4/ change desk, the new name should appear also. Test plan, attach holds awaiting pickup to a desk: 1/ Set a desk, put a book on hold, check it in, confirm hold, it should appear in the "holds awaiting pickup" circulation page, it should appear as waiting at the desk on the patron's session. 2/ Suppress desk. The hold is still pending, but desk mentions should have disappear from "holds awaiting pickup" and patron's session. http://bugs.koha-community.org/show_bug.cgi?id=3881 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #14 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Hey Katrin, (In reply to Nicolas Legrand from comment #12)
(In reply to Katrin Fischer from comment #9)
Also, should this be needs sign-off?
Sadely, there is a bit more work on databases, I'm fighting with constraints, the db updates doesn't work yet. I have been working on something else hoping it will be plain clear next time I look upon it ^^.
Done. After trying to understand serials history and serials current management at the BULAC everything seems easy and MySQL errno: 150 due to bad collation matching just plain clear :). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14654 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14654 [Bug 14654] Add desk filter in Holds awaiting pickup list -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41233|0 |1 is obsolete| | --- Comment #15 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 42804 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42804&action=edit Bug 13881: Add desk management Desks can be created for a branch. If a librarian sets a desk in the intranet and check in a document on hold, the document is then attached to a desk. Test plan, basic desk creation/modification/deletion: 1/ perl installer/data/mysql/updatedatabase.pl (create new table desks) 2/ prove t/db_dependent/Desks.t 3/ go to admin page, click on desk management, try to create, modify and delete desks Test plan, setting desk in the intranet: 1/ Go to the intranet administration, remove all desks if you have any. The desks should not appear in the header. 2/ add some desks in administration, without selecting some. The message « NO DESK SET » should appear at the left of the branchname. 3/ set a desk for your session. The desk deskcode should appear beside the branchname. 4/ change desk, the new name should appear also. Test plan, attach holds awaiting pickup to a desk: 1/ Set a desk, put a book on hold, check it in, confirm hold, it should appear in the "holds awaiting pickup" circulation page, it should appear as waiting at the desk on the patron's session. 2/ Suppress desk. The hold is still pending, but desk mentions should have disappear from "holds awaiting pickup" and patron's session. http://bugs.koha-community.org/show_bug.cgi?id=3881 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42804|0 |1 is obsolete| | --- Comment #16 from Marc Véron <veron@veron.ch> --- Created attachment 43664 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43664&action=edit Bug 13881: Add desk management Desks can be created for a branch. If a librarian sets a desk in the intranet and check in a document on hold, the document is then attached to a desk. Test plan, basic desk creation/modification/deletion: 1/ perl installer/data/mysql/updatedatabase.pl (create new table desks) 2/ prove t/db_dependent/Desks.t 3/ go to admin page, click on desk management, try to create, modify and delete desks Test plan, setting desk in the intranet: 1/ Go to the intranet administration, remove all desks if you have any. The desks should not appear in the header. 2/ add some desks in administration, without selecting some. The message « NO DESK SET » should appear at the left of the branchname. 3/ set a desk for your session. The desk deskcode should appear beside the branchname. 4/ change desk, the new name should appear also. Test plan, attach holds awaiting pickup to a desk: 1/ Set a desk, put a book on hold, check it in, confirm hold, it should appear in the "holds awaiting pickup" circulation page, it should appear as waiting at the desk on the patron's session. 2/ Suppress desk. The hold is still pending, but desk mentions should have disappear from "holds awaiting pickup" and patron's session. http://bugs.koha-community.org/show_bug.cgi?id=13881 Fixed conflict in installer/data/mysql/kohastructure.sql Followed testplan, works as advertised. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nicolas, This is the very old fashion way to do. I am rewriting all the admin scripts not make them use Koha::Objects, so I am strongly against pushing this one as it. See bug 10363, bug 14828, bug 14836, bug 14888 and bug 14889 for examples. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13881 --- Comment #18 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- ok, I'll check that, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org