Bug 19689

Summary: Koha Offline Circulation Firefox plugin sends entries with wrong branchcode without error
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, matthias.meusburger
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 16497, 19752    
Bug Blocks:    

Description Katrin Fischer 2017-11-24 08:41:42 UTC
The problem that appears most often with the Koha Offline Circulation Plugin is that the libraries enter the wrong branchcode into the configuration. The plugin will send those entries to Koha and they are added to the pending_offline_operations table, but can't be seen in the GUI.
It would be nice if the tool showed an error message instead as the only way to fix those entries is with SQL.
Comment 1 Matthias Meusburger 2017-11-24 09:24:40 UTC
That would need some work in Koha.

Either by having a REST api that would allow the KOCT plugin to check if the branchcode is valid when saving the extension preferences.

Or by modifying the *OfflineOperation functions in C4/Circulation.pm to return an error when the branchcode is invalid.

By the way, another enhancement would be to return appropriate http error codes (like 401 when the authentication fails) because currently Koha always returns 200.
Comment 2 Matthias Meusburger 2017-11-24 09:26:48 UTC
> Either by having a REST api that would allow the KOCT plugin to check if the
> branchcode is valid when saving the extension preferences.

Or better: by having a REST api that would allow to retrieve branches, so the extension can have them in a dropdown list.
Comment 3 Katrin Fischer 2017-11-24 13:58:25 UTC
Both sound good to me - error codes might be the easier to do for now.

We had at least 3 libraries running into this now.
Comment 4 Matthias Meusburger 2017-12-05 16:18:20 UTC
The KOCT firefox plugin will add a dropdown list with valid branches and have better configuration errors handling when the related bugs will be available in Koha (16497 and 19752)
Comment 5 Katrin Fischer 2017-12-06 06:52:36 UTC
yay!
Comment 6 Matthias Meusburger 2018-12-12 15:05:01 UTC
Before Bug 16497 is pushed, koct can use this koha api plugin: https://git.biblibre.com/biblibre/koha-plugin-libraries-api to retrieve libraries in a dropdown list, starting from koct 4.0.18
Comment 7 Katrin Fischer 2019-06-17 21:59:07 UTC
This is fixed with current versions of Koha and the KOCT Firefox plugin. Once the URL and login are tested, there is now a nice pull down with the available branches from the connected installation. 

Thx Matts!