Closed sabweb closed 2 years ago
Sounds like a defect.
Available in 2.1.0-beta2 release, https://github.com/ExLibrisGroup/alma-print-daemon/releases/tag/v2.1.0-beta2. Pre-release, use in test before rolling out to everyone.
I tested this new release, but I'm not sure that it change the lenght of the list. We cannot select all existing profile. Some are still missing in the list.
I checked the code. It makes sense. Maybe there is only a problem with .exe install file?
@Raphael-Rey, thanks for checking the code...good to have someone else review it. I'll see what I can figure out.
@Raphael-Rey, would it be possible for me to dig into this bug while connected to your Alma instance using your API key? If so, please email me directly; please do not post your API key here. I will only be testing the code that retrieves your Alma printers; it will not process any documents waiting to print. Thanks.
mark.gobat@clarivate.com
Dear Mark,
I tested the new version and it is now alright. We can retrieve the printers in any case.
Thank you very much for the fix.
Best regards,
Raphaël
Raphaël, thank you for your help!
-mark
Confirmed fixed in v2.1.0-beta3.
We noticed a problem recently where we can't make any changes to our Print Daemon 1.3.1 configuration anymore. The API key is reported as "valid", but the buttons "Add Printer Profile" and "Remove Printer Profile" stay disabled. There is no log file generated because we can't even complete this configuration step.
So my guess is that setRemovePrinterProfileButtonState() and setAddPrinterProfileButtonState() in configWindow.js do not get executed because an earlier step fails.
I looked at buildAlmaPrinterDisplayName() and it uses "almaPrinters.total_record_count" (from the JSON) for its loop. In our case, we have recently increased our number of printers in our Alma IZ and the "total_record_count" in our JSON is now "101". But the API request is hardcoded to "limit=100". So the loop in buildAlmaPrinterDisplayName() tries to process 101 printers, but it only gets the data for 100 printers.
Could that be a reason that the loop in buildAlmaPrinterDisplayName() never finishes and the rest of the configuration fails? We deleted two printers in our Alma IZ (so we now have "total_record_count" = 99) and now it's working again, so this supports our guess.
How does the Printer Deamon handle more than 100 printers? According to the API docs, another API request is necessary in this case with an "offset"-parameter, because the maximum value for the limit-parameter is 100. But I can't see any indication in the Print Daemon Code that it will do such additional API requests with an offset-parameter.