From 4a70f3a1ca4ce5c33c7efe17ca38d90d3cfbbdf7 Mon Sep 17 00:00:00 2001 From: Cori Lynn Arnold Date: Fri, 12 Oct 2018 13:13:12 +0000 Subject: [PATCH] Bug 19263: Rancor - 001 widget - changes to address QA issues Changes were made to address QA issues from Comment 17 Tests: 1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories 2) Edit a bib record using advanced editor and note that the 001 widget isn't there when adding/editing 001 field 3) Add a new row into authorised_values table with: a) CONTROL_NUM_SEQUENCE in category column b) authorised_value column has a string ending with a number i.e. sprLib0001 c) lib column has a short string indicating the type of control number i.e. "Springfield Library" 4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- installer/data/mysql/mandatory/auth_val_cat.sql | 2 +- .../prog/en/includes/cateditor-widgets-marc21.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/mandatory/auth_val_cat.sql b/installer/data/mysql/mandatory/auth_val_cat.sql index df119a08f9..4ab8c0e04e 100644 --- a/installer/data/mysql/mandatory/auth_val_cat.sql +++ b/installer/data/mysql/mandatory/auth_val_cat.sql @@ -44,7 +44,7 @@ INSERT IGNORE INTO authorised_value_categories( category_name ) ('HINGS_C'), ('HINGS_AS'), ('HINGS_RD'), - ('STACK') + ('STACK'), ('CONTROL_NUM_SEQUENCE'); -- UNIMARC specific? diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc index 970f58e6d6..f1cb70c1cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc @@ -128,7 +128,7 @@ require( [ 'koha-backend', 'widget' ], function( KohaBackend, Widget ) { + '' + '' + '' - + '' + + '' + '' ); @@ -158,7 +158,7 @@ require( [ 'koha-backend', 'widget' ], function( KohaBackend, Widget ) { if ( result ) widget.setControlNumber( result ); } ).end(); - var sequence_list = $.map( KohaBackend.GetAuthorisedValues( 'CONTROL_NUM_SEQUENCE' ), function( authval ) { + var sequence_list = $.map( reg001 , function( authval ) { return authval.lib; } ); sequence_list.sort(); -- 2.39.5