Bugzilla – Attachment 67385 Details for
Bug 19361
Linking an authorised value category to a field in a framework can lose data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19361 - Display the value of a MARC field in dropdown box after it is linked to an authorised value
Bug-19361---Display-the-value-of-a-MARC-field-in-d.patch (text/plain), 4.30 KB, created by
Alex Buckley
on 2017-09-26 21:43:21 UTC
(
hide
)
Description:
Bug 19361 - Display the value of a MARC field in dropdown box after it is linked to an authorised value
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-09-26 21:43:21 UTC
Size:
4.30 KB
patch
obsolete
>From 22ee8c982bdee792bbe90a8e0b7fb12a6832030d Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 25 Sep 2017 08:00:39 +0000 >Subject: [PATCH] Bug 19361 - Display the value of a MARC field in dropdown box > after it is linked to an authorised value > >This patch displays the previously entered input of a MARC subfield >(inputted before an authorised value was linked to the MARC field) in the new authorised >value dropdown so that it can be resubmitted and not lost from the >database. > >Test plan: >1. Create a record and write a value into the Edition 942$e MARC field >and submit form > >2. Create a new authorised value category and link it to the same >Edition MARC subfield > >3. Load the MARC record again and notice that the Edition field is now >an empty dropdown box. Also for future reference in this test note the values in the 942$2 and 942$c dropdown >boxes > >4. Query the biblio_metadata table with the biblionumber of the >record that you created in step 1 and notice that the value you entered >in step 1 into the Edition (<subfield_code="e") still exists > >5. Submit the form > >6. Repeat step 4 and notice that <subfield_code="e" line no longer exists >as the existing data for the edition MARC subfield has been lost by >linking a new authorised value category to the edition subfield > >7. Apply patch > >8. Repeat steps 1 but this time write a value into the Classification >part MARC subfield > >9. Repeat step 2 but link the new authorised value category to the >Classification part MARC subfield > >10. Repeat step 3 and notice that the value you wrote into the >Classification part subfield is displayed in the dropdown box (selected by default), along with a message in >brackets informing you that this value is not an authorised value > >11. Note that the other dropdown boxes 942$2 and 942$c both display the >same values as in step 3 > >12. Submit the form > >13. Query the biblio_metadata table and notice that the ><subfield_code="h" line still exists with the value you entered and >that was shown in the dropdown box > >As this is quite a complex test plan, I have done my best to keep it as >simple as possible, however if you are confused please let me >know and I am more than happy to clarify > >Sponsored-By: Catalyst IT >--- > .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 4b4516d..8551e87 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -695,14 +695,18 @@ function Changefwk() { > <select name="[%- mv.name -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id -%]"> > [% FOREACH aval IN mv.values %] > [% IF aval == mv.default %] >- <option value="[%- aval -%]" selected="selected">[%- mv.labels.$aval -%]</option> >+ <option value="[%- aval -%]" selected="selected">[%- mv.labels.$aval -%]</option> > [% ELSE %] >- <option value="[%- aval -%]">[%- mv.labels.$aval -%]</option> >+ [% IF mv.labels.$aval %] >+ <option value="[%- aval -%]"> [% mv.labels.$aval %]</option> >+ [% ELSIF mv.default != 'ddc' %] >+ <option value ="[% mv.default %]"> [% mv.default %] - (This is a previous entered value not an authorised value) </option> >+ [% END %] > [% END %] > [% END %] > </select> > [% END %] >- >+ > <span class="subfield_controls"> > [% IF ( subfield_loo.repeatable ) %] > <a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]','[% advancedMARCEditor %]'); return false;"> >@@ -713,7 +717,6 @@ function Changefwk() { > </a> > [% END %] > </span> >- > </div> > <!-- End of the line --> > [% END %] >-- >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 19361
:
67385
|
67652
|
67655
|
67657
|
67658
|
67955
|
105848
|
142158
|
142159
|
142208
|
142209
|
148377
|
148378
|
148379
|
148380