Bug 20280 - Authorised value categories list in bibliographic frameworks has 2 empty entries
Summary: Authorised value categories list in bibliographic frameworks has 2 empty entries
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-23 07:39 UTC by Katrin Fischer
Modified: 2018-03-01 15:16 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-02-23 07:39:01 UTC
To test:
- Edit a subfield in any of your bibliographic frameworks
- In the last section, take a look at the authorised value categories list
- Confirm there are 2 empty entries

Tested with sample data.
Comment 1 Jonathan Druart 2018-03-01 15:16:09 UTC
installer/data/mysql/mandatory/auth_val_cat.sql:
  1 INSERT IGNORE INTO authorised_value_categories( category_name )
  2     VALUES
  3     (''),

but installer/data/mysql/updatedatabase.pl:
13164     INSERT IGNORE INTO authorised_value_categories( category_name )
13165     VALUES
13166     ('Asort1'),

"" is missing


Moreover:
  commit 62aa3f4292d83bc9304e296de5f0830e28510492
    Bug 17216: Use Koha::AVC from mss.pl
Added this additional blank entry in the template:
+                                <option value=""></option>

Additional info, in admin/authorised_values.pl we have:
215     my @categories = Koha::AuthorisedValueCategories->search({ category_name => { -not_in => ['', 'branches', 'itemtypes', 'cn_source']}}, { order_by => ['category_name'] } );

So maybe a solution could be to:
- remove all the additional entries in template (if there are others than in admin/marc_subfields_structure.tt)
- the add the AV category "" to existing install (unless it already exists)