Bugzilla – Attachment 44937 Details for
Bug 14895
We shouldn't be able to edit already added serials' items from serial receive/edit page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14895: Removes the ability to edit already added item's info from serials-edit.pl page
Bug-14895-Removes-the-ability-to-edit-already-adde.patch (text/plain), 4.36 KB, created by
Liz Rea
on 2015-11-18 00:50:31 UTC
(
hide
)
Description:
Bug 14895: Removes the ability to edit already added item's info from serials-edit.pl page
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2015-11-18 00:50:31 UTC
Size:
4.36 KB
patch
obsolete
>From 359ae6ca5566049fc486e86426b71b9df056d843 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <j.kylmala@gmail.com> >Date: Fri, 25 Sep 2015 08:08:55 +0000 >Subject: [PATCH] Bug 14895: Removes the ability to edit already added item's > info from serials-edit.pl page > >Test plan: > >1. In serials create a new subscription with the option "create an item record when receiving this serial" selected. You can choose the other properties. >2. Find the newly created serial subscription by using the top bar's search. >3. Click from the 'Actions' drop-down menu 'Serial receive'. >4. Change the status to 'Arrived'. Add something to the barcode field. Save. >4.1 (Optional step) Open a new tab in your browser and go see that there is in the catalogue the item you just added and it has a barcode. >5. Now you should have arrived to the page serials-collection.pl. Here, select the very same serial item you just edited and click 'Edit serials' >6. Now click just save button without doing any changes. >7. Go to find that item from the biblio record. Notice its barcode is missing now. >8. Apply the patch >9. Put there some barcode to the item manually. >9. Go back to the serials-collection.pl page and select the item and click > 'Edit serials'. >10. Click save on the edit-serials.pl page without changing any information. >11. Go and check that the item has still its barcode. >12. Find out if this patch's changes to edit-serials.pl has caused some > problems in other parts of the system. > >Signed-off-by: Liz Rea <liz@catalyst.net.nz> >--- > .../intranet-tmpl/prog/en/modules/serials/serials-edit.tt | 13 +++++++++---- > serials/serials-edit.pl | 3 +++ > 2 files changed, 12 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 8a4081a..b426cbc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -219,8 +219,11 @@ $(document).ready(function() { > </tr> > [% UNLESS ( serialslis.subscriptionexpired ) %] > [% IF ( serialslis.serialsadditems ) %] >- <tr> >- <td colspan="6"> >+ <tr> >+ [% FOREACH item IN serialslis.items %] >+ [% IF ( item.itemid.substr(0,1) == "N" ) %] >+ >+ <td colspan="6"> > <a id="label[% serialslis.subscriptionid %][% serialslis.serialid %]" style="color: grey; font-size: 80%; cursor: pointer;" onclick="unHideItems('items[% serialslis.subscriptionid %][% serialslis.serialid %]','label[% serialslis.subscriptionid %][% serialslis.serialid %]', '[% serialslis.serialid %]');setStatus([% serialslis.serialid %]);"> > Click to add item</a> > <fieldset class="rows" style="display:none;" id="items[% serialslis.subscriptionid %][% serialslis.serialid %]"> >@@ -228,7 +231,7 @@ $(document).ready(function() { > Item</a> > </legend> > <div class="cataloguing_additem_itemlist"> >- [% FOREACH item IN serialslis.items %] >+ > <div id="item[% item.serialid %][% item.countitems %]" class="items"> > <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li> > <div class="subfield_line" style="[% iteminformatio.hidden %]" id="subfield[% item.serialid %][% item.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> >@@ -271,10 +274,12 @@ $(document).ready(function() { > <input type="hidden" name="bibnum" value="[% item.biblionumber %]" /> > <input type="hidden" name="itemid" value="[% item.itemid %]" /> > <input type="hidden" name="field_value" value="[% item.itemnumber %]" /> >- [% END %] <!-- /items --> > </div> > </fieldset> > </td> >+ >+ [% END %] >+ [% END %] > </tr> > [% END %] > [% END %] >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 309527e..b1a3877 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -268,6 +268,9 @@ if ( $op and $op eq 'serialchangestatus' ) { > my $countdistinct; > my $range = scalar(@itemid); > for ( my $i = 0 ; $i < $range ; $i++ ) { >+ if (C4::Items::GetItem($itemid[$i])) { >+ next(); >+ } > unless ( $itemhash{ $itemid[$i] } ) { > if ( $serials[$countdistinct] > && $serials[$countdistinct] ne "NEW" ) >-- >1.9.1
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 14895
:
42867
|
42868
|
42869
|
44937
|
45055
|
45056