Bug 18618

Summary: Mana - Add reading suggestions (crontab and scripts for Koha)
Product: Koha Reporter: Baptiste <baptiste.wojtkowski>
Component: Web servicesAssignee: Baptiste <baptiste.wojtkowski>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: alexbuckley, lisetteslatah, m.de.rooy, paul.poulain
Version: master   
Hardware: All   
OS: All   
Whiteboard:
Change sponsored?: --- Patch complexity: Medium patch
Bot Control: --- When did the bot last check this:
Who signed the patch off: Text to go in the release notes:
Bug Depends on: 17047    
Bug Blocks:    
Attachments: Bug 18618: Mana - Add scripts to send readings
Bug 18618: Mana - Add reading suggestion
Bug 18618: Add a pagination for suggestions
Bug 18618: Correct Plack issues
Bug 18618: Mana - Add scripts to send readings
Bug 18618: Mana - Add scripts to send readings
Bug 18618: Mana - Add reading suggestion
Bug 18618: Add a pagination for suggestions
Bug 18618: Correct Plack issues

Description Baptiste 2017-05-17 08:03:51 UTC

    
Comment 1 Baptiste 2017-05-17 08:13:31 UTC
Created attachment 63496 [details] [review]
Bug 18618: Mana - Add scripts to send readings

- There are 2 differents scripts:
misc/cronjobs/mana_send_pairs.pl -> please use it if Mana is installed
misc/cronjobs/mana_send_pairs_without_mana.pl -> designed to work if mana isn't enabled

- Both of scripts anonymize the datas and send them to mana.
Comment 2 Baptiste 2017-05-17 08:13:40 UTC
Created attachment 63497 [details] [review]
Bug 18618: Mana - Add reading suggestion

There is now a module to get suggestions from Mana.

- It is activated by default on Mana.
- When you browse on a notice, there is now a tab called "Suggestions"
- On click on the tab, it will check in the database if it has suggestions.
- Else, it will ask to Mana for suggestions and will store in the database.

- The suggestions are stored in the NEW table reading_pairs
- Implement new dbix objets: Reading_suggestion and Reading_suggestions
Comment 3 Paul Poulain 2017-06-01 13:06:36 UTC
FYI: we've setup this cron for one of our customer (a modified version, with hardcoded token). It's harvesting pairs since more than 2 weeks now.
We'll add 10 more in the next days. Most of them having about 100 to 1000 issues/day

The mana-side code is available here : https://git.biblibre.com/biblibre/koha-mana.
It's been deployed already on mana-kb and mana-test.koha-community.org (this has no consequence on existing API. It just add new routes for managing reading suggestions)
Comment 4 Baptiste 2017-06-22 08:55:38 UTC
Created attachment 64531 [details] [review]
Bug 18618: Add a pagination for suggestions

*** Suggestions are now sent from Mana as follows

- Koha requests the first 20 suggestions
- It processes them and estimates how much it will need to get all suggestions
- It requests Mana the number of suggestions needed
- It repeats the 3 first steps until
    (1) Mana doesn't have suggestions anymore
    (2) It got 10 suggestions to display

*** Koha interface is a bit more verbose while searching (just a bit).
Comment 5 Baptiste 2017-07-10 13:03:02 UTC
Created attachment 64960 [details] [review]
Bug 18618: Correct Plack issues

Split one command line into two in order to be accepted by Plack
Comment 6 Brendan Gallagher 2017-07-14 19:56:48 UTC
Created attachment 65066 [details] [review]
Bug 18618: Mana - Add scripts to send readings

- There are 2 differents scripts:
misc/cronjobs/mana_send_pairs.pl -> please use it if Mana is installed
misc/cronjobs/mana_send_pairs_without_mana.pl -> designed to work if mana isn't enabled

- Both of scripts anonymize the datas and send them to mana.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 7 Brendan Gallagher 2017-07-14 19:57:22 UTC
Created attachment 65067 [details] [review]
Bug 18618: Mana - Add scripts to send readings

- There are 2 differents scripts:
misc/cronjobs/mana_send_pairs.pl -> please use it if Mana is installed
misc/cronjobs/mana_send_pairs_without_mana.pl -> designed to work if mana isn't enabled

- Both of scripts anonymize the datas and send them to mana.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 8 Brendan Gallagher 2017-07-14 19:57:31 UTC
Created attachment 65068 [details] [review]
Bug 18618: Mana - Add reading suggestion

There is now a module to get suggestions from Mana.

- It is activated by default on Mana.
- When you browse on a notice, there is now a tab called "Suggestions"
- On click on the tab, it will check in the database if it has suggestions.
- Else, it will ask to Mana for suggestions and will store in the database.

- The suggestions are stored in the NEW table reading_pairs
- Implement new dbix objets: Reading_suggestion and Reading_suggestions

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 9 Brendan Gallagher 2017-07-14 19:57:34 UTC
Created attachment 65069 [details] [review]
Bug 18618: Add a pagination for suggestions

*** Suggestions are now sent from Mana as follows

- Koha requests the first 20 suggestions
- It processes them and estimates how much it will need to get all suggestions
- It requests Mana the number of suggestions needed
- It repeats the 3 first steps until
    (1) Mana doesn't have suggestions anymore
    (2) It got 10 suggestions to display

*** Koha interface is a bit more verbose while searching (just a bit).

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 10 Brendan Gallagher 2017-07-14 19:57:37 UTC
Created attachment 65070 [details] [review]
Bug 18618: Correct Plack issues

Split one command line into two in order to be accepted by Plack

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>