Description
Owen Leonard
2023-08-24 11:04:45 UTC
Created attachment 154729 [details] [review] Bug 34608: Add sort1 and sort2 to patron search results This patch adds the option of displaying patron "sort1" and "sort2" statistical fields in the patron module's main search results. The fields are hidden by default in the updated table configuration. To test, apply the patch and restart services. - Go to Patrons and perform a search. - You should not see columns for sort1 and sort2. - Under the "Columns" button you should see options to display sort1 and sort2. Confirm that they work to show and hide the columns. - Confirm that the sort1 and sort2 columns are sortable and searchable. - Go to Administration -> Table settings. - Under Patrons -> member, toggle the sort1 and sort1 "hidden by default" checkboxes and save the configuration. - Return to patron search results to confirm that the columns are now shown by default. Created attachment 155343 [details] [review] Bug 34608: Add sort1 and sort2 to patron search results This patch adds the option of displaying patron "sort1" and "sort2" statistical fields in the patron module's main search results. The fields are hidden by default in the updated table configuration. To test, apply the patch and restart services. - Go to Patrons and perform a search. - You should not see columns for sort1 and sort2. - Under the "Columns" button you should see options to display sort1 and sort2. Confirm that they work to show and hide the columns. - Confirm that the sort1 and sort2 columns are sortable and searchable. - Go to Administration -> Table settings. - Under Patrons -> member, toggle the sort1 and sort1 "hidden by default" checkboxes and save the configuration. - Return to patron search results to confirm that the columns are now shown by default. Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> I really like this, but there is a small caveat: This works for the case where the sort fields are used with free text input, but not when you are using it with the bsort1 and bsort2 authorized values. *** Bug 34996 has been marked as a duplicate of this bug. *** Created attachment 158194 [details] [review] Bug 34608: (follow-up) Display authorized values if used This patch shamelessly steals from Bug 33568 in order to allow the correct authorized value description to be shown in the JS-generated table of results for values of borrowers sort1 and sort2. To test, apply the patch and go to Administration -> Authorized values. - Add some values, if necessary, to both the 'Bsort1' and 'Bsort2' categories. - Locate some patron records to edit, and set the patron's "Sort 1" and "Sort 2" fields. - Perform a patron search which will return those patron records. - Confirm that the correct authorized value description is shown instead of the authorized value code. - Delete all values from the 'Bsort1' and 'Bsort2' authorized value categories. - Return to your patron search and confirm that "Sort 1" and "Sort 2" values are still being shown, though now it's the "raw" code. The patch no longer applies 8-(... git bz apply 34608 Bug 34608 - Add sort1 and sort2 to patron search results 155343 - Bug 34608: Add sort1 and sort2 to patron search results 158194 - Bug 34608: (follow-up) Display authorized values if used Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 34608: Add sort1 and sort2 to patron search results Using index info to reconstruct a base tree... M admin/columns_settings.yml M koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc M koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc Auto-merging admin/columns_settings.yml error: Failed to merge in the changes. Patch failed at 0001 Bug 34608: Add sort1 and sort2 to patron search results Created attachment 159544 [details] [review] Bug 34608: Add sort1 and sort2 to patron search results This patch adds the option of displaying patron "sort1" and "sort2" statistical fields in the patron module's main search results. The fields are hidden by default in the updated table configuration. To test, apply the patch and restart services. - Go to Patrons and perform a search. - You should not see columns for sort1 and sort2. - Under the "Columns" button you should see options to display sort1 and sort2. Confirm that they work to show and hide the columns. - Confirm that the sort1 and sort2 columns are sortable and searchable. - Go to Administration -> Table settings. - Under Patrons -> member, toggle the sort1 and sort1 "hidden by default" checkboxes and save the configuration. - Return to patron search results to confirm that the columns are now shown by default. Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Created attachment 159545 [details] [review] Bug 34608: (follow-up) Display authorized values if used This patch shamelessly steals from Bug 33568 in order to allow the correct authorized value description to be shown in the JS-generated table of results for values of borrowers sort1 and sort2. To test, apply the patch and go to Administration -> Authorized values. - Add some values, if necessary, to both the 'Bsort1' and 'Bsort2' categories. - Locate some patron records to edit, and set the patron's "Sort 1" and "Sort 2" fields. - Perform a patron search which will return those patron records. - Confirm that the correct authorized value description is shown instead of the authorized value code. - Delete all values from the 'Bsort1' and 'Bsort2' authorized value categories. - Return to your patron search and confirm that "Sort 1" and "Sort 2" values are still being shown, though now it's the "raw" code. Created attachment 159561 [details] [review] Bug 34608: (follow-up) Display authorized values if used This patch shamelessly steals from Bug 33568 in order to allow the correct authorized value description to be shown in the JS-generated table of results for values of borrowers sort1 and sort2. To test, apply the patch and go to Administration -> Authorized values. - Add some values, if necessary, to both the 'Bsort1' and 'Bsort2' categories. - Locate some patron records to edit, and set the patron's "Sort 1" and "Sort 2" fields. - Perform a patron search which will return those patron records. - Confirm that the correct authorized value description is shown instead of the authorized value code. - Delete all values from the 'Bsort1' and 'Bsort2' authorized value categories. - Return to your patron search and confirm that "Sort 1" and "Sort 2" values are still being shown, though now it's the "raw" code. Signed-off-by: David Nind <david@davidnind.com> Can you rebase on top of bug 35329 please (PQA and will be pushed very soon)? I can help if needed. Created attachment 162592 [details] [review] Bug 34608: Add sort1 and sort2 to patron search results This patch adds the option of displaying patron "sort1" and "sort2" statistical fields in the patron module's main search results. The fields are hidden by default in the updated table configuration. To test, apply the patch and restart services. - Go to Patrons and perform a search. - You should not see columns for sort1 and sort2. - Under the "Columns" button you should see options to display sort1 and sort2. Confirm that they work to show and hide the columns. - Confirm that the sort1 and sort2 columns are sortable and searchable. - Go to Administration -> Table settings. - Under Patrons -> member, toggle the sort1 and sort1 "hidden by default" checkboxes and save the configuration. - Return to patron search results to confirm that the columns are now shown by default. Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Created attachment 162593 [details] [review] Bug 34608: (follow-up) Display authorized values if used This patch shamelessly steals from Bug 33568 in order to allow the correct authorized value description to be shown in the JS-generated table of results for values of borrowers sort1 and sort2. To test, apply the patch and go to Administration -> Authorized values. - Add some values, if necessary, to both the 'Bsort1' and 'Bsort2' categories. - Locate some patron records to edit, and set the patron's "Sort 1" and "Sort 2" fields. - Perform a patron search which will return those patron records. - Confirm that the correct authorized value description is shown instead of the authorized value code. - Delete all values from the 'Bsort1' and 'Bsort2' authorized value categories. - Return to your patron search and confirm that "Sort 1" and "Sort 2" values are still being shown, though now it's the "raw" code. Signed-off-by: David Nind <david@davidnind.com> Created attachment 165260 [details] [review] Bug 34608: (follow-up) Display authorized values if used This patch shamelessly steals from Bug 33568 in order to allow the correct authorized value description to be shown in the JS-generated table of results for values of borrowers sort1 and sort2. To test, apply the patch and go to Administration -> Authorized values. - Add some values, if necessary, to both the 'Bsort1' and 'Bsort2' categories. - Locate some patron records to edit, and set the patron's "Sort 1" and "Sort 2" fields. - Perform a patron search which will return those patron records. - Confirm that the correct authorized value description is shown instead of the authorized value code. - Delete all values from the 'Bsort1' and 'Bsort2' authorized value categories. - Return to your patron search and confirm that "Sort 1" and "Sort 2" values are still being shown, though now it's the "raw" code. Shouldn't we have a dropdown in the column filter if it's linked with bsort1 category? Otherwise we won't be able to search using the description. Created attachment 165360 [details] [review] Bug 34608: Display dropdown list if linked with AV cat If at least one AV exists for bsort1 we will show a dropdown list in the column filter for bsort1. Same for bsort2. Owen, does this make sense for you? Created attachment 165375 [details] [review] Bug 34608: Display dropdown list if linked with AV cat If at least one AV exists for bsort1 we will show a dropdown list in the column filter for bsort1. Same for bsort2. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 167789 [details] [review] Bug 34608: Display dropdown list if linked with AV cat If at least one AV exists for bsort1 we will show a dropdown list in the column filter for bsort1. Same for bsort2. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 170624 [details] [review] Bug 34608: Add sort1 and sort2 to patron search results This patch adds the option of displaying patron "sort1" and "sort2" statistical fields in the patron module's main search results. The fields are hidden by default in the updated table configuration. To test, apply the patch and restart services. - Go to Patrons and perform a search. - You should not see columns for sort1 and sort2. - Under the "Columns" button you should see options to display sort1 and sort2. Confirm that they work to show and hide the columns. - Confirm that the sort1 and sort2 columns are sortable and searchable. - Go to Administration -> Table settings. - Under Patrons -> member, toggle the sort1 and sort1 "hidden by default" checkboxes and save the configuration. - Return to patron search results to confirm that the columns are now shown by default. Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Created attachment 170625 [details] [review] Bug 34608: (follow-up) Display authorized values if used This patch shamelessly steals from Bug 33568 in order to allow the correct authorized value description to be shown in the JS-generated table of results for values of borrowers sort1 and sort2. To test, apply the patch and go to Administration -> Authorized values. - Add some values, if necessary, to both the 'Bsort1' and 'Bsort2' categories. - Locate some patron records to edit, and set the patron's "Sort 1" and "Sort 2" fields. - Perform a patron search which will return those patron records. - Confirm that the correct authorized value description is shown instead of the authorized value code. - Delete all values from the 'Bsort1' and 'Bsort2' authorized value categories. - Return to your patron search and confirm that "Sort 1" and "Sort 2" values are still being shown, though now it's the "raw" code. Created attachment 170626 [details] [review] Bug 34608: Display dropdown list if linked with AV cat If at least one AV exists for bsort1 we will show a dropdown list in the column filter for bsort1. Same for bsort2. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 170809 [details] [review] Bug 34608: Add sort1 and sort2 to patron search results This patch adds the option of displaying patron "sort1" and "sort2" statistical fields in the patron module's main search results. The fields are hidden by default in the updated table configuration. To test, apply the patch and restart services. - Go to Patrons and perform a search. - You should not see columns for sort1 and sort2. - Under the "Columns" button you should see options to display sort1 and sort2. Confirm that they work to show and hide the columns. - Confirm that the sort1 and sort2 columns are sortable and searchable. - Go to Administration -> Table settings. - Under Patrons -> member, toggle the sort1 and sort1 "hidden by default" checkboxes and save the configuration. - Return to patron search results to confirm that the columns are now shown by default. Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 170810 [details] [review] Bug 34608: (follow-up) Display authorized values if used This patch shamelessly steals from Bug 33568 in order to allow the correct authorized value description to be shown in the JS-generated table of results for values of borrowers sort1 and sort2. To test, apply the patch and go to Administration -> Authorized values. - Add some values, if necessary, to both the 'Bsort1' and 'Bsort2' categories. - Locate some patron records to edit, and set the patron's "Sort 1" and "Sort 2" fields. - Perform a patron search which will return those patron records. - Confirm that the correct authorized value description is shown instead of the authorized value code. - Delete all values from the 'Bsort1' and 'Bsort2' authorized value categories. - Return to your patron search and confirm that "Sort 1" and "Sort 2" values are still being shown, though now it's the "raw" code. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 170811 [details] [review] Bug 34608: Display dropdown list if linked with AV cat If at least one AV exists for bsort1 we will show a dropdown list in the column filter for bsort1. Same for bsort2. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 170812 [details] [review] Bug 34608: Deal with null values default values for sort1 and sort2 is NULL Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> When one of the bsort authorised value categories is used in combination, the filter on top changes to a drop down, which is really nice. But the data in the column is the AV code, not the description, so there is a mismatch that is confusing for search. The test plan claims this should work, but it didn't in my test :( I tried a restart_all as well as a private browser window. Created attachment 170936 [details] [review] Bug 34608: Display dropdown list if linked with AV cat If at least one AV exists for bsort1 we will show a dropdown list in the column filter for bsort1. Same for bsort2. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 170937 [details] [review] Bug 34608: Deal with null values default values for sort1 and sort2 is NULL Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (In reply to Katrin Fischer from comment #27) > When one of the bsort authorised value categories is used in combination, > the filter on top changes to a drop down, which is really nice. > But the data in the column is the AV code, not the description, so there is > a mismatch that is confusing for search. > > The test plan claims this should work, but it didn't in my test :( > > I tried a restart_all as well as a private browser window. Sorry, my bad. There was a swap between bsort1 and bsort2 in "Display dropdown list if linked with AV cat". Fixed now. This looks like it was missed in debugging? [% END %] + console.log(waiting_holds_barcodes); I've removed it. Pushed for 24.11! Well done everyone, thank you! |