Bugzilla – Attachment 110291 Details for
Bug 26473
Get items for editing using only itemnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26473: Get items for editing using only itemnumber
Bug-26473-Get-items-for-editing-using-only-itemnum.patch (text/plain), 1.84 KB, created by
Katrin Fischer
on 2020-09-17 19:52:30 UTC
(
hide
)
Description:
Bug 26473: Get items for editing using only itemnumber
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-09-17 19:52:30 UTC
Size:
1.84 KB
patch
obsolete
>From 0cdff0ae76f55f02afcc7ce445e9caea44db1cf5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 16 Sep 2020 15:19:41 +0000 >Subject: [PATCH] Bug 26473: Get items for editing using only itemnumber > >This patch modifies additem.pl so that it can accept an itemnumber as >a single parameter. > >To test, apply the patch edit items on a bibliographic record which has >one or more items. > >- In the location bar, modify the URL so that it uses only the > itemnumber parameter, e.g. > > /cgi-bin/koha/cataloguing/additem.pl?itemnumber=12345 > > The page should load the correct record's items. > >- If you add the "op" parameter it should load the item for editing in > the form: > > /cgi-bin/koha/cataloguing/additem.pl?itemnumber=12345&op=edititem > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > cataloguing/additem.pl | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index a2aea9b6ee..fd9cad5e66 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -396,8 +396,18 @@ sub removeFieldsForPrefill { > > my $input = new CGI; > my $error = $input->param('error'); >-my $biblionumber = $input->param('biblionumber'); >-my $itemnumber = $input->param('itemnumber'); >+ >+my $biblionumber; >+my $itemnumber; >+if( $input->param('itemnumber') && !$input->param('biblionumber') ){ >+ $itemnumber = $input->param('itemnumber'); >+ my $item = Koha::Items->find( $itemnumber ); >+ $biblionumber = $item->biblionumber; >+} else { >+ $biblionumber = $input->param('biblionumber'); >+ $itemnumber = $input->param('itemnumber'); >+} >+ > my $op = $input->param('op') || q{}; > my $hostitemnumber = $input->param('hostitemnumber'); > my $marcflavour = C4::Context->preference("marcflavour"); >-- >2.11.0
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 26473
:
110222
|
110287
| 110291