Bug 33103 - Add vendor aliases
Summary: Add vendor aliases
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low new feature (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 33480 33104 33355
  Show dependency treegraph
 
Reported: 2023-03-01 09:58 UTC by Jonathan Druart
Modified: 2023-07-03 16:07 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/681
Text to go in the release notes:
This allows to create aliases for a vendor. The aliases can be former names or different spellings of the name. Once added they will display on the vendor detail page. And they will be included in search when searching by a vendor's name.
Version(s) released in:
23.05.00


Attachments
Bug 33103: DB changes (2.85 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DBIC changes (3.34 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DBIC specific (1001 bytes, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Koha classes (2.99 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Add tests for Aliases Koha classes (1.39 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Add the ability to create vendor aliases (8.29 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Make vendors searchable by aliases (1.11 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Embed aliases in GET /vendors (3.00 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Add REST API tests (1.55 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Display the aliases in the dropdown list in ERM (4.78 KB, patch)
2023-03-02 14:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DB changes (2.91 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: DBIC changes (3.40 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: DBIC specific (1.04 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Koha classes (3.04 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Add tests for Aliases Koha classes (1.45 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Add the ability to create vendor aliases (8.34 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Make vendors searchable by aliases (1.17 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Embed aliases in GET /vendors (3.05 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Add REST API tests (1.61 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Display the aliases in the dropdown list in ERM (4.83 KB, patch)
2023-03-02 16:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33103: Deal with html tags (2.01 KB, patch)
2023-03-07 11:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DB changes (2.91 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DBIC changes (3.40 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DBIC specific (1.04 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Koha classes (3.05 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Add tests for Aliases Koha classes (1.45 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Add the ability to create vendor aliases (8.35 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Make vendors searchable by aliases (1.17 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Embed aliases in GET /vendors (3.06 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Add REST API tests (1.61 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Display the aliases in the dropdown list in ERM (4.85 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Deal with html tags (2.01 KB, patch)
2023-03-21 13:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Fix accessibility issues (1.71 KB, patch)
2023-04-11 07:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Prevent vendors to be displayed several times in the search result (697 bytes, patch)
2023-04-11 09:44 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DB changes (2.91 KB, patch)
2023-04-11 21:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: DBIC changes (3.40 KB, patch)
2023-04-11 21:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: DBIC specific (1.04 KB, patch)
2023-04-11 21:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Koha classes (3.04 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Add tests for Aliases Koha classes (1.45 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Add the ability to create vendor aliases (8.34 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Make vendors searchable by aliases (1.17 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Embed aliases in GET /vendors (3.05 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Add REST API tests (1.61 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Display the aliases in the dropdown list in ERM (4.84 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Deal with html tags (2.01 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Fix accessibility issues (1.76 KB, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Prevent vendors to be displayed several times in the search result (752 bytes, patch)
2023-04-11 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33103: Display the aliases in the dropdown list in ERM (5.13 KB, patch)
2023-04-13 15:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Deal with html tags (2.01 KB, patch)
2023-04-13 15:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Fix accessibility issues (1.76 KB, patch)
2023-04-13 15:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Prevent vendors to be displayed several times in the search result (754 bytes, patch)
2023-04-13 15:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: Rename aqbookseller_aliases.id with alias_id (3.04 KB, patch)
2023-04-14 06:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DBIC changes (1.56 KB, patch)
2023-04-14 06:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33103: DBIC schema changes (1.37 KB, patch)
2023-04-18 06:56 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-03-01 09:58:42 UTC
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.
Comment 1 Jonathan Druart 2023-03-02 14:34:26 UTC
Created attachment 147621 [details] [review]
Bug 33103: DB changes
Comment 2 Jonathan Druart 2023-03-02 14:34:29 UTC
Created attachment 147622 [details] [review]
Bug 33103: DBIC changes
Comment 3 Jonathan Druart 2023-03-02 14:34:32 UTC
Created attachment 147623 [details] [review]
Bug 33103: DBIC specific
Comment 4 Jonathan Druart 2023-03-02 14:34:35 UTC
Created attachment 147624 [details] [review]
Bug 33103: Koha classes
Comment 5 Jonathan Druart 2023-03-02 14:34:37 UTC
Created attachment 147625 [details] [review]
Bug 33103: Add tests for Aliases Koha classes
Comment 6 Jonathan Druart 2023-03-02 14:34:40 UTC
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
Comment 7 Jonathan Druart 2023-03-02 14:34:43 UTC
Created attachment 147627 [details] [review]
Bug 33103: Make vendors searchable by aliases
Comment 8 Jonathan Druart 2023-03-02 14:34:45 UTC
Created attachment 147628 [details] [review]
Bug 33103: Embed aliases in GET /vendors
Comment 9 Jonathan Druart 2023-03-02 14:34:49 UTC
Created attachment 147629 [details] [review]
Bug 33103: Add REST API tests
Comment 10 Jonathan Druart 2023-03-02 14:34:51 UTC
Created attachment 147630 [details] [review]
Bug 33103: Display the aliases in the dropdown list in ERM
Comment 11 PTFS Europe Sandboxes 2023-03-02 16:12:25 UTC
Created attachment 147645 [details] [review]
Bug 33103: DB changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 12 PTFS Europe Sandboxes 2023-03-02 16:12:28 UTC
Created attachment 147646 [details] [review]
Bug 33103: DBIC changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 13 PTFS Europe Sandboxes 2023-03-02 16:12:30 UTC
Created attachment 147647 [details] [review]
Bug 33103: DBIC specific

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 14 PTFS Europe Sandboxes 2023-03-02 16:12:33 UTC
Created attachment 147648 [details] [review]
Bug 33103: Koha classes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 15 PTFS Europe Sandboxes 2023-03-02 16:12:36 UTC
Created attachment 147649 [details] [review]
Bug 33103: Add tests for Aliases Koha classes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 16 PTFS Europe Sandboxes 2023-03-02 16:12:40 UTC
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>
Comment 17 PTFS Europe Sandboxes 2023-03-02 16:12:43 UTC
Created attachment 147651 [details] [review]
Bug 33103: Make vendors searchable by aliases

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 18 PTFS Europe Sandboxes 2023-03-02 16:12:46 UTC
Created attachment 147652 [details] [review]
Bug 33103: Embed aliases in GET /vendors

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 19 PTFS Europe Sandboxes 2023-03-02 16:12:50 UTC
Created attachment 147653 [details] [review]
Bug 33103: Add REST API tests

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 20 PTFS Europe Sandboxes 2023-03-02 16:12:53 UTC
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>
Comment 21 Jonathan Druart 2023-03-03 06:57:05 UTC
I need to investigate possible XSS here.
Comment 22 Jonathan Druart 2023-03-07 11:55:35 UTC
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.
Comment 23 Jonathan Druart 2023-03-21 13:11:17 UTC
Created attachment 148448 [details] [review]
Bug 33103: DB changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 24 Jonathan Druart 2023-03-21 13:11:19 UTC
Created attachment 148449 [details] [review]
Bug 33103: DBIC changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 25 Jonathan Druart 2023-03-21 13:11:22 UTC
Created attachment 148450 [details] [review]
Bug 33103: DBIC specific

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 26 Jonathan Druart 2023-03-21 13:11:24 UTC
Created attachment 148451 [details] [review]
Bug 33103: Koha classes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 27 Jonathan Druart 2023-03-21 13:11:27 UTC
Created attachment 148452 [details] [review]
Bug 33103: Add tests for Aliases Koha classes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 28 Jonathan Druart 2023-03-21 13:11:30 UTC
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>
Comment 29 Jonathan Druart 2023-03-21 13:11:32 UTC
Created attachment 148454 [details] [review]
Bug 33103: Make vendors searchable by aliases

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 30 Jonathan Druart 2023-03-21 13:11:35 UTC
Created attachment 148455 [details] [review]
Bug 33103: Embed aliases in GET /vendors

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 31 Jonathan Druart 2023-03-21 13:11:37 UTC
Created attachment 148456 [details] [review]
Bug 33103: Add REST API tests

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 32 Jonathan Druart 2023-03-21 13:11:40 UTC
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>
Comment 33 Jonathan Druart 2023-03-21 13:11:43 UTC
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.
Comment 34 Katrin Fischer 2023-04-09 14:41:04 UTC
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.
Comment 35 Jonathan Druart 2023-04-11 07:56:30 UTC
(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?
Comment 36 Jonathan Druart 2023-04-11 07:56:43 UTC
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
Comment 37 Jonathan Druart 2023-04-11 09:06:27 UTC
(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.
Comment 38 Katrin Fischer 2023-04-11 09:07:21 UTC
(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!
Comment 39 Jonathan Druart 2023-04-11 09:44:47 UTC
Created attachment 149419 [details] [review]
Bug 33103: Prevent vendors to be displayed several times in the search result
Comment 40 Katrin Fischer 2023-04-11 21:00:52 UTC
Created attachment 149479 [details] [review]
Bug 33103: DB changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 41 Katrin Fischer 2023-04-11 21:00:56 UTC
Created attachment 149480 [details] [review]
Bug 33103: DBIC changes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 42 Katrin Fischer 2023-04-11 21:00:59 UTC
Created attachment 149481 [details] [review]
Bug 33103: DBIC specific

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 43 Katrin Fischer 2023-04-11 21:01:03 UTC
Created attachment 149482 [details] [review]
Bug 33103: Koha classes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 44 Katrin Fischer 2023-04-11 21:01:06 UTC
Created attachment 149483 [details] [review]
Bug 33103: Add tests for Aliases Koha classes

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 45 Katrin Fischer 2023-04-11 21:01:09 UTC
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>
Comment 46 Katrin Fischer 2023-04-11 21:01:12 UTC
Created attachment 149485 [details] [review]
Bug 33103: Make vendors searchable by aliases

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 47 Katrin Fischer 2023-04-11 21:01:16 UTC
Created attachment 149486 [details] [review]
Bug 33103: Embed aliases in GET /vendors

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 48 Katrin Fischer 2023-04-11 21:01:19 UTC
Created attachment 149487 [details] [review]
Bug 33103: Add REST API tests

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Comment 49 Katrin Fischer 2023-04-11 21:01:22 UTC
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>
Comment 50 Katrin Fischer 2023-04-11 21:01:25 UTC
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.
Comment 51 Katrin Fischer 2023-04-11 21:01:28 UTC
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>
Comment 52 Katrin Fischer 2023-04-11 21:01:31 UTC
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>
Comment 53 Jonathan Druart 2023-04-13 15:06:18 UTC
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>
Comment 54 Jonathan Druart 2023-04-13 15:06:21 UTC
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.
Comment 55 Jonathan Druart 2023-04-13 15:06:24 UTC
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>
Comment 56 Jonathan Druart 2023-04-13 15:06:28 UTC
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>
Comment 57 Jonathan Druart 2023-04-14 06:06:33 UTC
Created attachment 149629 [details] [review]
Bug 33103: Rename aqbookseller_aliases.id with alias_id
Comment 58 Jonathan Druart 2023-04-14 06:06:36 UTC
Created attachment 149630 [details] [review]
Bug 33103: DBIC changes
Comment 59 Jonathan Druart 2023-04-14 06:15:46 UTC
Rename asked by Tomas.
Comment 60 Jonathan Druart 2023-04-18 06:56:18 UTC
Created attachment 149788 [details] [review]
Bug 33103: DBIC schema changes
Comment 61 Jonathan Druart 2023-04-18 06:56:57 UTC
I've got a very weird git conflict with the previous patch, it was trying to modify Koha/Schema/Result/CurbsidePickupIssue.pm (??)
Comment 62 Tomás Cohen Arazi 2023-04-20 18:48:21 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 63 Martin Renvoize 2023-05-11 10:29:32 UTC
This is a great enhancement, but not one for backport I'm afraid

Marking Needs documenting :)