Koha-clms/C4
Fridolyn SOMERS 99dbc5cdf7 Bug 7442: fix crash when selecting an authority with 200$x or 200$y (UNIMARC)
From a biblio record, if one wants to add a 600$a information, a pop-up
appears.  On this new window, on search terms typed and validated, a table
result is displayed, with a column "Get It!" allowing the selection of an
authority.  From here, different cases:

1) If we have a simple authority with 200$a and 200$b subfields, a link
   "choose" is displayed, working correctly.

2) If the authority has different occurences of 200$a/200$b, numeric links (1 2
   and so on) are displayed, one for each occurence.  In the example of my
   screenshot, the line with a "Paul, Korky -- Pauline, Korkette" summary
   possesses two links : "1" will add "Paul, Korky" whereas "2" will add
   "Pauline, Korkette" (couldn't come up with a better name ;)).

3) If the authority has 200$x or 200$y subfields defined, several links are
   also created, when it should not be the case.  In our example, "Niclausse,
   Paul -- Expositions" will create a link "1" for "Niclausse, Paul" and a link
   "2" for "Expositions".  Clicking on the 2nd link leads to the following
   error: Software error: Can't call method "subfields" on an undefined value
   at
   /home/asaurat/workspace/versions/community/authorities/blinddetail-biblio-search.pl
   line 86.  Only the cases 1 and 2 should be handled. The creation of links
   for subfields like 200$x or 200$y should be removed.

This problem is caused by the use of " -- " has separator of authorities with
several headings, but also in some heading between main part and subdivisions.
This patch corrects this by using an array in authorities summary so that
presentation is computed in template. I've choosen to use the pipe separator
between authorities with several headings. This may be changed to be
configurable.

Test plan :

- Edit an authority type summary : for example subject (heading on 250) :
  summary "[250a][ -- 250x]"
- Create an authority A1 with one heading and a subdivision : for example a
  subject : 250$a "History" 250$x "20th century"
- Create an authority A2 with several headings. for example a subject : 250$a
  "History" 250$a "Legends"
- Rebuild Zebra queue
- Go to OPAC and click on "Authority search" and search on "History"
  => You will find A1 and A2 :
    History -- 20th century
    History | Legends
- Go to intranet autorities search and search on "History"
  => You will find A1 and A2 :
    History -- 20th century
    History | Legends
- Edit a record using this autorities type as thesaurus : for example on 606$a
- Click on thesaurus link and search on "History"
  => You will find A1 and A2 :
    History -- 20th century ; 0 times ; choose ; Edit authority
    History | Legends       ; 0 times ; 1 2    ; Edit authority
- Click on link "2" to chosse "Legends"
  => You get "Legends" in heading field : for example 606$a

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

