Add the ability to search for aliases in the vendor search. Search for “ALA” would find “American Library Association”. One or more aliases could be associated with a vendor.
Created attachment 147621 [details] [review] Bug 33103: DB changes
Created attachment 147622 [details] [review] Bug 33103: DBIC changes
Created attachment 147623 [details] [review] Bug 33103: DBIC specific
Created attachment 147624 [details] [review] Bug 33103: Koha classes
Created attachment 147625 [details] [review] Bug 33103: Add tests for Aliases Koha classes
Created attachment 147626 [details] [review] Bug 33103: Add the ability to create vendor aliases This patchset is adding the ability to create aliases for vendors. It will then be easier to search for vendors. * new DB table aqbookseller_aliases(id, vendor_id, alias) * new pair of Koha classes Koha::Acquisition::Bookseller::Alias[es] * new method to retrieve the aliases from the vendor Koha::Acquisition::Bookseller->aliases * The api spec changes to allow aliases to be embeded on GET /acquisitions/vendors * Add/Delete alias when editing a vendor * Display the aliases on the vendor show view * Search vendors by aliases * Display the aliases in the dropdown list of the vendors in the ERM module Test plan: - Create a vendor, add it some aliases - Edit the vendor, remove some aliases => Behaviour must be consistent - Search the vendor in the acquisition module by its aliases => The vendor must be returned in the result - Go to the ERM module, add a new agreement or license => Notice that the dropdown list of the vendors is displaying the aliases, that make vendors searchable by their aliases
Created attachment 147627 [details] [review] Bug 33103: Make vendors searchable by aliases
Created attachment 147628 [details] [review] Bug 33103: Embed aliases in GET /vendors
Created attachment 147629 [details] [review] Bug 33103: Add REST API tests
Created attachment 147630 [details] [review] Bug 33103: Display the aliases in the dropdown list in ERM
Created attachment 147645 [details] [review] Bug 33103: DB changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147646 [details] [review] Bug 33103: DBIC changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147647 [details] [review] Bug 33103: DBIC specific Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147648 [details] [review] Bug 33103: Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147649 [details] [review] Bug 33103: Add tests for Aliases Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147650 [details] [review] Bug 33103: Add the ability to create vendor aliases This patchset is adding the ability to create aliases for vendors. It will then be easier to search for vendors. * new DB table aqbookseller_aliases(id, vendor_id, alias) * new pair of Koha classes Koha::Acquisition::Bookseller::Alias[es] * new method to retrieve the aliases from the vendor Koha::Acquisition::Bookseller->aliases * The api spec changes to allow aliases to be embeded on GET /acquisitions/vendors * Add/Delete alias when editing a vendor * Display the aliases on the vendor show view * Search vendors by aliases * Display the aliases in the dropdown list of the vendors in the ERM module Test plan: - Create a vendor, add it some aliases - Edit the vendor, remove some aliases => Behaviour must be consistent - Search the vendor in the acquisition module by its aliases => The vendor must be returned in the result - Go to the ERM module, add a new agreement or license => Notice that the dropdown list of the vendors is displaying the aliases, that make vendors searchable by their aliases Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147651 [details] [review] Bug 33103: Make vendors searchable by aliases Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147652 [details] [review] Bug 33103: Embed aliases in GET /vendors Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147653 [details] [review] Bug 33103: Add REST API tests Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 147654 [details] [review] Bug 33103: Display the aliases in the dropdown list in ERM Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
I need to investigate possible XSS here.
Created attachment 147827 [details] [review] Bug 33103: Deal with html tags HTML tags won't be interpreted. However <script> will still break the display, but it's by nature, JS will execute it even if it's in a string.
Created attachment 148448 [details] [review] Bug 33103: DB changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148449 [details] [review] Bug 33103: DBIC changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148450 [details] [review] Bug 33103: DBIC specific Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148451 [details] [review] Bug 33103: Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148452 [details] [review] Bug 33103: Add tests for Aliases Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148453 [details] [review] Bug 33103: Add the ability to create vendor aliases This patchset is adding the ability to create aliases for vendors. It will then be easier to search for vendors. * new DB table aqbookseller_aliases(id, vendor_id, alias) * new pair of Koha classes Koha::Acquisition::Bookseller::Alias[es] * new method to retrieve the aliases from the vendor Koha::Acquisition::Bookseller->aliases * The api spec changes to allow aliases to be embeded on GET /acquisitions/vendors * Add/Delete alias when editing a vendor * Display the aliases on the vendor show view * Search vendors by aliases * Display the aliases in the dropdown list of the vendors in the ERM module Test plan: - Create a vendor, add it some aliases - Edit the vendor, remove some aliases => Behaviour must be consistent - Search the vendor in the acquisition module by its aliases => The vendor must be returned in the result - Go to the ERM module, add a new agreement or license => Notice that the dropdown list of the vendors is displaying the aliases, that make vendors searchable by their aliases Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148454 [details] [review] Bug 33103: Make vendors searchable by aliases Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148455 [details] [review] Bug 33103: Embed aliases in GET /vendors Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148456 [details] [review] Bug 33103: Add REST API tests Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148457 [details] [review] Bug 33103: Display the aliases in the dropdown list in ERM Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 148458 [details] [review] Bug 33103: Deal with html tags HTML tags won't be interpreted. However <script> will still break the display, but it's by nature, JS will execute it even if it's in a string.
1) Please check: OK Koha/Acquisition/Bookseller.pm FAIL Koha/Acquisition/Bookseller/Alias.pm FAIL pod coverage POD coverage was greater before, try perl -MPod::Coverage=PackageName -e666 OK Koha/Acquisition/Bookseller/Aliases.pm OK Koha/Schema/Result/Aqbookseller.pm FAIL Koha/Schema/Result/AqbooksellerAlias.pm FAIL pod coverage POD is missing for koha_object_class POD is missing for koha_objects_class 2) Vendor detail page * We should add some space between the the alias name and the trash * More important: it needs at least a tool tip, right now it's a big accessibility issue. I believe with aria-hidden=true it will actually be invisible to screen readers? * Same goes for the Plus icon to add another field: space and accessibility. * When you click 'enter' in the field, the form submits 'save' and you are back on the detail page, but the alias was not saved. 3) Other features * Search and display in the aquisition module work nicely 4) ERM module I am not persuaded by the display tbh, I believe it will get messy very soon as often those aliases will be quite long and we might even want to record a slight name change. Could it be an option to show the aliases in the list as "second level" entries, kind of a hiearchical display, like we have it for funds? I know that CORAL uses the aliases also for matching in some form (I believe when importing data), so it will be really nice to have this feature.
(In reply to Katrin Fischer from comment #34) Thanks, Katrin! > 1) Please check: > FAIL Koha/Acquisition/Bookseller/Alias.pm > FAIL pod coverage > POD coverage was greater before, try perl -MPod::Coverage=PackageName -e666 False positive. > OK Koha/Acquisition/Bookseller/Aliases.pm > OK Koha/Schema/Result/Aqbookseller.pm > FAIL Koha/Schema/Result/AqbooksellerAlias.pm > FAIL pod coverage > POD is missing for koha_object_class > POD is missing for koha_objects_class POD is always missing for those methods. Nothing to worry here. > 2) Vendor detail page > > * We should add some space between the the alias name and the trash > * More important: it needs at least a tool tip, right now it's a big > accessibility issue. I believe with aria-hidden=true it will actually be > invisible to screen readers? > * Same goes for the Plus icon to add another field: space and accessibility. > * When you click 'enter' in the field, the form submits 'save' and you are > back on the detail page, but the alias was not saved. Fixed in "Fix accessibility issues" > 3) Other features > > * Search and display in the aquisition module work nicely > > 4) ERM module > > I am not persuaded by the display tbh, I believe it will get messy very soon > as often those aliases will be quite long and we might even want to record a > slight name change. > > Could it be an option to show the aliases in the list as "second level" > entries, kind of a hiearchical display, like we have it for funds? > > > I know that CORAL uses the aliases also for matching in some form (I believe > when importing data), so it will be really nice to have this feature. It was the easiest approach to make the filtering works in the ERM module. Could we move that to its own bug?
Created attachment 149414 [details] [review] Bug 33103: Fix accessibility issues * Add spaces * Add 'Add' and 'Remove' in addition of the icons * Do not submit the form when enter is hit * Fix translatability
(In reply to Jonathan Druart from comment #35) > (In reply to Katrin Fischer from comment #34) > It was the easiest approach to make the filtering works in the ERM module. > Could we move that to its own bug? Opened bug 33480.
(In reply to Jonathan Druart from comment #37) > (In reply to Jonathan Druart from comment #35) > > (In reply to Katrin Fischer from comment #34) > > It was the easiest approach to make the filtering works in the ERM module. > > Could we move that to its own bug? > > Opened bug 33480. Makes sense. I'll try to get back to this asap, but if someone wants to steal it, that's also ok!
Created attachment 149419 [details] [review] Bug 33103: Prevent vendors to be displayed several times in the search result
Created attachment 149479 [details] [review] Bug 33103: DB changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149480 [details] [review] Bug 33103: DBIC changes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149481 [details] [review] Bug 33103: DBIC specific Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149482 [details] [review] Bug 33103: Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149483 [details] [review] Bug 33103: Add tests for Aliases Koha classes Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149484 [details] [review] Bug 33103: Add the ability to create vendor aliases This patchset is adding the ability to create aliases for vendors. It will then be easier to search for vendors. * new DB table aqbookseller_aliases(id, vendor_id, alias) * new pair of Koha classes Koha::Acquisition::Bookseller::Alias[es] * new method to retrieve the aliases from the vendor Koha::Acquisition::Bookseller->aliases * The api spec changes to allow aliases to be embeded on GET /acquisitions/vendors * Add/Delete alias when editing a vendor * Display the aliases on the vendor show view * Search vendors by aliases * Display the aliases in the dropdown list of the vendors in the ERM module Test plan: - Create a vendor, add it some aliases - Edit the vendor, remove some aliases => Behaviour must be consistent - Search the vendor in the acquisition module by its aliases => The vendor must be returned in the result - Go to the ERM module, add a new agreement or license => Notice that the dropdown list of the vendors is displaying the aliases, that make vendors searchable by their aliases Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149485 [details] [review] Bug 33103: Make vendors searchable by aliases Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149486 [details] [review] Bug 33103: Embed aliases in GET /vendors Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149487 [details] [review] Bug 33103: Add REST API tests Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149488 [details] [review] Bug 33103: Display the aliases in the dropdown list in ERM Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149489 [details] [review] Bug 33103: Deal with html tags HTML tags won't be interpreted. However <script> will still break the display, but it's by nature, JS will execute it even if it's in a string.
Created attachment 149490 [details] [review] Bug 33103: Fix accessibility issues * Add spaces * Add 'Add' and 'Remove' in addition of the icons * Do not submit the form when enter is hit * Fix translatability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 149491 [details] [review] Bug 33103: Prevent vendors to be displayed several times in the search result Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 149606 [details] [review] Bug 33103: Display the aliases in the dropdown list in ERM Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Created attachment 149607 [details] [review] Bug 33103: Deal with html tags HTML tags won't be interpreted. However <script> will still break the display, but it's by nature, JS will execute it even if it's in a string.
Created attachment 149608 [details] [review] Bug 33103: Fix accessibility issues * Add spaces * Add 'Add' and 'Remove' in addition of the icons * Do not submit the form when enter is hit * Fix translatability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 149609 [details] [review] Bug 33103: Prevent vendors to be displayed several times in the search result Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 149629 [details] [review] Bug 33103: Rename aqbookseller_aliases.id with alias_id
Created attachment 149630 [details] [review] Bug 33103: DBIC changes
Rename asked by Tomas.
Created attachment 149788 [details] [review] Bug 33103: DBIC schema changes
I've got a very weird git conflict with the previous patch, it was trying to modify Koha/Schema/Result/CurbsidePickupIssue.pm (??)
Pushed to master for 23.05. Nice work everyone, thanks!
This is a great enhancement, but not one for backport I'm afraid Marking Needs documenting :)