[Koha-bugs] [Bug 9894] 'hidden' value is hard to understand in frameworks

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 8 12:41:36 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9894

Jonathan Druart <jonathan.druart at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #16878|0                           |1
        is obsolete|                            |
  Attachment #17176|0                           |1
        is obsolete|                            |
  Attachment #17259|0                           |1
        is obsolete|                            |
  Attachment #17260|0                           |1
        is obsolete|                            |

--- Comment #15 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 17278
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17278&action=edit
Bug 9894 - (3.12) de-serialize the 'hidden' value for subfields in frameworks

This patch aims to provide a non-intrusive way (with respect to Koha's code, so
it could have got into 3.12) for the users to easily choose the visibility
settings
for each subfield.

This patch is also known to have arrived late for 3.12. I've been struggling
with
other stuff at work, but I just wanted to put this somewhere just in case it
can
be reused or something else.

The patch adds two JavaScript functions that deal with (de)serialization of the
'hidden'
value for subfields. One each way. Listeners are added to the checkboxes so the
(actually, heh)
'hidden' value gets correctly updated on each checkbox change.

There's a costly function to update all checkboxes on every tab to match the
'hidden' value on page load.

To test:
- open the docs to have at hand the list of codes/visibility options
combinations and
try changing several subfields from a single tagfield. Save, and reopen the
"Edit subfields" page.
- I had a MySQL shell opened to repeatedly run this query (i tested against
field 886
  on the default framework):
>  SELECT tagfield,tagsubfield,hidden FROM marc_subfield_structure WHERE frameworkcode='' AND tagfield=886;
- Compare what was saved on the DB with the docs for that visibility selection.

Regards
To+

PS: I promise I'll work on the proper patch for 3.14, which would involve DB
structure changes and
(more than I expected) rewriten code.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Liz Rea <liz at catalyst.net.nz>
I promise to hug you the next time we meet. This works, and is a reasonable
work around for a very longstanding awkward interface.

Signed-off-by: Jonathan Druart <jonathan.druart at biblibre.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list