I can confirm the problem and the solution. I have tested the patch on a large
DB with authorities having multiples headings. There is no regression on bug
4838.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Without the patch I couldn't choose between multiple headings
in the authority plugin, but with the patch it works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-05 01:09:29 +00:00
..
AuthoritiesMarc
…
Barcodes Bug 11539: removing 2 unused files 2014-01-14 20:55:28 +00:00
ClassSortRoutine Bug 9770: fix sorting of Dewey call numbers that contain prefixes 2013-07-15 16:12:47 +00:00
Creators Bug 10763 - [SIGNED-OFF] Update POD of C4::Creators::Lib::html_table() to use TT syntax 2013-08-20 14:31:34 +00:00
External Bug 10320: (follow-up) correct license statement 2013-09-08 07:04:45 +00:00
Form Bug 12100: ensure that messaging preferences displays saved Days in Advance 2014-04-28 21:35:18 +00:00
Heading
…
ILSDI Bug 8918: Fix reserve priority in ILS-DI 2014-03-10 17:31:05 +00:00
Installer Bug 11679: Add the new dependency OpenOffice::OODoc 2014-04-28 18:51:10 +00:00
Labels Bug 11402: make Labels::_guide_box return undef if undefned data is passed 2013-12-30 16:17:35 +00:00
Linker
…
Members Bug 12100: (follow-up) fix regression 2014-04-28 21:36:25 +00:00
OAI Bug 9295: Introduce operator equal/ notequal to OAI set mapping instead of hardcoded 'equal' value. 2013-10-10 23:03:30 +00:00
Output
…
Patroncards
…
Reports Bug 9915: (follow-up) use SQL placeholders 2014-04-20 22:54:09 +00:00
SIP Bug 6273: (follow-up) fix various issues 2014-04-30 17:11:58 +00:00
Search
…
Serials Bug 7688: (follow-up) update license statements 2013-10-30 02:56:32 +00:00
Utils Bug 11474: (follow-up) correct typos in POD 2014-01-06 05:46:32 +00:00
VirtualShelves Bug 8262: (follow-up) correct comment 2014-04-20 22:57:55 +00:00
Accounts.pm Bug 6273: (follow-up) fix various issues 2014-04-30 17:11:58 +00:00
Acquisition.pm Bug 12089: Remove use of dt_add_type_uk_date() - Acquisitions 2014-04-28 18:41:28 +00:00
Auth.pm Bug 10951: (follow-up) use Koha.Preference() template function 2014-04-19 16:53:26 +00:00
Auth_cas_servers.yaml.orig
…
Auth_with_cas.pm Bug 10927: remove disused C4::Utils module 2013-10-03 14:53:02 +00:00
Auth_with_ldap.pm Bug 10908: restore docs on principal_name LDAP option 2013-10-21 15:28:11 +00:00
AuthoritiesMarc.pm Bug 7442: fix crash when selecting an authority with 200$x or 200$y (UNIMARC) 2014-05-05 01:09:29 +00:00
BackgroundJob.pm Bug 10601: (follow-up) improvements to ->set() and ->get() 2013-09-18 17:23:44 +00:00
Barcodes.pm
…
Biblio.pm Bug 9593: (follow-up) don't make currency.isocode required 2014-05-04 22:21:17 +00:00
Bookseller.pm Bug 7965: Silence warns in staff log 2014-01-10 15:42:09 +00:00
Boolean.pm Bug 10080 - Change system pref IndependantBranches to IndependentBranches 2013-05-22 07:58:23 -07:00
Branch.pm Bug 11051: remove unneccessary SQL queries in GetBranches 2014-01-10 16:02:39 +00:00
Breeding.pm Bug 12112: remove disused routine C4::Breeding::ImportBreeding() 2014-04-25 15:07:52 +00:00
Budgets.pm Bug 766: Move GetAuthvalueDropbox to C4::Koha 2014-05-04 23:01:44 +00:00
Calendar.pm
…
Category.pm
…
Charset.pm Bug 11730: ensure that C4::Charset loads C4::Context 2014-02-18 21:52:21 +00:00
Circulation.pm Bug 8231: display warning at check in if borrower is restricted 2014-05-05 00:41:32 +00:00
ClassSortRoutine.pm
…
ClassSource.pm Bug 10643: fix inappropriate uses of $sth->finish() in C4::ClassSource.pm 2013-08-09 15:32:22 +00:00
Context.pm Bug 11701: Fix C4::Context::Zconn 2014-03-25 14:43:03 +00:00
Contract.pm
…
CourseReserves.pm bug 8215: (followup) rename GetItemReservesInfo 2013-05-21 15:51:03 -07:00
Creators.pm
…
Csv.pm Bug 10853: All existing routing to get a CSV should return a MARC csv 2013-10-11 02:16:33 +00:00
Dates.pm
…
Debug.pm
…
HTML5Media.pm
…
Heading.pm
…
HoldsQueue.pm Bug 11258: fix another case where holds queue made transfer requests that contradict the library holds policy 2014-04-18 15:23:23 +00:00
Images.pm
…
ImportBatch.pm Bug 11254: make reservoir search normalize ISBNs 2014-04-19 21:44:30 +00:00
ImportExportFramework.pm Bug 11666: remove SQL as an option for MARC framework exports and imports 2014-02-05 19:48:27 +00:00
Input.pm Bug 766: remove disused routine buildCGISort 2014-05-04 23:03:24 +00:00
Installer.pm Bug 10523: Remove two obsolete routines from Installer.pm 2013-10-31 16:51:47 +00:00
ItemCirculationAlertPreference.pm
…
ItemType.pm Bug 10513: display a warning/message when returning a chosen item type 2013-09-16 17:45:31 +00:00
Items.pm Bug 11416: fix case where serials item editor was incorrectly hiding fields 2014-04-18 21:38:07 +00:00
Koha.pm Bug 11466: improve selection of item types for purchase order desired format list 2014-05-04 23:20:33 +00:00
Labels.pm
…
Languages.pm Bug 10986: (follow-up) improve POD 2014-04-19 17:40:35 +00:00
Letters.pm Bug 10833: (follow-up) add message transport type to a warning message 2014-05-02 20:29:20 +00:00
Linker.pm
…
Log.pm
…
Maintainance.pm
…
MarcModificationTemplates.pm Bug 11479: Remove experimental given/when keywords 2014-02-20 15:55:21 +00:00
Matcher.pm Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
Members.pm Bug 7567 - Use, display, filter News by library 2014-04-07 18:14:19 +00:00
Message.pm
…
NewsChannels.pm Bug 7567: (follow-up) construct values clause in SQL statement more idiomatically 2014-04-07 18:14:21 +00:00
Output.pm Bug 10016: force zero browser-side caching of SCO pages 2013-10-21 18:05:12 +00:00
Overdues.pm Bug 11696: ensure that print overdue notices use the print template 2014-05-02 20:29:21 +00:00
Patroncards.pm
…
Print.pm
…
Ratings.pm
…
Record.pm Bug 11066: make RIS and Bibtex exports RDA compatible 2014-01-03 15:54:38 +00:00
Reports.pm
…
Reserves.pm Bug 9016: (follow-up) treat missing transports for hold available notices as warnings, not fatal errors 2014-05-02 20:54:55 +00:00
Review.pm
…
Ris.pm Bug 11066: make RIS and Bibtex exports RDA compatible 2014-01-03 15:54:38 +00:00
RotatingCollections.pm Bug 11384: rename the collections_tracking.ctId column 2013-12-23 16:14:57 +00:00
SMS.pm
…
SQLHelper.pm Bug 11221: ensure that SQLHelper uses NULL rather than 0000-00-00 as default date value 2013-11-19 15:29:08 +00:00
Scheduler.pm
…
Scrubber.pm
…
Search.pm Bug 9972: Add/change some zebra indexes (MARC21) 2014-04-20 16:24:08 +00:00
Serials.pm Bug 11719 - Use new DataTables include in serials templates 2014-04-28 18:26:31 +00:00
Service.pm
…
ShelfBrowser.pm Bug 10856: (follow-up) if callnumbers are equal, order should be on itemnumber 2013-10-04 15:57:03 +00:00
SocialData.pm
…
Stats.pm
…
Suggestions.pm Bug 10277 - Add C4::Context->IsSuperLibrarian() 2013-12-30 15:47:23 +00:00
TTParser.pm
…
Tags.pm
…
Templates.pm Bug 5052: make it possible to pick a language if all choices are sublanguage 2014-04-15 14:36:29 +00:00
TmplToken.pm Bug 12131: Remove unused dependency on Exporter 2014-04-25 15:24:39 +00:00
TmplTokenType.pm
…
UploadedFile.pm
…
VirtualShelves.pm Bug 8262: explicitly warn that database admin account cannot create lists 2014-04-20 22:55:22 +00:00
XISBN.pm Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
XSLT.pm Bug 10550: Fix database typo wthdrawn 2013-09-08 01:58:41 +00:00