Good questions, Fridolin. I ended up adding sort1 and sort2 locally to borrowers.json. I've been so busy I hadn't even thought of upstreaming yet I think.
David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel <koha-devel-boun...@lists.koha-community.org> On Behalf Of Fridolin SOMERS Sent: Wednesday, 11 August 2021 7:34 AM To: koha-devel <koha-devel@lists.koha-community.org> Subject: [Koha-devel] Check of syspref editor with DB columns Hi, Since 22844, preferences like BorrowerUnwantedField and BorrowerMandatoryField show a modal selection of DB columns. This relies on /koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/borrowers.json Unwanted fields are hidden in template using : [% UNLESS nofield %] Mandatory fields have attribute require in template using : [% IF mandatoryfield %] Big problem is how do we maintain this ??? For example I see in template memberentrygen.tt : [% UNLESS noautorenew_checkouts %] But this column is not in borrowers.json :( I'm made some checks : grep '% UNLESS no' koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt | awk -F 'UNLESS ' '{print $2}' | tr -d '%]' | sort -u egrep 'mandatory\w' koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt | awk -F 'mandatory' '{print $2}' | tr -d ' %])' | sort -u Plus some manual work. My conclusion : Are missing from borrowers.json (used by nofield and/or mandatoryfield) : - autorenew_checkouts - relationship - sms_provider_id - sort1 - sort2 Are useless in borrowers.json : - categorycode : obviously mandatory ? - smsalertnumber : in form the field is now SMSnumber, but no noSMSnumber/mandarorySMSnumber in template I will create a bug report for autorenew_checkouts first. Maybe we could add something in QA tools ? Best regards, PS : Also not very clear, BorrowerMandatoryField shows all fields but in template there is only : mandatoryborrowernotes mandatorycardnumber mandatorycontactfirstname mandatorycontactname mandatorydateenrolled mandatorydateexpiry mandatorydateofbirth mandatoryemail mandatoryemailpro mandatoryfax mandatoryfirstname mandatoryinitials mandatorymobile mandatoryopacnote mandatoryothernames mandatorypassword mandatoryphone mandatoryphonepro mandatoryprimary_contact_method mandatorysort1 mandatorysort2 mandatorysurname mandatorytitle mandatoryuserid mandatorypassword We should add other fields in exclusions ? -- Fridolin SOMERS <fridolin.som...@biblibre.com> Software and system maintainer 🦄 BibLibre, France _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/ _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/