Description
Jonathan Druart
2013-07-17 12:52:30 UTC
Created attachment 19718 [details] [review] Bug 10602: Set a default value for authorities Some code already exist but the feature does not work. This patch allows to define default values in the authorities framework. 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. *** Bug 4887 has been marked as a duplicate of this bug. *** Applying: Bug 10602: Set a default value for authorities Using index info to reconstruct a base tree... M installer/data/mysql/kohastructure.sql M installer/data/mysql/updatedatabase.pl Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/kohastructure.sql Patch failed at 0001 Bug 10602: Set a default value for authorities The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Created attachment 21181 [details] [review] Bug 10602: Set a default value for authorities Some code already exist but the feature does not work. This patch allows to define default values in the authorities framework. 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. Testing this. Solved little merge conflict in updatedatabase.pl Run it, new column added. Edit framework, put default value on sample tag, ej. 040c Nothing is saved :( Applying: Bug 10602: Set a default value for authorities Using index info to reconstruct a base tree... M installer/data/mysql/updatedatabase.pl Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Patch failed at 0001 Bug 10602: Set a default value for authorities The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Created attachment 21566 [details] [review] Bug 10602: Set a default value for authorities Some code already exist but the feature does not work. This patch allows to define default values in the authorities framework. 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: Chris Cormack <chris@bigballofwax.co.nz> Bit worried about Bernardo's comment a bit earlier - do we know what happened there? I am sorry, but I have to agree with Bernardo - this is not yet working for me: Verified database update is done correctly. Controlfields 0xx - Editing an existing field (001) - Setting a default value for subfield @ NOT OK There is nothing in the logs, but the default value does not save Also somehow the plugin information ended up in the default column when I tried this? Fields - Editing an existing field 100 - Setting a default value for subfield e NOT OK Default value is not saved - it doesn't show on repeated editing and it's also not in the database. Created attachment 21659 [details] [review] Bug 10602: Set a default value for authorities Some code already exist but the feature does not work. This patch allows to define default values in the authorities framework. 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. Yes, my bad. Little error on inserting in DB. Created attachment 21664 [details] [review] [SIGNED-OFF] Bug 10602: Set a default value for authorities Some code already exist but the feature does not work. This patch allows to define default values in the authorities framework. 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 Created attachment 21665 [details] [review] Bug 10602 - followup to remove tabs Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Created attachment 21679 [details] [review] [PASSED QA] Bug 10602: Set a default value for authorities Some code already exist but the feature does not work. This patch allows to define default values in the authorities framework. 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 Created attachment 21680 [details] [review] [PASSED QA] Bug 10602 - followup to remove tabs Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Pushed to master. Thanks, Jonathan! This patch prevents to add new subfields in authorities. Filed Bug 11286 |