Putting any value into PatronSelfRegistrationLibraryList results in a completely empty branch list on opac-memberentry.pl for both self-reg and self-mod. To Test: - confirm you have a branch with code X - confirm PatronSelfRegistrationBorrowerUnwantedField and PatronSelfModificationBorrowerUnwantedField are empty - enter X in PatronSelfRegistrationLibraryList - go to cgi-bin/koha/opac-memberentry.pl (either as a logged in patron or as a self-reg patron) - confirm branch dropdown is empty - empty out PatronSelfRegistrationLibraryList - reload cgi-bin/koha/opac-memberentry.pl and confirm branches show Found this while trying to test a bug around this same syspref in 19.05, bug 25136
Caused by commit 82716a01727f143ba2c167cd86233a531f330390 Bug 23084: Replace grep {^$var$} with grep {$_ eq $var}
Created attachment 102917 [details] [review] Bug 25137: (bug 23084 follow-up) Fix incorrect grep ternary condition The lack of parenthesis makes the condition evaluated wrong. Test plan: - confirm you have a branch with code X - enter X in PatronSelfRegistrationLibraryList - go to cgi-bin/koha/opac-memberentry.pl (either as a logged in patron or as a self-reg patron) - confirm branch dropdown is not empty and contain X - empty out PatronSelfRegistrationLibraryList - reload cgi-bin/koha/opac-memberentry.pl and confirm branches show
@QA I did check the other occurrences modified by bug 23084 and they appear correct. Another look would be good anyway!
Was the lack of () the reason? If that is the case perhaps C4/Utils/DataTables/Members.pm lines 59/60 Why write a logical test not surrounded by parenthesis? Tested, fix the error.
Created attachment 102921 [details] [review] Bug 25137: (bug 23084 follow-up) Fix incorrect grep ternary condition The lack of parenthesis makes the condition evaluated wrong. Test plan: - confirm you have a branch with code X - enter X in PatronSelfRegistrationLibraryList - go to cgi-bin/koha/opac-memberentry.pl (either as a logged in patron or as a self-reg patron) - confirm branch dropdown is not empty and contain X - empty out PatronSelfRegistrationLibraryList - reload cgi-bin/koha/opac-memberentry.pl and confirm branches show Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 102951 [details] [review] Bug 25137: (bug 23084 follow-up) Fix incorrect grep ternary condition The lack of parenthesis makes the condition evaluated wrong. Test plan: - confirm you have a branch with code X - enter X in PatronSelfRegistrationLibraryList - go to cgi-bin/koha/opac-memberentry.pl (either as a logged in patron or as a self-reg patron) - confirm branch dropdown is not empty and contain X - empty out PatronSelfRegistrationLibraryList - reload cgi-bin/koha/opac-memberentry.pl and confirm branches show Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
missing dependencies - not backported to 19.11.x