The table that loads on modborrowers.pl was a data table with a search bar and pager at the top. When choosing a patron attribute from the Patron attribute drop-down at the bottom of the page, if that attribute had an authorized value associated with it, a second drop-down list would appear to the right of the drop-down with the options for that attribute. Now all that appears is a basic input box and it appears whether or not you've chosen an attribute to edit or not. Error: Uncaught TypeError: table_settings.push is not a function <anonymous> https://staff.cin.bywatersolutions.com/cgi-bin/koha/tools/modborrowers.pl
Hi Laura, I just tested this on master and it worked ok. Which version did you encounter the problem in? Does it still not work for you?
Interesting: I don't see an error on the search form, but I see it on the 'result list' after the changes have been made. Maybe there is 2 different bugs here, one on the form, not present in master, and one for the results?
Katrin, Laura filed this bug on behalf of NEKLS and CIN and both of our consortia are experiencing it on Koha 22.05 George
Hi George, it took me a while and I cannot reproduce the error with selecting an attribute that is linked to an AV, the form itself seems ok in master, but I can see the JS error now. You have to update an extended attribute in order to see it: * Go to the patron modification tool * Add one or more cardnumbers, I used 42 * Select the "show barcode" extended patron attribute at the end of the form and update to yes or no On the results list, you'll see the error in the console: table_settings.push({ columname: "Attributes 1", cannot_be_modified: 0, cannot_be_toggled: 0, is_hidden: 0 });
I can also see the error on the form now - not sure why I didn't previously: Uncaught TypeError: table_settings.push is not a function
Created attachment 148406 [details] [review] Bug 33156: Fix JS error on batch patron modification The error currently breaks some of the functionality for updating patron attributes linked to AV values. With the bug, the input field will not change to the AV list when selected from the pull down of patron attributes. It was probably bug 29648 that changed the data structure without adapting for the additional data that is pushed to the object for the patron attribute columns. To test: * Create several extended patron attributes * Make sure at least one is linked to an AV * Repeatable and unique patron attributes can't be updated in batch patron modification, so you need some that can be modified. * Go to tools > batch patron modification * Enter one or more cardnumbers to update * Verify the table is missing columns, export and configure * Verify when selecting the AV tied patron attribute, the input remains a text one * Apply patch * Both should work now as expected Note: I believe there are some more errors on this page, but they should better be handled separately. So with this patch we push configuration again for each column to table columns, but the very last column keeps missing from the columns settings.
Created attachment 149074 [details] [review] Bug 33156: Fix JS error on batch patron modification The error currently breaks some of the functionality for updating patron attributes linked to AV values. With the bug, the input field will not change to the AV list when selected from the pull down of patron attributes. It was probably bug 29648 that changed the data structure without adapting for the additional data that is pushed to the object for the patron attribute columns. To test: * Create several extended patron attributes * Make sure at least one is linked to an AV * Repeatable and unique patron attributes can't be updated in batch patron modification, so you need some that can be modified. * Go to tools > batch patron modification * Enter one or more cardnumbers to update * Verify the table is missing columns, export and configure * Verify when selecting the AV tied patron attribute, the input remains a text one * Apply patch * Both should work now as expected Note: I believe there are some more errors on this page, but they should better be handled separately. So with this patch we push configuration again for each column to table columns, but the very last column keeps missing from the columns settings. Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. For me, the standard table heading (number of entries, search, Columns, Export, Configure, etc) was not appearing on the results page after pressing Save. 2. Another issue I noticed is that if you have multiple patron attributes: 2.1 Select one of the patron attributes (say a plain text one) 2.2 Enter a text value 2.3 Click New 2.4 Choose a patron attribute that has an authorized value 2.5 Note that the options for the first patron attribute (the plain text one) has now changed to a dropdown list with the same values as the second one (2.4) 2.6 Now if you add another new patron attribute (say another plain text one), it changes all the patron attributes listed so far to a plain text input box I hope this makes sense!
Created attachment 150193 [details] [review] Bug 33156: Fix JS error on batch patron modification The error currently breaks some of the functionality for updating patron attributes linked to AV values. With the bug, the input field will not change to the AV list when selected from the pull down of patron attributes. It was probably bug 29648 that changed the data structure without adapting for the additional data that is pushed to the object for the patron attribute columns. To test: * Create several extended patron attributes * Make sure at least one is linked to an AV * Repeatable and unique patron attributes can't be updated in batch patron modification, so you need some that can be modified. * Go to tools > batch patron modification * Enter one or more cardnumbers to update * Verify the table is missing columns, export and configure * Verify when selecting the AV tied patron attribute, the input remains a text one * Apply patch * Both should work now as expected Note: I believe there are some more errors on this page, but they should better be handled separately. So with this patch we push configuration again for each column to table columns, but the very last column keeps missing from the columns settings. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
Backported to 22.05.x for upcoming 22.05.13
conflicts on 21.11. won't backport