When there are more than 20 vendors in acquisitions, only 20 appear in the New agreement dropdown list. To recreate: 1. Enable the ERMModule system preference 2. In Acquisitions, create more than 20 vendors (see below for an sql insert that I used) 3. Go to E-resource management > Agreements > New agreement 4. Open the vendor dropdown --> It stops at Sierra (or the 20th vendor if you created your own) 5. Type "Tango" or "Zulu" (or one of the names of your 21st+ vendor) --> No results This is what I used to create all the vendors INSERT INTO aqbooksellers (name,active) VALUES ('Alpha','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Bravo','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Charlie','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Delta','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Echo','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Foxtrot','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Golf','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Hotel','1'); INSERT INTO aqbooksellers (name,active) VALUES ('India','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Juliet','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Kilo','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Lima','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Mike','1'); INSERT INTO aqbooksellers (name,active) VALUES ('November','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Oscar','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Papa','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Quebec','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Romeo','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Sierra','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Tango','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Uniform','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Victor','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Whiskey','1'); INSERT INTO aqbooksellers (name,active) VALUES ('X-Ray','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Yankee','1'); INSERT INTO aqbooksellers (name,active) VALUES ('Zulu','1'); Paul D. pointed me to the RESTdefaultPageSize system preference which does affect the dropdown. If I change the syspref to 50, I can see all the vendors in the dropdown. The problem with this is that I'm not sure what else this syspref affects. I have a client with 674 vendors, I don't want to put 1000 in the syspref and then somewhere else something takes forever to load because of this. I'm not sure what is happening here. I found bug 32474 and bug 32468 that seem to deal with this and that are marked as fixed, but I don't see the correct behaviour in ktd with master. I hope someone else can confirm or invalidate this... The client who pointed this out to me (the one with 674 vendors) is on 23.05.05, which already has the patches from bug 32468.
I bisected and found that it was due to bug 34219 which was added to 23.05.04 which makes sense because my client's 23.05.05 has the wrong behaviour.
Created attachment 163660 [details] [review] Bug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM In commit f1078daf8f496e1b4234acf766578c511ca8aad1 Bug 34219: Allow getAll to receive additional URL parameters We needed to call getAll instead of get to fetch all the vendors Test plan: Have more than 20 vendors and create/edit an agreement. Notice that the vendor list contains all the vendors
Created attachment 163671 [details] [review] Bug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM In commit f1078daf8f496e1b4234acf766578c511ca8aad1 Bug 34219: Allow getAll to receive additional URL parameters We needed to call getAll instead of get to fetch all the vendors Test plan: Have more than 20 vendors and create/edit an agreement. Notice that the vendor list contains all the vendors Signed-off-by: David Nind <david@davidnind.com>
I applied the patch to master, checking that I was up to date. I checked that the code had changed. Then I created more than 20 suppliers and when I go to E-resource management > Agreements > New agreement and click on the vendor dropdown. I still only get 20 results. If I change the RESTdefaultPageSize preference as Caroline says, then I can see all the vendors. Did I miss a step because I see that David signed Off?
Hi Matthias. A 'yarn build' is required after applying the patch for view-related changes (and I normally do a flush_memcached and restart_all) (this was using koha-testing-docker). David
Created attachment 163741 [details] [review] Bug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM In commit f1078daf8f496e1b4234acf766578c511ca8aad1 Bug 34219: Allow getAll to receive additional URL parameters We needed to call getAll instead of get to fetch all the vendors Test plan: Have more than 20 vendors and create/edit an agreement. Notice that the vendor list contains all the vendors Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matthias Le Gac <matthias.le-gac@inlibro.com>
Thanks after I yarn build and reload apache2 all works good.
Created attachment 163775 [details] [review] Bug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM In commit f1078daf8f496e1b4234acf766578c511ca8aad1 Bug 34219: Allow getAll to receive additional URL parameters We needed to call getAll instead of get to fetch all the vendors Test plan: Have more than 20 vendors and create/edit an agreement. Notice that the vendor list contains all the vendors Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matthias Le Gac <matthias.le-gac@inlibro.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06
Backported to 23.05.x for upcoming 23.05.12