Bug 33103: Add the ability to create vendor aliases
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 1 Mar 2023 10:57:23 +0000 (11:57 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 20 Apr 2023 18:48:36 +0000 (15:48 -0300)
commit5e3980502b10b6faebe93c2ff2a7ba95c736f836
tree5cc57158c07f78f2edf9d731ecf20e6c30020f52
parenta387b37c1c4d1a6e6138899691a32be42f5e382b
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Acquisition/Bookseller.pm
acqui/supplier.pl
acqui/updatesupplier.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt