Bug 18422 - Add Select2 to authority editor
Summary: Add Select2 to authority editor
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Oleg Vasilenko
QA Contact: Julian Maurice
URL:
Whiteboard:
Keywords: Academy
Depends on: 13501
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-12 07:42 UTC by Oleg Vasilenko
Modified: 2017-10-29 18:27 UTC (History)
5 users (show)

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


Attachments
Bug 18422 - Add Select2 to authority editor (1.75 KB, patch)
2017-04-12 07:49 UTC, Oleg Vasilenko
Details | Diff | Splinter Review
Bug 18422 - Add Select2 to authority editor (1.80 KB, patch)
2017-09-15 09:52 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 18422 - Add Select2 to authority editor (1.86 KB, patch)
2017-09-29 13:56 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 18422: (QA follow-up) Check if select2 is available before using it (1.59 KB, patch)
2017-09-29 13:56 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Vasilenko 2017-04-12 07:42:54 UTC
Overview: 
Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a)

Steps to Reproduce: 
In authority editor repeat field that has select subfield

Actual Results: 
Field does not repeat (copy is not created). 
Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function»

Expected Results: 
Field will repeat (copy is created)

Additional Information:
Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor
Comment 1 Oleg Vasilenko 2017-04-12 07:49:33 UTC
Created attachment 62070 [details] [review]
Bug 18422 - Add Select2 to authority editor

This patch add Select2 to authority editor
Comment 2 Fridolin SOMERS 2017-09-15 09:50:02 UTC
This is no enhancement but a real bug with a dirty JS error.
Comment 3 Fridolin SOMERS 2017-09-15 09:52:24 UTC
Created attachment 67142 [details] [review]
Bug 18422 - Add Select2 to authority editor

Overview:
Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a)
This patch adds Select2 to authority editor

Steps to Reproduce:
In authority editor repeat field that has select subfield

Actual Results:
Field does not repeat (copy is not created).
Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function»

Expected Results:
Field will repeat (copy is created)

Additional Information:
Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Fridolin SOMERS 2017-09-15 09:53:48 UTC
Works fine.
Also tested that auto-completion works in the select in authority edition.
Comment 5 Julian Maurice 2017-09-29 13:56:09 UTC
Created attachment 67451 [details] [review]
Bug 18422 - Add Select2 to authority editor

Overview:
Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a)
This patch adds Select2 to authority editor

Steps to Reproduce:
In authority editor repeat field that has select subfield

Actual Results:
Field does not repeat (copy is not created).
Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function»

Expected Results:
Field will repeat (copy is created)

Additional Information:
Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 6 Julian Maurice 2017-09-29 13:56:12 UTC
Created attachment 67452 [details] [review]
Bug 18422: (QA follow-up) Check if select2 is available before using it

cataloging.js might not always be loaded with select2.js, so we should
check its availability to prevent JS errors

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 7 Jonathan Druart 2017-09-29 20:17:44 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin SOMERS 2017-10-27 12:33:22 UTC
Pushed to 17.05.x, will be in 17.05.06.
Comment 9 Katrin Fischer 2017-10-29 18:27:00 UTC
These patches have been pushed to 16.11.x and will be in 16.11.14.