Bugzilla – Attachment 61095 Details for
Bug 18264
Course reserves - use itemnumber for editing existing reserve items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18264 - Course reserves - use itemnumber for editing existing reserve items
Bug-18264---Course-reserves---use-itemnumber-for-e.patch (text/plain), 3.70 KB, created by
Marc Véron
on 2017-03-15 10:13:44 UTC
(
hide
)
Description:
Bug 18264 - Course reserves - use itemnumber for editing existing reserve items
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-03-15 10:13:44 UTC
Size:
3.70 KB
patch
obsolete
>From d578218857ce19917e20703085b6a8b115855c16 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 14 Mar 2017 14:16:09 +0000 >Subject: [PATCH] Bug 18264 - Course reserves - use itemnumber for editing > existing reserve items >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch alters the crouse reserves module to use itemnumber as the >lookup method for existing reserves as opposed to barcode > >To test: >1 - Apply patch >2 - Add some items to a course reserves - all should work as expected >3 - Delete the barcode for an item on reserve >4 - Note the edit link still resolves to the correct item > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > course_reserves/add_items.pl | 16 +++++++++------- > .../prog/en/modules/course_reserves/course-details.tt | 2 +- > 2 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl >index bcfadc7..ef8605f 100755 >--- a/course_reserves/add_items.pl >+++ b/course_reserves/add_items.pl >@@ -31,12 +31,13 @@ use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem > > my $cgi = new CGI; > >-my $action = $cgi->param('action') || ''; >-my $course_id = $cgi->param('course_id') || ''; >-my $barcode = $cgi->param('barcode') || ''; >-my $return = $cgi->param('return') || ''; >+my $action = $cgi->param('action') || ''; >+my $course_id = $cgi->param('course_id') || ''; >+my $barcode = $cgi->param('barcode') || ''; >+my $return = $cgi->param('return') || ''; >+my $itemnumber = ($cgi->param('itemnumber') && $action eq 'lookup') ? $cgi->param('itemnumber') : ''; > >-my $item = GetBiblioFromItemNumber( undef, $barcode ); >+my $item = GetBiblioFromItemNumber( $itemnumber, $barcode ); > > my $step = ( $action eq 'lookup' && $item ) ? '2' : '1'; > >@@ -49,8 +50,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > flagsrequired => { coursereserves => 'add_reserves' }, > } > ); >-$template->param( ERROR_BARCODE_NOT_FOUND => $barcode ) >- unless ( $barcode && $item && $action eq 'lookup' ); >+my $inumber = $itemnumber ? "<blank> (itemnumber:$itemnumber)" : ""; >+$template->param( ERROR_BARCODE_NOT_FOUND => $barcode . $inumber ) >+ unless ( $barcode && !$itemnumber && $item && $action eq 'lookup' ); > > $template->param( course => GetCourse($course_id) ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index 9360706..7ab27d8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -202,7 +202,7 @@ > [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %] > <td class="actions"> > [% IF CAN_user_coursereserves_add_reserves %] >- <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id %]&barcode=[% cr.item.barcode %]&action=lookup&return=[% course.course_id %]"><i class="fa fa-pencil"></i> Edit</a> >+ <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id %]&itemnumber=[% cr.item.itemnumber %]&action=lookup&return=[% course.course_id %]"><i class="fa fa-pencil"></i> Edit</a> > [% END %] > > [% IF CAN_user_coursereserves_delete_reserves %] >-- >2.1.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 18264
:
61067
|
61095
|
61272
|
61299
|
61304
|
61305