Bug 10602: Set default value for authority fields via the framework
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 17 Jul 2013 12:38:55 +0000 (14:38 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 10 Oct 2013 23:25:47 +0000 (23:25 +0000)
commite273e11b084af645d5f9e4f4851cc2ad850c7675
tree43b2f13f53a029b7755d1ab87936254698dc337d
parent81cdaf131f2557d8dfde3ed6b656558f48496ebb
Bug 10602: Set default value for authority fields via the framework

This patch allows to define default values in the authorities framework.

Some code already existed but the feature did not work.

Test plan:
1/ Choose a framework, field and subfields.
2/ Define a default value.
3/ Create a new authority and check that the subfield is
automatically filled with the default value.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. koha-qa reports some tabs, fixed in followup

Test
1) Apply patch, run updatedatabase.pl
2) Edit auth framework, put default value someware, save
3) Add new auth, default value present

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Verified database update is done correctly.

Controlfields 0xx
- Edited an existing field (001)
- Set a default value for subfield @
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Fields
- Edited an existing field (100)
- Set a default value for subfield e
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/AuthoritiesMarc.pm
admin/auth_subfields_structure.pl
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt