Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin
Summary: Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc2...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 05:05 UTC by David Cook
Modified: 2014-12-07 20:03 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
field 008 with decomposed Illustration options (21.24 KB, image/png)
2013-05-02 01:22 UTC, Bernardo Gonzalez Kriegel
Details
field 008 with multiple options (17.36 KB, image/png)
2013-05-02 01:56 UTC, Bernardo Gonzalez Kriegel
Details
Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin (15.21 KB, patch)
2013-05-02 11:28 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED OFF] Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin (15.38 KB, patch)
2013-05-10 07:29 UTC, David Cook
Details | Diff | Splinter Review
Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin (15.43 KB, patch)
2013-06-16 09:36 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin (15.43 KB, patch)
2013-06-16 09:53 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2013-04-29 05:05:55 UTC
Currently, the marc21_field_008.xml populates many drop-down boxes in the marc21_field_008.pl plugin for editing the MARC 008 field. 

However, it doesn't populate the boxes for the 18-21 Illustrations of 24-27 Nature of contents, even though the XML file does have options available for these fields.

--

I've only glanced at the code, but I imagine that part of the problem is that you can't really use a single drop-down box to fill 3-4 different positions that could have any combination of the single character options specified in the XML. 

I'm not sure what the optimal solution would be exactly, but the options should still be loaded from the XML file so that people can choose which code to fill each of the different positions for these parts of the MARC 008 control field.
Comment 1 Bernardo Gonzalez Kriegel 2013-05-02 01:21:15 UTC
One fast (albeit ugly) solution could be add in xml an individual entry for each position. xmlControlfield.js write a input text without options if description has a '-' (dash).
Result in attached image.
Comment 2 Bernardo Gonzalez Kriegel 2013-05-02 01:22:18 UTC
Created attachment 17875 [details]
field 008 with decomposed Illustration options
Comment 3 Bernardo Gonzalez Kriegel 2013-05-02 01:56:01 UTC
Created attachment 17876 [details]
field 008 with multiple options

This image describe another possible solution, but this requires some JS wizardry to work. Something like this could also be used to dates.
Comment 4 David Cook 2013-05-02 04:04:04 UTC
(In reply to comment #2)
> Created attachment 17875 [details]
> field 008 with decomposed Illustration options

Visually, I think that this [the decomposed options] might be the best option. It allows users to see the code and the description of the code, so as to easily make informed decisions. My only concern might be in the label for the positions. "18 - Illustrations - code 1" might be better than "18 - Illustrations position 1". 

It's not very optimal to have separate entries for 18, 19, 20, 21, but I assume it might not be possible to give one XML element several position attributes. 

I suppose the 18-21 and 24-27 positions might be special cases, so maybe having separate XML elements for each position within those ranges is acceptable...especially if it means that we're providing a validated list of options to users.
Comment 5 Bernardo Gonzalez Kriegel 2013-05-02 11:28:37 UTC Comment hidden (obsolete)
Comment 6 David Cook 2013-05-10 07:29:47 UTC Comment hidden (obsolete)
Comment 7 Chris Cormack 2013-06-16 09:36:01 UTC Comment hidden (obsolete)
Comment 8 Chris Cormack 2013-06-16 09:53:38 UTC
Created attachment 19034 [details] [review]
Bug 10141 - Enable "18-21 Illustrations" and "24-27 Nature of contents" options for marc21_field_008.pl plugin

Easy workaround

This patch expands both options, Illustrations and Nature of..,
so each position could be filled independently.

To test:
1) edit or add a new recod
2) click on field 008 value builder, positions 18-21 and 24-27 only
show an input text box
3) apply the patch
4) reload value_builder page, now each position (18-21,24-27) has
it's own pulldown.

A similar fix could be used in a similar problem in 006 value builder.

Signed-off-by: David Cook <dcook@prosentient.com.au>

I struggled with this test plan at first (until I cleared my memcache),
but it works as described. Thanks, Bernardo!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 9 Galen Charlton 2013-06-16 23:14:56 UTC
Pushed to master.  Thanks, Bernardo!
Comment 10 Tomás Cohen Arazi 2013-07-02 18:03:42 UTC
This patch has been pushed to 3.12.x, will be in 3.12.2.

Thanks Bernardo, great job!