Bug 14213 - Cataloging plugin in cloned field does not work
Summary: Cataloging plugin in cloned field does not work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-18 08:31 UTC by Marcel de Rooy
Modified: 2015-12-03 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14213: Cataloging plugin in cloned field does not work (2.70 KB, patch)
2015-05-18 09:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14213: Cataloging plugin in cloned field does not work (3.38 KB, patch)
2015-05-18 13:24 UTC, Indranil Das Gupta
Details | Diff | Splinter Review
[PASSED QA] Bug 14213: Cataloging plugin in cloned field does not work (3.45 KB, patch)
2015-05-18 20:35 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2015-05-18 08:31:04 UTC

    
Comment 1 Marcel de Rooy 2015-05-18 09:02:34 UTC Comment hidden (obsolete)
Comment 2 Indranil Das Gupta 2015-05-18 13:24:18 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-05-18 20:35:37 UTC
Created attachment 39291 [details] [review]
[PASSED QA] Bug 14213: Cataloging plugin in cloned field does not work

A code change for report 10480 in cataloging.js does not work well in case
you clone a field with a plugin on a subfield.
The events (click, focus, etc.) do not work on the subfield of the clone.

This patch corrects the situation by finding the right html element for
adding event binding.
NOTE: The test plan uses EXAMPLE.pl since many old plugins do not operate
on the correct field value when cloning. This is corrected in bug 13437.

Test plan:
[1] Attach EXAMPLE.pl to field 007, 246h and 260c.
    In sql for 007: update marc_subfield_structure set
        value_builder='EXAMPLE.pl' where tagfield='007' and tagsubfield='@';
[2] Clone field 007. Verify that focus and click operate on both fields.
    Check also that the plugin works on the value corresponding with
    the button you clicked.
[3] Clone field 246. Do the same checks on both subfields $h.
[4] Clone subfield 260c. Do the same checks again.

Test Remarks:
============

1/ Setup a new framework (B213) based off 'Default' and fired off
   an SQL statement to update value_builder values for 007, 246$h
   and 269$c (UPDATE `marc_subfield_structure` SET value_builder
   = 'EXAMPLE.pl' WHERE frameworkcode = 'B213' AND ( (tagfield =
   '007' AND tagsubfield = '@') OR ( tagfield LIKE '246' AND
   tagsubfield = 'h') OR (tagfield = '260' AND tagsubfield = 'c'))

2/ Tested step 2, 3 and 4 of the given test plan above. The missing
   plugin support in the cloned fields were noted.

3/ Applied patch

4/ Re-tested steps 2, 3 and 4 as before. The defined plugins were
   correctly cloned and found to be functional.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi 2015-05-19 12:32:21 UTC
Patch pushed to master.

Good catch Marcel!