prove t/db_dependent/AuthorisedValues.t DBD::mysql::st execute failed: Duplicate entry 'ACQ-952-c' for key 'PRIMARY' [for Statement "INSERT INTO `marc_subfield_structure` ( `authorised_value`, `frameworkcode`, `kohafield`, `tagfield`, `tagsubfield`) VALUES ( ?, ?, ?, ?, ? )" with ParamValues: 0='LOC', 1='ACQ', 2='items.location', 3=952, 4='c'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832. DBIx::Class::Storage::DBI::_dbh_execute(): Duplicate entry 'ACQ-952-c' for key 'PRIMARY' at /home/mtompset/kohaclone/Koha/Object.pm line 121 # Child (search_by_*_field + find_by_koha_field + get_description) exited without calling finalize() not ok 15 - search_by_*_field + find_by_koha_field + get_description Seems that bug 17249 adds both a 952$c for the '' and 'ACQ' framework, but the deletes above only delete the '' framework one.
Created attachment 64084 [details] [review] Bug 18748: Noisy t/db_dependent/AuthorisedValues.t This noise is from a failure. This patch expands the delete regardless of framework. TEST PLAN --------- prove t/db_dependent/AuthorisedValues.t -- should have ugly message like in comment #0 apply patch prove t/db_dependent/AuthorisedValues.t -- should be green run koha qa test tools
I ran 'prove t/db_dependent/AuthorisedValues.t' however I did not encounter any noise. For me, the test was successful.
(In reply to Lee Jamison from comment #2) > I ran 'prove t/db_dependent/AuthorisedValues.t' however I did not encounter > any noise. For me, the test was successful. Purposefully add a 952$c 'ACQ' framework into your DB. I likely got this as a result of killing the test before it completed.
Created attachment 64112 [details] [review] Bug 18748: Noisy t/db_dependent/AuthorisedValues.t This noise is from a failure. This patch expands the delete regardless of framework. TEST PLAN --------- prove t/db_dependent/AuthorisedValues.t -- should have ugly message like in comment #0 apply patch prove t/db_dependent/AuthorisedValues.t -- should be green run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Test is green after running as directed by the test plan.
Mark, could you make the change more explicit? It would make more sense to delete 952c for the default and ACQ frameworks.
Created attachment 64312 [details] [review] Bug 18748: Noisy t/db_dependent/AuthorisedValues.t This noise is from a failure. This patch expands the delete to 952$c for the ACQ framework as per comment #5. TEST PLAN --------- insert into marc_subfield_structure (tagfield,tagsubfield,liblibrarian, libopac, repeatable, mandatory, kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) values (952,'c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',0,0,'ACQ','','',null,9999); -- this makes sure you have a pre-existing 952$c ACQ record. prove t/db_dependent/AuthorisedValues.t -- should have ugly message like in comment #0 apply patch prove t/db_dependent/AuthorisedValues.t -- should be green run koha qa test tools
Created attachment 64433 [details] [review] Bug 18748: Noisy t/db_dependent/AuthorisedValues.t This noise is from a failure. This patch expands the delete to 952$c for the ACQ framework as per comment #5. TEST PLAN --------- insert into marc_subfield_structure (tagfield,tagsubfield,liblibrarian, libopac, repeatable, mandatory, kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) values (952,'c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',0,0,'ACQ','','',null,9999); -- this makes sure you have a pre-existing 952$c ACQ record. prove t/db_dependent/AuthorisedValues.t -- should have ugly message like in comment #0 apply patch prove t/db_dependent/AuthorisedValues.t -- should be green run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Works as described following the test plan.
Created attachment 65047 [details] [review] Bug 18748: Noisy t/db_dependent/AuthorisedValues.t This noise is from a failure. This patch expands the delete to 952$c for the ACQ framework as per comment #5. TEST PLAN --------- insert into marc_subfield_structure (tagfield,tagsubfield,liblibrarian, libopac, repeatable, mandatory, kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) values (952,'c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',0,0,'ACQ','','',null,9999); -- this makes sure you have a pre-existing 952$c ACQ record. prove t/db_dependent/AuthorisedValues.t -- should have ugly message like in comment #0 apply patch prove t/db_dependent/AuthorisedValues.t -- should be green run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 17.11, thanks to everybody involved!
This patch has been pushed to 16.11.x and will be in 16.11.10.