Bug 17047 - Mana Knowledge Base : share data
Summary: Mana Knowledge Base : share data
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Baptiste
QA Contact: Kyle M Hall
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 18618 18922
  Show dependency treegraph
 
Reported: 2016-08-04 07:20 UTC by morgane alonso
Modified: 2018-01-23 08:30 UTC (History)
18 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Large patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 17047 add mana syspref (3.94 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 ability to search subscription model on mana (16.85 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 ability to share a subscription to mana (20.95 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 ability to import a subscription model from mana (77.68 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2016-10-11 13:09 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Use Koha::Libraries instead of GetBranches (1.17 KB, patch)
2016-10-11 13:09 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Don't create numberpattern if the same exists (5.45 KB, patch)
2017-02-01 11:08 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Remove action column from mana search result table (1.83 KB, patch)
2017-02-01 11:08 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Don't show action column (use link) on mana search page (2.80 KB, patch)
2017-02-06 14:10 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (75.39 KB, patch)
2017-04-05 14:36 UTC, Baptiste
Details | Splinter Review
Bug 17047 add mana syspref (3.94 KB, patch)
2017-04-11 14:13 UTC, Baptiste
Details | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2017-04-11 14:13 UTC, Baptiste
Details | Splinter Review
Bug 17047 ability to search subscription model on mana (16.85 KB, patch)
2017-04-11 14:13 UTC, Baptiste
Details | Splinter Review
Bug 17047 ability to share a subscription to mana (20.96 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Splinter Review
Bug 17047 ability to import a subscription model from mana (77.68 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Splinter Review
Bug 17047 - Use Koha::Libraries instead of GetBranches (1.17 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Splinter Review
Bug 17047 - Don't create numberpattern if the same exists (5.45 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Splinter Review
Bug 17047 - Don't show action column (use link) on mana search page (2.80 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (75.48 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (73.40 KB, patch)
2017-04-12 10:37 UTC, Baptiste
Details | Splinter Review
Bug 17047: Add security token against spam, Rework messages from Mana. (28.87 KB, patch)
2017-04-20 12:19 UTC, Baptiste
Details | Splinter Review
Bug 17047: Add security token against spam, Rework messages from Mana. (30.03 KB, patch)
2017-04-20 14:36 UTC, Baptiste
Details | Splinter Review
Bug 17047: Add security token against spam, Rework messages from Mana. (32.37 KB, patch)
2017-04-20 16:06 UTC, Baptiste
Details | Splinter Review
Bug 17047: minor corrections on report share (1.83 KB, patch)
2017-04-21 16:40 UTC, Baptiste
Details | Splinter Review
Bug 17047 add mana syspref (3.94 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 ability to search subscription model on mana (16.85 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 ability to share a subscription to mana (20.96 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 ability to import a subscription model from mana (77.68 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 - Use Koha::Libraries instead of GetBranches (1.17 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 - Don't create numberpattern if the same exists (5.45 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 - Don't show action column (use link) on mana search page (2.80 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (73.40 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047: Add security token against spam, Rework messages from Mana. (32.37 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047: minor corrections on report share (1.83 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Splinter Review
Bug 17047: Add report_group as shared attribute (708 bytes, patch)
2017-04-24 08:27 UTC, Baptiste
Details | Splinter Review
Bug 17047 add mana syspref (3.94 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 ability to search subscription model on mana (17.12 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 ability to share a subscription to mana (20.96 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 ability to import a subscription model from mana (77.68 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 - Don't create numberpattern if the same exists (5.45 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2017-04-24 13:16 UTC, Paul Poulain
Details | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (73.80 KB, patch)
2017-04-24 13:16 UTC, Paul Poulain
Details | Splinter Review
Bug 17047: Add security token against spam, Rework messages from Mana. (32.37 KB, patch)
2017-04-24 13:16 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (119.90 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.84 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.23 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Splinter Review
Mana-KB documentation (467.67 KB, application/vnd.oasis.opendocument.text)
2017-04-27 08:55 UTC, Paul Poulain
Details
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-05-15 14:25 UTC, Baptiste
Details | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-05-22 08:42 UTC, Baptiste
Details | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-05-22 14:56 UTC, Baptiste
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (119.90 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.74 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (18.64 KB, patch)
2017-06-21 07:41 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (18.97 KB, patch)
2017-06-22 08:52 UTC, Baptiste
Details | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 08:23 UTC, Baptiste
Details | Splinter Review
Bug 17047: subscriptions management with Mana-KB (113.25 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (70.30 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.57 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (18.89 KB, patch)
2017-06-26 08:25 UTC, Baptiste
Details | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 09:06 UTC, Baptiste
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (129.99 KB, patch)
2017-06-26 09:06 UTC, Baptiste
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 09:06 UTC, Baptiste
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.24 KB, patch)
2017-06-26 09:07 UTC, Baptiste
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-06-26 09:07 UTC, Baptiste
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (3.43 KB, patch)
2017-06-26 09:07 UTC, Baptiste
Details | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 09:09 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (18.85 KB, patch)
2017-06-26 09:11 UTC, Baptiste
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (18.76 KB, patch)
2017-06-26 09:21 UTC, Baptiste
Details | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 09:29 UTC, Baptiste
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (18.76 KB, patch)
2017-06-26 09:29 UTC, Baptiste
Details | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 09:31 UTC, Baptiste
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (18.76 KB, patch)
2017-06-26 09:32 UTC, Baptiste
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 09:32 UTC, Baptiste
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.24 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (3.43 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (18.85 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 13:44 UTC, Baptiste
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (129.99 KB, patch)
2017-06-26 13:44 UTC, Baptiste
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 13:44 UTC, Baptiste
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.24 KB, patch)
2017-06-26 13:45 UTC, Baptiste
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-06-26 13:45 UTC, Baptiste
Details | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 13:45 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (18.84 KB, patch)
2017-06-26 13:46 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (19.55 KB, patch)
2017-06-28 15:03 UTC, Baptiste
Details | Splinter Review
Bug 17047: Minor changes (2.02 KB, patch)
2017-07-10 13:05 UTC, Baptiste
Details | Splinter Review
Bug 17047 add Mana-KB syspref (4.01 KB, patch)
2017-07-14 17:56 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (130.06 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.63 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.30 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.94 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047: Correct encoding issues (953 bytes, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047: Minor changes (19.62 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047: Minor changes (2.08 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Splinter Review
Bug 17047 [QA Followup] - Misc minor fixes (2.50 KB, patch)
2017-08-09 17:54 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 - Fix an error when cretaing subscription (888 bytes, patch)
2017-08-31 10:26 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Fix mana search (2.20 KB, patch)
2017-08-31 10:27 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures (8.38 KB, patch)
2017-09-08 13:29 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures (8.38 KB, patch)
2017-09-08 17:22 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Fix up database schema change, add to kohastructure.sql (2.20 KB, patch)
2017-09-08 17:22 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Update schema files (2.54 KB, patch)
2017-09-08 17:23 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Remove javascript debugger call (1.03 KB, patch)
2017-09-08 17:23 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (130.11 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.69 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.36 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.99 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047: Correct encoding issues (1010 bytes, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047: Minor changes (19.68 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047: Minor changes (2.14 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Misc minor fixes (2.54 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 - Fix an error when cretaing subscription (944 bytes, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 - Fix mana search (2.25 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures (8.43 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Fix up database schema change, add to kohastructure.sql (2.25 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Update schema files (2.59 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 [QA Followup] - Remove javascript debugger call (1.08 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2017-11-08 16:11 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.94 KB, patch)
2017-11-08 16:11 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.32 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.99 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047: Minor changes (24.84 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures - Fix up database schema change, add to kohastructure.sql - Update schema files - Remove javascript debugger call (13.45 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - [QA Followup] - Fix untranslatable strings - Remove onclick html attribute - Remove useless passing of mana_id variable in serials-toolbar.inc - Remove using CGI::param in list context - remove new subs from serials/subscription-add. (59.81 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - [QA Followup] - Fix untranslatable strings - Remove onclick html attribute - Remove useless passing of mana_id variable in serials-toolbar.inc - Remove using CGI::param in list context - remove new subs from serials/subscription-add. (61.45 KB, patch)
2017-11-08 16:18 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (21.07 KB, patch)
2017-11-10 14:47 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 subscriptions management with Mana-KB (135.23 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 SQL reports management with Mana-KB (75.04 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.30 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047: Minor changes (25.50 KB, patch)
2017-12-29 14:40 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures - Fix up database schema change, add to kohastructure.sql - Update schema files - Remove javascript debugger call (12.69 KB, patch)
2017-12-29 14:40 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - [QA Followup] - Fix untranslatable strings - Remove onclick html attribute - Remove useless passing of mana_id variable in serials-toolbar.inc - Remove using CGI::param in list context - remove new subs from serials/subscription-add.pl - remov (62.68 KB, patch)
2017-12-29 14:40 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.71 KB, patch)
2017-12-29 14:40 UTC, Alex Arnaud
Details | Splinter Review
Bug 17047 - Fix template code in subscription-add.js Fix errors when saving a serial Provide a more visible message when sharing a report without note Fix Internal server error when trying to share a new report Make update DB idempotent (15.88 KB, patch)
2018-01-16 16:26 UTC, Alex Arnaud
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 morgane alonso 2016-08-04 07:22:51 UTC
Code :

Server source code : 
http://git.biblibre.com/biblibre/koha-mana
Client source code integrated in Koha : http://git.biblibre.com/biblibre/kohac/commits/koha-mana
Comment 2 Marcel de Rooy 2016-08-04 10:46:18 UTC
Hi Alonso,
Just glancing a little bit thru your Koha code, I see you introduce Koha::Branch. Did you see Koha::Library already? Confusingly true :)
Comment 3 Jonathan Druart 2016-08-04 11:53:06 UTC
Quick code review:

1/ The default value for the new pref should be "off"

2/ Tabulation chars should be replaced with 4 tabs

3/ $tmp is rarely a correct variable name :)

4/ Additional fields are displayed (but not taken into account) on the mana subscriptions search form

5/ The Koha::Branch[es] should not be added, use Koha::Librar[y|ies] instead

6/ Share> "Language of your sharing" is hidden on the right.

7/ "The export is done, thank you for your contribution." => It should not be yellow (alert) but green (message)
Comment 4 Marcel de Rooy 2016-08-04 12:05:31 UTC
(In reply to Jonathan Druart from comment #3)
> 2/ Tabulation chars should be replaced with 4 tabs

Hope that this is not a recursive rule..
Comment 5 Owen Leonard 2016-08-04 12:42:01 UTC
(In reply to Marcel de Rooy from comment #4)
> > 2/ Tabulation chars should be replaced with 4 tabs
> 
> Hope that this is not a recursive rule..

It is a rule for all new files added to Koha and for all changed lines in patches.

https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL6:_Indentation
Comment 6 morgane alonso 2016-08-04 14:45:45 UTC
(In reply to Marcel de Rooy from comment #2)
> Hi Alonso,
> Just glancing a little bit thru your Koha code, I see you introduce
> Koha::Branch. Did you see Koha::Library already? Confusingly true :)

Hi Marcel de Rooy, I don't see it, sorry! I'll change that and use the right Koha object.
Comment 7 morgane alonso 2016-08-04 15:08:28 UTC
(In reply to Jonathan Druart from comment #3)
> Quick code review:
> 
> 1/ The default value for the new pref should be "off"
> 
> 2/ Tabulation chars should be replaced with 4 tabs
> 
> 3/ $tmp is rarely a correct variable name :)
> 
> 4/ Additional fields are displayed (but not taken into account) on the mana
> subscriptions search form
> 
> 5/ The Koha::Branch[es] should not be added, use Koha::Librar[y|ies] instead
> 
> 6/ Share> "Language of your sharing" is hidden on the right.
> 
> 7/ "The export is done, thank you for your contribution." => It should not
> be yellow (alert) but green (message)

1/ Paul says that it's better to have "on" in default value to promote the use of Mana (he'll discuss about it later)

2/3/7/ I'll clean my code

4/ the flied "deprecated" is not used yet because I didn't have the time to code the comment feature where librarians can say if a model is deprecated. I can remove the flied if you prefer.

5/ I'll do that

6/ Fixed

Thanks for all your comments! I will do my best to apply them all.
Comment 8 Katrin Fischer 2016-08-04 20:59:28 UTC
For features like this that have you communicate with an external server should definitely turned off by default in my opinion. You can promote in other ways.
Comment 9 Alex Arnaud 2016-10-11 13:08:25 UTC Comment hidden (obsolete)
Comment 10 Alex Arnaud 2016-10-11 13:08:32 UTC Comment hidden (obsolete)
Comment 11 Alex Arnaud 2016-10-11 13:08:39 UTC Comment hidden (obsolete)
Comment 12 Alex Arnaud 2016-10-11 13:08:46 UTC Comment hidden (obsolete)
Comment 13 Alex Arnaud 2016-10-11 13:08:55 UTC Comment hidden (obsolete)
Comment 14 Alex Arnaud 2016-10-11 13:09:03 UTC Comment hidden (obsolete)
Comment 15 Alex Arnaud 2016-10-11 13:09:09 UTC Comment hidden (obsolete)
Comment 16 Alex Arnaud 2016-10-13 08:17:48 UTC
Here is a test plan:

  - Install and run a Mana server as described in the README file: http://git.biblibre.com/biblibre/koha-mana/blob/master/README.md,
  - apply this patch on Koha,
  - change the $MANA_IP variable in Koha/SharedContent.pm with the one used by your Mana server (may be http://localhost:5000 for a local instance),
  - go to a subscription detail page (cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=xx) and click on the share button in the toolbar.
  - check that the subscription has been recorded in the Mana database (subscription table),
  - in Koha, remove this subscription and the related frequency and numbering pattern,
  - go to the biblio detail page of the related deleted subscription (cgi-bin/koha/catalogue/detail.pl?biblionumber=xx),
  - click on New -> new subscription in the toolbar
  - click on next on the first step form. On the second step you should get the message: " Frequency and Numbering pattern have been already proposed for this subscription on Mana [...]",
  - click on "here", choose the subscription (Use) and finish the new subscription.
  - check that the subscription has been created with the corresponding frequency and numbering pattern.
Comment 17 Jonathan Druart 2016-10-19 15:12:33 UTC
Is it ready for testing?
Comment 18 Alex Arnaud 2017-02-01 11:08:03 UTC Comment hidden (obsolete)
Comment 19 Alex Arnaud 2017-02-01 11:08:11 UTC Comment hidden (obsolete)
Comment 20 Alex Arnaud 2017-02-01 11:09:47 UTC
Remember, test plan is here: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17047#c16
Comment 21 Alex Arnaud 2017-02-06 14:10:21 UTC Comment hidden (obsolete)
Comment 22 David Cook 2017-03-26 23:09:20 UTC
(In reply to morgane alonso from comment #0)
> RFC :
> https://wiki.koha-community.org/wiki/SharingDatasBetweenKohas_rfc
> 
> Progress of the Mana features :
> https://wiki.koha-community.org/wiki/Mana_central_database

One question... why is it "Statistics management" and not "Reports management"?
Comment 23 Paul Poulain 2017-03-27 08:50:31 UTC
Hi David,
I think that we use the "reports" word on the code, the term "statistic" is used only on the RFC.
Comment 24 Baptiste 2017-04-05 14:36:02 UTC Comment hidden (obsolete)
Comment 25 Baptiste 2017-04-11 14:13:36 UTC Comment hidden (obsolete)
Comment 26 Baptiste 2017-04-11 14:13:46 UTC Comment hidden (obsolete)
Comment 27 Baptiste 2017-04-11 14:13:54 UTC Comment hidden (obsolete)
Comment 28 Baptiste 2017-04-11 14:14:02 UTC Comment hidden (obsolete)
Comment 29 Baptiste 2017-04-11 14:14:09 UTC Comment hidden (obsolete)
Comment 30 Baptiste 2017-04-11 14:14:17 UTC Comment hidden (obsolete)
Comment 31 Baptiste 2017-04-11 14:14:24 UTC Comment hidden (obsolete)
Comment 32 Baptiste 2017-04-11 14:14:31 UTC Comment hidden (obsolete)
Comment 33 Baptiste 2017-04-11 14:14:40 UTC Comment hidden (obsolete)
Comment 34 Baptiste 2017-04-11 14:14:48 UTC Comment hidden (obsolete)
Comment 35 Paul Poulain 2017-04-11 14:55:41 UTC
Verified that, with mana OFF, nothing changes & Koha still working :
 * SQL => everything is OK
 * subscriptions => ERROR
On the logs I see:
Use of uninitialized value $loggedinuser in string ne at /home/koha/src/Koha/SharedContent.pm line 89.
Can't call method "email" on an undefined value at /home/koha/src/Koha/SharedContent.pm line 91.


Some QA comments:
 * patch description : "2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml" => not very clear. Better "copy in your koha-conf.xml the 3 lines about mana configuration the 3 lines you'll find in $KOHA_SRC/etc/koha-conf.xml"
 * some "+# Copyright ByWater Solutions 2015" => Yikes, it's Biblibre 2017, not ByWater 2015 ;-)
 * Not sure we should use Koha/Reports.pm & Report.pm. Why not something related to Mana (ie: Koha/Mana/Reports.pm, Koha/Mana/Reports.pm) [this is a question]
 * Some "+# Copyright 2016 BibLibre Morgane Alonso" => you're Baptiste, not Morgane (and we're now 2017)
Comment 36 Jonathan Druart 2017-04-11 19:13:48 UTC
(In reply to Paul Poulain from comment #35)
>  * Not sure we should use Koha/Reports.pm & Report.pm. Why not something
> related to Mana (ie: Koha/Mana/Reports.pm, Koha/Mana/Reports.pm) [this is a
> question]

They make sense to me, they are related to the (badly named) table saved_sql

>  * Some "+# Copyright 2016 BibLibre Morgane Alonso" => you're Baptiste, not
> Morgane (and we're now 2017)

After a very quick look at the code it seems that it is some code written by Morgane and moved by Baptiste, sounds right to keep it.
Comment 37 Baptiste 2017-04-12 10:37:55 UTC Comment hidden (obsolete)
Comment 38 Baptiste 2017-04-20 12:19:17 UTC Comment hidden (obsolete)
Comment 39 Baptiste 2017-04-20 14:36:37 UTC Comment hidden (obsolete)
Comment 40 Baptiste 2017-04-20 16:06:00 UTC Comment hidden (obsolete)
Comment 41 Paul Poulain 2017-04-21 15:20:57 UTC
Extensive testing :

== Mana set to "No, let me think about it" ==
 * subscriptions => no change, still working:
    - The subscription add says "You haven't activated the Mana Knowledge Base, click here to configure." as expected
    - add OK
    - view OK
 * sql reports => no change, still working (nothing related to mana visible)
=> OK

== Mana set to OFF ==
 * subscriptions => no change, still working
 * sql reports => no change, still working
=> OK

== Mana set to ON ==
 * AutoShare = nothing
 * I create a token for Mana by entering my firstname, lastname, email. I receive the email and can validate the token by clicking on the link in the email
=== Testing subscriptions ===
 * I create a subscription => OK
 * I see the button "share" after validating creation
 * hitting "share" button, I get a confirmation box and a "thanks for sharing" message once I've confirmed
 * I create a new subscription, on the same biblio.
  - when reaching the 2nd screen of subscription-add, I see the box "something found in mana, quick fill". I select "quick fill", and select the subscription displayed.
  - the pattern & periodicity are now filled
  - I validate the subscription-add
  => OK
I've also verified that, as the pattern & frequency already exist, they're not duplicated, the existing ones are used.

=== Testing SQL reports ===
 * trying to share a report
  - go to SQL report
  - in the actions list (on the right), I see the option "share"
  - I click on "share", a popup appear asking me to enter more than 20 chars in name and description to enable sharing
    => OK
  - I update the name & description, hit "share" again
  - I validate the sharing
 * trying to retrieve a shared report
  - go to guided-reports page
  - hit the Quick search link on "You want more reports? Check the Mana Knowledge Base "
  - search what I've shared
  - click "use"
  - nothing visible happen. After talking with Baptiste, there's no redirect to the report that has been derived from Mana-KB.

Baptiste will send a follow-up ASAP.
Comment 42 Baptiste 2017-04-21 16:40:09 UTC Comment hidden (obsolete)
Comment 43 Paul Poulain 2017-04-21 16:53:30 UTC Comment hidden (obsolete)
Comment 44 Paul Poulain 2017-04-21 16:53:40 UTC Comment hidden (obsolete)
Comment 45 Paul Poulain 2017-04-21 16:53:48 UTC Comment hidden (obsolete)
Comment 46 Paul Poulain 2017-04-21 16:53:55 UTC Comment hidden (obsolete)
Comment 47 Paul Poulain 2017-04-21 16:54:02 UTC Comment hidden (obsolete)
Comment 48 Paul Poulain 2017-04-21 16:54:09 UTC Comment hidden (obsolete)
Comment 49 Paul Poulain 2017-04-21 16:54:17 UTC Comment hidden (obsolete)
Comment 50 Paul Poulain 2017-04-21 16:54:23 UTC Comment hidden (obsolete)
Comment 51 Paul Poulain 2017-04-21 16:54:30 UTC Comment hidden (obsolete)
Comment 52 Paul Poulain 2017-04-21 16:54:37 UTC Comment hidden (obsolete)
Comment 53 Paul Poulain 2017-04-21 16:54:45 UTC Comment hidden (obsolete)
Comment 54 Paul Poulain 2017-04-21 16:54:52 UTC Comment hidden (obsolete)
Comment 55 Baptiste 2017-04-24 08:27:23 UTC Comment hidden (obsolete)
Comment 56 Paul Poulain 2017-04-24 13:15:12 UTC Comment hidden (obsolete)
Comment 57 Paul Poulain 2017-04-24 13:15:20 UTC Comment hidden (obsolete)
Comment 58 Paul Poulain 2017-04-24 13:15:35 UTC Comment hidden (obsolete)
Comment 59 Paul Poulain 2017-04-24 13:15:44 UTC Comment hidden (obsolete)
Comment 60 Paul Poulain 2017-04-24 13:15:51 UTC Comment hidden (obsolete)
Comment 61 Paul Poulain 2017-04-24 13:15:58 UTC Comment hidden (obsolete)
Comment 62 Paul Poulain 2017-04-24 13:16:05 UTC Comment hidden (obsolete)
Comment 63 Paul Poulain 2017-04-24 13:16:16 UTC Comment hidden (obsolete)
Comment 64 Paul Poulain 2017-04-24 13:16:26 UTC Comment hidden (obsolete)
Comment 65 Paul Poulain 2017-04-24 14:28:07 UTC
Created attachment 62603 [details] [review]
Bug 17047 add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.
Comment 66 Paul Poulain 2017-04-24 14:28:21 UTC
Created attachment 62604 [details] [review]
Bug 17047 subscriptions management with Mana-KB

- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB

- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB

- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions
Comment 67 Paul Poulain 2017-04-24 14:28:31 UTC
Created attachment 62605 [details] [review]
Bug 17047 Mana-KB, Add unit tests
Comment 68 Paul Poulain 2017-04-24 14:28:41 UTC
Created attachment 62606 [details] [review]
Bug 17047 SQL reports management with Mana-KB

Includes:

* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments

* SytemPreferences:
Mana Activation:
    - add a value "no, let me think about it", that is the default value.
    - as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
    - Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)

* Interface :
    - On mana-search, rows are now sorted by date of last import, then by number of users
    - Windows redesigned to improve the user experience

* New Feature : report a mistake.
    - people can now report an invalid data (wrong, obsolete,...)
    - if a data is reported as invalid many time, it will appear differently
    - Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
    - When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists

* API (svc/mana)
    - add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
    - no hardcoding for resources in the code of api (api needs to be called with a ressourcename)

* New feature : SQL report sharing
    - Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
    - New feature: share reports with Mana-KB
    - New feature: search report in Mana-KB with keywords
    - New feature: load reports from Mana-KB

=========
Test plan
=========
(see BibLibre complete documentation, attached to this patch)
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml
3 - Check Mana syspref and AutoShareWithMana syspref are not activated

4 - subscriptions
- Try create a new subscription for a first serial  => Koha shouldn't show you anything (except if the base hase been filled)
- Share this serial on Mana-KB (on the subscription detail page there must be a Share button)
- Try to create a new subscription for serial #1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use

5 - SQL Report
- Create a new report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it on Mana-KB => you will have a success message
- On (report > use saved), there must be a message inviting you to search on mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.

6 - Comments.
- On any table containing mana search results, you can report a mistake & comment why you report: click on report mistake. You only can chose "other" because there's no comment in Mana-KB [if there are comments, you'll get other values].
- If you click other, a new textbox appears. Enter a short comment.
- Reload the whole page, the comment should appear in the menu and in the comment column.
- If you select a comment and reload the whole page, there should be one more comment with this name
- If you select a comment and click on cancel just after, there shouldn't be any change when you reload.
Comment 69 Paul Poulain 2017-04-24 14:28:58 UTC
Created attachment 62607 [details] [review]
Bug 17047 security token agst flooding for Mana-KB

Rework messages from Mana-KB.

- Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB
- To get an Authentication token, you have to fill a form and validate your e-mail address
- Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.
Comment 70 Paul Poulain 2017-04-27 08:55:05 UTC
Created attachment 62768 [details]
Mana-KB documentation
Comment 71 Baptiste 2017-05-15 14:25:36 UTC
Created attachment 63476 [details] [review]
Bug 17047 security token agst flooding for Mana-KB

Rework messages from Mana-KB.

- Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB
- To get an Authentication token, you have to fill a form and validate your e-mail address
- Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.
Comment 72 Baptiste 2017-05-22 08:42:06 UTC
Created attachment 63601 [details] [review]
Bug 17047: Correct encoding issues

Modify the function manaRequest in order to set the right encoding format (UTF-8).
Comment 73 Josef Moravec 2017-05-22 11:32:02 UTC
Could you rebase please?
I am getting: 

fatal: sha1 information is lacking or useless (installer/data/mysql/sysprefs.sql).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 17047 SQL reports management with Mana-KB
Comment 74 Baptiste 2017-05-22 14:56:59 UTC
Created attachment 63618 [details] [review]
Bug 17047 add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.
Comment 75 Baptiste 2017-05-22 14:57:10 UTC Comment hidden (obsolete)
Comment 76 Baptiste 2017-05-22 14:57:21 UTC Comment hidden (obsolete)
Comment 77 Baptiste 2017-05-22 14:57:31 UTC Comment hidden (obsolete)
Comment 78 Baptiste 2017-05-22 14:57:41 UTC Comment hidden (obsolete)
Comment 79 Baptiste 2017-05-22 14:57:52 UTC Comment hidden (obsolete)
Comment 80 Baptiste 2017-05-22 15:01:21 UTC
Hum.. it tried to rebase it but it applyied without any problem..

I just reuploadad it, could you please try again ?
Comment 81 Josef Moravec 2017-05-23 05:54:14 UTC
(In reply to Baptiste from comment #80)
> Hum.. it tried to rebase it but it applyied without any problem..
> 
> I just reuploadad it, could you please try again ?

Now it applies, I had to do something wrong... anyway, going to test it
Comment 82 Brendan Gallagher 2017-06-20 19:45:47 UTC
Had some trouble applying it.  Can you rebase - I think it's an easy one in koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt 

Thanks!
Comment 83 Baptiste 2017-06-21 07:41:52 UTC Comment hidden (obsolete)
Comment 84 Baptiste 2017-06-22 08:52:12 UTC Comment hidden (obsolete)
Comment 85 Brendan Gallagher 2017-06-22 20:38:35 UTC
It's still not applying cleanly for me.  I would love to sign off on this and get it towards the next step!  If I sign off on it - I'll start begging for some QAers.

I'm using the latest version of kohadevbox - maybe try applying it there and rebasing this?  Thanks!
Comment 86 Baptiste 2017-06-23 07:47:25 UTC Comment hidden (obsolete)
Comment 87 Baptiste 2017-06-26 08:23:48 UTC Comment hidden (obsolete)
Comment 88 Baptiste 2017-06-26 08:24:08 UTC Comment hidden (obsolete)
Comment 89 Baptiste 2017-06-26 08:24:21 UTC Comment hidden (obsolete)
Comment 90 Baptiste 2017-06-26 08:24:31 UTC Comment hidden (obsolete)
Comment 91 Baptiste 2017-06-26 08:24:48 UTC Comment hidden (obsolete)
Comment 92 Baptiste 2017-06-26 08:24:59 UTC Comment hidden (obsolete)
Comment 93 Baptiste 2017-06-26 08:25:11 UTC Comment hidden (obsolete)
Comment 94 Baptiste 2017-06-26 08:27:08 UTC
Rebased on master
Comment 95 Baptiste 2017-06-26 09:06:32 UTC Comment hidden (obsolete)
Comment 96 Baptiste 2017-06-26 09:06:42 UTC Comment hidden (obsolete)
Comment 97 Baptiste 2017-06-26 09:06:56 UTC Comment hidden (obsolete)
Comment 98 Baptiste 2017-06-26 09:07:04 UTC Comment hidden (obsolete)
Comment 99 Baptiste 2017-06-26 09:07:30 UTC Comment hidden (obsolete)
Comment 100 Baptiste 2017-06-26 09:07:39 UTC Comment hidden (obsolete)
Comment 101 Baptiste 2017-06-26 09:09:45 UTC Comment hidden (obsolete)
Comment 102 Baptiste 2017-06-26 09:11:54 UTC Comment hidden (obsolete)
Comment 103 Baptiste 2017-06-26 09:21:56 UTC Comment hidden (obsolete)
Comment 104 Baptiste 2017-06-26 09:29:01 UTC Comment hidden (obsolete)
Comment 105 Baptiste 2017-06-26 09:29:15 UTC Comment hidden (obsolete)
Comment 106 Baptiste 2017-06-26 09:31:48 UTC Comment hidden (obsolete)
Comment 107 Baptiste 2017-06-26 09:32:35 UTC Comment hidden (obsolete)
Comment 108 Baptiste 2017-06-26 09:32:50 UTC Comment hidden (obsolete)
Comment 109 Baptiste 2017-06-26 09:33:03 UTC Comment hidden (obsolete)
Comment 110 Baptiste 2017-06-26 09:33:11 UTC Comment hidden (obsolete)
Comment 111 Baptiste 2017-06-26 09:33:23 UTC Comment hidden (obsolete)
Comment 112 Baptiste 2017-06-26 09:33:34 UTC Comment hidden (obsolete)
Comment 113 Baptiste 2017-06-26 09:33:42 UTC Comment hidden (obsolete)
Comment 114 Baptiste 2017-06-26 09:38:14 UTC
Correctly rebased on Master this time (I hope so)
Comment 115 Baptiste 2017-06-26 13:44:22 UTC
Created attachment 64648 [details] [review]
Bug 17047 add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.
Comment 116 Baptiste 2017-06-26 13:44:34 UTC
Created attachment 64649 [details] [review]
Bug 17047 subscriptions management with Mana-KB

- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB

- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB

- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions
Comment 117 Baptiste 2017-06-26 13:44:42 UTC
Created attachment 64650 [details] [review]
Bug 17047 Mana-KB, Add unit tests
Comment 118 Baptiste 2017-06-26 13:45:23 UTC
Created attachment 64651 [details] [review]
Bug 17047 SQL reports management with Mana-KB

Includes:

* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments

* SytemPreferences:
Mana Activation:
    - add a value "no, let me think about it", that is the default value.
    - as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
    - Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)

* Interface :
    - On mana-search, rows are now sorted by date of last import, then by number of users
    - Windows redesigned to improve the user experience

* New Feature : report a mistake.
    - people can now report an invalid data (wrong, obsolete,...)
    - if a data is reported as invalid many time, it will appear differently
    - Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
    - When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists

* API (svc/mana)
    - add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
    - no hardcoding for resources in the code of api (api needs to be called with a ressourcename)

* New feature : SQL report sharing
    - Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
    - New feature: share reports with Mana-KB
    - New feature: search report in Mana-KB with keywords
    - New feature: load reports from Mana-KB

=========
Test plan
=========
(see BibLibre complete documentation, attached to this patch)
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml
3 - Check Mana syspref and AutoShareWithMana syspref are not activated

4 - subscriptions
- Try create a new subscription for a first serial  => Koha shouldn't show you anything (except if the base hase been filled)
- Share this serial on Mana-KB (on the subscription detail page there must be a Share button)
- Try to create a new subscription for serial #1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use

5 - SQL Report
- Create a new report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it on Mana-KB => you will have a success message
- On (report > use saved), there must be a message inviting you to search on mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.

6 - Comments.
- On any table containing mana search results, you can report a mistake & comment why you report: click on report mistake. You only can chose "other" because there's no comment in Mana-KB [if there are comments, you'll get other values].
- If you click other, a new textbox appears. Enter a short comment.
- Reload the whole page, the comment should appear in the menu and in the comment column.
- If you select a comment and reload the whole page, there should be one more comment with this name
- If you select a comment and click on cancel just after, there shouldn't be any change when you reload.
Comment 119 Baptiste 2017-06-26 13:45:44 UTC
Created attachment 64652 [details] [review]
Bug 17047 security token agst flooding for Mana-KB

Rework messages from Mana-KB.

- Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB
- To get an Authentication token, you have to fill a form and validate your e-mail address
- Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.
Comment 120 Baptiste 2017-06-26 13:45:55 UTC
Created attachment 64653 [details] [review]
Bug 17047: Correct encoding issues

Modify the function manaRequest in order to set the right encoding format (UTF-8).
Comment 121 Baptiste 2017-06-26 13:46:05 UTC
Created attachment 64654 [details] [review]
Bug 17047: Minor changes

- search on reports module is now also validated by pressing enter.
- AutoShare now initialized with nothing autmaticaly shared.
- To create a report you now have to click on New report => New report from Mana.
- Error messages are displayed in case of fail
Comment 122 Baptiste 2017-06-28 15:03:10 UTC
Created attachment 64706 [details] [review]
Bug 17047: Minor changes

- search on reports module is now also validated by pressing enter.
- AutoShare now initialized with nothing autmaticaly shared.
- To create a report you now have to click on New report => New report from Mana.
- Error messages are displayed in case of fail
- Correct the display of sql reports containing "'"
Comment 123 Baptiste 2017-07-10 13:05:07 UTC
Created attachment 64962 [details] [review]
Bug 17047: Minor changes

- Importing a report from Mana now opens the edit page
- You don't get message after a successful import from mana (you simply get redirected)
Comment 124 Alex Buckley 2017-07-13 23:10:15 UTC
Hi 

Whilst going through this http://git.biblibre.com/biblibre/koha-mana/blob/master/README.md to install Mana I run the following command:

plackup -r -R lib -E production bin/app.psgi


And I get the following output:
Error while loading /home/vagrant/kohaclone/koha-mana/bin/app.psgi: Can't locate  Dancer2/Plugin/REST.pm in @INC (you may need to install the Dancer2::Plugin::REST module) (@INC contains: /home/vagrant/kohaclone/koha-mana/bin/../lib ~/kohaclone /home/vagrant/qa-test-tools /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /home/vagrant/kohaclone/koha-mana/bin/../lib/Mana.pm line 8.

I try to install the Dancer2/Plugin/REST package using the command:
sudo apt-get install libdancer2-plugin-rest-perl 

However the package cannot be found. I have tried many different variations of the name without any success (and I cannot find any help with this online) therefore can someone please inform me of the correct command to install the Dancer2/Plugin/REST package?
Comment 125 Brendan Gallagher 2017-07-14 17:56:58 UTC
Created attachment 65058 [details] [review]
Bug 17047 add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 126 Brendan Gallagher 2017-07-14 17:57:19 UTC
Created attachment 65059 [details] [review]
Bug 17047 subscriptions management with Mana-KB

- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB

- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB

- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 127 Brendan Gallagher 2017-07-14 17:57:24 UTC
Created attachment 65060 [details] [review]
Bug 17047 Mana-KB, Add unit tests

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 128 Brendan Gallagher 2017-07-14 17:57:30 UTC
Created attachment 65061 [details] [review]
Bug 17047 SQL reports management with Mana-KB

Includes:

* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments

* SytemPreferences:
Mana Activation:
    - add a value "no, let me think about it", that is the default value.
    - as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
    - Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)

* Interface :
    - On mana-search, rows are now sorted by date of last import, then by number of users
    - Windows redesigned to improve the user experience

* New Feature : report a mistake.
    - people can now report an invalid data (wrong, obsolete,...)
    - if a data is reported as invalid many time, it will appear differently
    - Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
    - When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists

* API (svc/mana)
    - add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
    - no hardcoding for resources in the code of api (api needs to be called with a ressourcename)

* New feature : SQL report sharing
    - Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
    - New feature: share reports with Mana-KB
    - New feature: search report in Mana-KB with keywords
    - New feature: load reports from Mana-KB

=========
Test plan
=========
(see BibLibre complete documentation, attached to this patch)
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml
3 - Check Mana syspref and AutoShareWithMana syspref are not activated

4 - subscriptions
- Try create a new subscription for a first serial  => Koha shouldn't show you anything (except if the base hase been filled)
- Share this serial on Mana-KB (on the subscription detail page there must be a Share button)
- Try to create a new subscription for serial #1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use

5 - SQL Report
- Create a new report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it on Mana-KB => you will have a success message
- On (report > use saved), there must be a message inviting you to search on mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.

6 - Comments.
- On any table containing mana search results, you can report a mistake & comment why you report: click on report mistake. You only can chose "other" because there's no comment in Mana-KB [if there are comments, you'll get other values].
- If you click other, a new textbox appears. Enter a short comment.
- Reload the whole page, the comment should appear in the menu and in the comment column.
- If you select a comment and reload the whole page, there should be one more comment with this name
- If you select a comment and click on cancel just after, there shouldn't be any change when you reload.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 129 Brendan Gallagher 2017-07-14 17:57:35 UTC
Created attachment 65062 [details] [review]
Bug 17047 security token agst flooding for Mana-KB

Rework messages from Mana-KB.

- Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB
- To get an Authentication token, you have to fill a form and validate your e-mail address
- Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 130 Brendan Gallagher 2017-07-14 17:57:40 UTC
Created attachment 65063 [details] [review]
Bug 17047: Correct encoding issues

Modify the function manaRequest in order to set the right encoding format (UTF-8).

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 131 Brendan Gallagher 2017-07-14 17:57:46 UTC
Created attachment 65064 [details] [review]
Bug 17047: Minor changes

- search on reports module is now also validated by pressing enter.
- AutoShare now initialized with nothing autmaticaly shared.
- To create a report you now have to click on New report => New report from Mana.
- Error messages are displayed in case of fail
- Correct the display of sql reports containing "'"

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 132 Brendan Gallagher 2017-07-14 17:57:51 UTC
Created attachment 65065 [details] [review]
Bug 17047: Minor changes

- Importing a report from Mana now opens the edit page
- You don't get message after a successful import from mana (you simply get redirected)

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 133 Brendan Gallagher 2017-08-09 17:53:08 UTC
I am getting some errors.  I will fill this out later - in a rush at the moment.  Giving presentation on this in a few minutes.
Comment 134 Kyle M Hall 2017-08-09 17:54:08 UTC
Created attachment 65773 [details] [review]
Bug 17047 [QA Followup] - Misc minor fixes
Comment 135 Brendan Gallagher 2017-08-09 20:51:27 UTC
The "use" button for grabbing a report from the search results of the mana reports - did not work.

when creating a new serial subscription it was not able to complete - it threw an error. 

Searching serials in mana did not return any results. just a blank status code.
Comment 136 Alex Arnaud 2017-08-31 10:25:07 UTC
(In reply to Brendan Gallagher from comment #135)
> The "use" button for grabbing a report from the search results of the mana
> reports - did not work.
It works for me. Can you check you have the column saved_sql.mana_id ?
It may be an updatedatabase issue.

> 
> when creating a new serial subscription it was not able to complete - it
> threw an error. 
Patch is coming.
> 
> Searching serials in mana did not return any results. just a blank status
> code.
Patch is coming.
Comment 137 Alex Arnaud 2017-08-31 10:26:57 UTC
Created attachment 66667 [details] [review]
Bug 17047 - Fix an error when cretaing subscription
Comment 138 Alex Arnaud 2017-08-31 10:27:07 UTC
Created attachment 66668 [details] [review]
Bug 17047 - Fix mana search
Comment 139 Kyle M Hall 2017-09-08 13:29:54 UTC
Created attachment 66987 [details] [review]
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures
Comment 140 Kyle M Hall 2017-09-08 17:22:48 UTC
Created attachment 67003 [details] [review]
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures
Comment 141 Kyle M Hall 2017-09-08 17:22:58 UTC
Created attachment 67004 [details] [review]
Bug 17047 [QA Followup] - Fix up database schema change, add to kohastructure.sql
Comment 142 Kyle M Hall 2017-09-08 17:23:03 UTC
Created attachment 67005 [details] [review]
Bug 17047 [QA Followup] - Update schema files
Comment 143 Kyle M Hall 2017-09-08 17:23:08 UTC
Created attachment 67006 [details] [review]
Bug 17047 [QA Followup] - Remove javascript debugger call
Comment 144 Kyle M Hall 2017-09-08 18:35:05 UTC
Created attachment 67009 [details] [review]
Bug 17047 add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 145 Kyle M Hall 2017-09-08 18:35:16 UTC
Created attachment 67010 [details] [review]
Bug 17047 subscriptions management with Mana-KB

- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB

- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB

- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 146 Kyle M Hall 2017-09-08 18:35:22 UTC
Created attachment 67011 [details] [review]
Bug 17047 Mana-KB, Add unit tests

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 147 Kyle M Hall 2017-09-08 18:35:27 UTC
Created attachment 67012 [details] [review]
Bug 17047 SQL reports management with Mana-KB

Includes:

* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments

* SytemPreferences:
Mana Activation:
    - add a value "no, let me think about it", that is the default value.
    - as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
    - Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)

* Interface :
    - On mana-search, rows are now sorted by date of last import, then by number of users
    - Windows redesigned to improve the user experience

* New Feature : report a mistake.
    - people can now report an invalid data (wrong, obsolete,...)
    - if a data is reported as invalid many time, it will appear differently
    - Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
    - When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists

* API (svc/mana)
    - add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
    - no hardcoding for resources in the code of api (api needs to be called with a ressourcename)

* New feature : SQL report sharing
    - Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
    - New feature: share reports with Mana-KB
    - New feature: search report in Mana-KB with keywords
    - New feature: load reports from Mana-KB

=========
Test plan
=========
(see BibLibre complete documentation, attached to this patch)
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml
3 - Check Mana syspref and AutoShareWithMana syspref are not activated

4 - subscriptions
- Try create a new subscription for a first serial  => Koha shouldn't show you anything (except if the base hase been filled)
- Share this serial on Mana-KB (on the subscription detail page there must be a Share button)
- Try to create a new subscription for serial #1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use

5 - SQL Report
- Create a new report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it on Mana-KB => you will have a success message
- On (report > use saved), there must be a message inviting you to search on mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.

6 - Comments.
- On any table containing mana search results, you can report a mistake & comment why you report: click on report mistake. You only can chose "other" because there's no comment in Mana-KB [if there are comments, you'll get other values].
- If you click other, a new textbox appears. Enter a short comment.
- Reload the whole page, the comment should appear in the menu and in the comment column.
- If you select a comment and reload the whole page, there should be one more comment with this name
- If you select a comment and click on cancel just after, there shouldn't be any change when you reload.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 148 Kyle M Hall 2017-09-08 18:35:33 UTC
Created attachment 67013 [details] [review]
Bug 17047 security token agst flooding for Mana-KB

Rework messages from Mana-KB.

- Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB
- To get an Authentication token, you have to fill a form and validate your e-mail address
- Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 149 Kyle M Hall 2017-09-08 18:35:38 UTC
Created attachment 67014 [details] [review]
Bug 17047: Correct encoding issues

Modify the function manaRequest in order to set the right encoding format (UTF-8).

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 150 Kyle M Hall 2017-09-08 18:35:43 UTC
Created attachment 67015 [details] [review]
Bug 17047: Minor changes

- search on reports module is now also validated by pressing enter.
- AutoShare now initialized with nothing autmaticaly shared.
- To create a report you now have to click on New report => New report from Mana.
- Error messages are displayed in case of fail
- Correct the display of sql reports containing "'"

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 151 Kyle M Hall 2017-09-08 18:35:48 UTC
Created attachment 67016 [details] [review]
Bug 17047: Minor changes

- Importing a report from Mana now opens the edit page
- You don't get message after a successful import from mana (you simply get redirected)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 152 Kyle M Hall 2017-09-08 18:35:53 UTC
Created attachment 67017 [details] [review]
Bug 17047 [QA Followup] - Misc minor fixes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 153 Kyle M Hall 2017-09-08 18:35:58 UTC
Created attachment 67018 [details] [review]
Bug 17047 - Fix an error when cretaing subscription

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 154 Kyle M Hall 2017-09-08 18:36:03 UTC
Created attachment 67019 [details] [review]
Bug 17047 - Fix mana search

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 155 Kyle M Hall 2017-09-08 18:36:08 UTC
Created attachment 67020 [details] [review]
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 156 Kyle M Hall 2017-09-08 18:36:13 UTC
Created attachment 67021 [details] [review]
Bug 17047 [QA Followup] - Fix up database schema change, add to kohastructure.sql

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 157 Kyle M Hall 2017-09-08 18:36:19 UTC
Created attachment 67022 [details] [review]
Bug 17047 [QA Followup] - Update schema files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 158 Kyle M Hall 2017-09-08 18:36:25 UTC
Created attachment 67023 [details] [review]
Bug 17047 [QA Followup] - Remove javascript debugger call

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 159 Kyle M Hall 2017-09-08 18:38:27 UTC
QA Notes:

1) Interface is a bit rough around the edges. Could probably use some Owen magic to clean it up ; )

2) It appears that the whitespace/newlines on reports are not preserved correctly. It would be nice to keep the original formatting of shared reports instead of the long run-on queries that result.
Comment 160 Alex Buckley 2017-09-18 02:49:11 UTC
Hi 

I am in the process of testing bug 18618 on kohadevbox and I installed the Mana server by following the steps outlined here: http://git.biblibre.com/biblibre/koha-mana/blob/master/README.md

I then applied the patches attached to bug 17047, changed the $MANA_IP address to http://localhost:5000 because I am using a local instance Mana server.

Then when I tried to submit the form for creating a Mana token, the form is not returning a security token instead it is returning the following error when I display the outcome of the result js object in activatemana.js:

({msg:"An error occurred, mana server returned: URL must be absolute", code:400})

Does anyone have idea as to the reason why the /cgi-bin/koha/svc/mana/getToken is not successfully returning a security token?
Comment 161 Jonathan Druart 2017-09-19 17:51:55 UTC
(In reply to Alex Buckley from comment #160)
> Does anyone have idea as to the reason why the
> /cgi-bin/koha/svc/mana/getToken is not successfully returning a security
> token?

This needs an answer
Comment 162 Jonathan Druart 2017-09-19 18:13:48 UTC
Quick code review:
1/ Please squash patches when possible to ease readability
2/ Some strings are not translatable (at least "Subscription found on Mana Knowledge Base")
3/ Please fix indentation
4/ Remove use of onclick attribute
5/ 
-       [% INCLUDE 'serials-toolbar.inc' %]
+    [% INCLUDE 'serials-toolbar.inc' mana_id = mana_id %]
Not sure it is needed
6/ +        'mana_success' => $input->param('mana_success'),
CGI->param raises warning called in list context (there are other occurrences)
7/ subroutines added in serials/subscription-add.pl smell
8/ serials/subscription-add.pl
+    my $mana_id;
+    if ( $query->param('mana_id') ne "" ) {
+        $mana_id = $query->param('mana_id');
+        Koha::SharedContent::manaIncrementRequest("subscription",$mana_id, "nbofusers");
+    }
+    else {
+        $mana_id = undef;
+    }

=> the else block is useless
9/ Too many "use" statements in serials/subscription-detail.pl
10/ script names in svc/mana are not consistent
11/ 
+my $templatename;
+$templatename = "mana/mana-".$input->param( "resource" )."-search-result.tt";
That smells too. There are only 2 files, list them (same for other occurrences).
12/ Test coverage for Koha::SharedContent is nonexistent
13/ Why tests have been removed from t/db_dependent/Serials/GetFictiveIssueNumber.t
14/ No reference of mana_config from debian/templates/koha-conf-site.xml.in
Comment 163 Jonathan Druart 2017-09-19 18:18:39 UTC
15/ hide_marc appears twice in sysprefs.sql
16/ CDATA close tag removed from guided_reports_start.tt, looks wrong
Comment 164 Jonathan Druart 2017-09-19 19:28:35 UTC
How can we open issue on http://git.biblibre.com/biblibre/koha-mana

I'd like a more complete README to run the server and the tests.
Comment 165 Alex Arnaud 2017-11-08 16:11:47 UTC
Created attachment 69034 [details] [review]
Bug 17047 add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 166 Alex Arnaud 2017-11-08 16:11:58 UTC
Created attachment 69035 [details] [review]
Bug 17047 subscriptions management with Mana-KB

- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB

- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB

- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 167 Alex Arnaud 2017-11-08 16:12:09 UTC
Created attachment 69036 [details] [review]
Bug 17047 SQL reports management with Mana-KB

Includes:

* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments

* SytemPreferences:
Mana Activation:
    - add a value "no, let me think about it", that is the default value.
    - as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
    - Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)

* Interface :
    - On mana-search, rows are now sorted by date of last import, then by number of users
    - Windows redesigned to improve the user experience

* New Feature : report a mistake.
    - people can now report an invalid data (wrong, obsolete,...)
    - if a data is reported as invalid many time, it will appear differently
    - Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
    - When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists

* API (svc/mana)
    - add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
    - no hardcoding for resources in the code of api (api needs to be called with a ressourcename)

* New feature : SQL report sharing
    - Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
    - New feature: share reports with Mana-KB
    - New feature: search report in Mana-KB with keywords
    - New feature: load reports from Mana-KB

=========
Test plan
=========
(see BibLibre complete documentation, attached to this patch)
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml
3 - Check Mana syspref and AutoShareWithMana syspref are not activated

4 - subscriptions
- Try create a new subscription for a first serial  => Koha shouldn't show you anything (except if the base hase been filled)
- Share this serial on Mana-KB (on the subscription detail page there must be a Share button)
- Try to create a new subscription for serial #1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use

5 - SQL Report
- Create a new report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it on Mana-KB => you will have a success message
- On (report > use saved), there must be a message inviting you to search on mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.

6 - Comments.
- On any table containing mana search results, you can report a mistake & comment why you report: click on report mistake. You only can chose "other" because there's no comment in Mana-KB [if there are comments, you'll get other values].
- If you click other, a new textbox appears. Enter a short comment.
- Reload the whole page, the comment should appear in the menu and in the comment column.
- If you select a comment and reload the whole page, there should be one more comment with this name
- If you select a comment and click on cancel just after, there shouldn't be any change when you reload.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 168 Alex Arnaud 2017-11-08 16:12:17 UTC
Created attachment 69037 [details] [review]
Bug 17047 security token agst flooding for Mana-KB

Rework messages from Mana-KB.

- Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB
- To get an Authentication token, you have to fill a form and validate your e-mail address
- Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 169 Alex Arnaud 2017-11-08 16:12:26 UTC
Created attachment 69038 [details] [review]
Bug 17047: Minor changes

- search on reports module is now also validated by pressing enter.
- AutoShare now initialized with nothing autmaticaly shared.
- To create a report you now have to click on New report => New report from Mana.
- Error messages are displayed in case of fail
- Correct the display of sql reports containing "'"
- Importing a report from Mana now opens the edit page
- You don't get message after a successful import from mana (you simply get redirected)
- Fix an error when cretaing subscription
- Fix mana search
- Correct encoding issues

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 170 Alex Arnaud 2017-11-08 16:12:34 UTC
Created attachment 69039 [details] [review]
Bug 17047 [QA Followup]   - Fix misc koha-qa.pl failures   - Fix up database schema change, add to kohastructure.sql   - Update schema files   - Remove javascript debugger call

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 171 Alex Arnaud 2017-11-08 16:12:43 UTC Comment hidden (obsolete)
Comment 172 Alex Arnaud 2017-11-08 16:18:55 UTC
Created attachment 69041 [details] [review]
Bug 17047 - [QA Followup]   - Fix untranslatable strings   - Remove onclick html attribute   - Remove useless passing of mana_id variable in serials-toolbar.inc   - Remove using CGI::param in list context   - remove new subs from serials/subscription-add.
Comment 173 Brendan Gallagher 2017-11-08 17:48:39 UTC
Alex should this be set back to "signed qa" or even "passed qa"?
Comment 174 Alex Arnaud 2017-11-09 07:52:21 UTC
(In reply to Brendan Gallagher from comment #173)
> Alex should this be set back to "signed qa" or even "passed qa"?

Hello Brendan.

Sorry no. Here is a QA fix. I have to do some code refacto and fonctional changes (moving the comment feature from the mana results table)
Comment 175 Alex Arnaud 2017-11-09 07:56:47 UTC
Also, unit tests are missing for Koha::Subscription::Numberpatterns::new_or_existing
Comment 176 Alex Arnaud 2017-11-10 14:47:30 UTC
Created attachment 69091 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring
Comment 177 Jonathan Druart 2017-11-26 18:19:08 UTC
Can I get an answer to my comments 162-164?
Comment 178 Nick Clemens 2017-12-27 13:39:44 UTC
Can you rebase please?
Comment 179 Alex Arnaud 2017-12-29 14:39:07 UTC
Created attachment 70203 [details] [review]
Bug 17047 add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 180 Alex Arnaud 2017-12-29 14:39:20 UTC
Created attachment 70204 [details] [review]
Bug 17047 subscriptions management with Mana-KB

- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB

- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB

- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 181 Alex Arnaud 2017-12-29 14:39:35 UTC
Created attachment 70205 [details] [review]
Bug 17047 SQL reports management with Mana-KB

Includes:

* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments

* SytemPreferences:
Mana Activation:
    - add a value "no, let me think about it", that is the default value.
    - as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
    - Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)

* Interface :
    - On mana-search, rows are now sorted by date of last import, then by number of users
    - Windows redesigned to improve the user experience

* New Feature : report a mistake.
    - people can now report an invalid data (wrong, obsolete,...)
    - if a data is reported as invalid many time, it will appear differently
    - Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
    - When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists

* API (svc/mana)
    - add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
    - no hardcoding for resources in the code of api (api needs to be called with a ressourcename)

* New feature : SQL report sharing
    - Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
    - New feature: share reports with Mana-KB
    - New feature: search report in Mana-KB with keywords
    - New feature: load reports from Mana-KB

=========
Test plan
=========
(see BibLibre complete documentation, attached to this patch)
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml
3 - Check Mana syspref and AutoShareWithMana syspref are not activated

4 - subscriptions
- Try create a new subscription for a first serial  => Koha shouldn't show you anything (except if the base hase been filled)
- Share this serial on Mana-KB (on the subscription detail page there must be a Share button)
- Try to create a new subscription for serial #1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use

5 - SQL Report
- Create a new report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it on Mana-KB => you will have a success message
- On (report > use saved), there must be a message inviting you to search on mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.

6 - Comments.
- On any table containing mana search results, you can report a mistake & comment why you report: click on report mistake. You only can chose "other" because there's no comment in Mana-KB [if there are comments, you'll get other values].
- If you click other, a new textbox appears. Enter a short comment.
- Reload the whole page, the comment should appear in the menu and in the comment column.
- If you select a comment and reload the whole page, there should be one more comment with this name
- If you select a comment and click on cancel just after, there shouldn't be any change when you reload.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 182 Alex Arnaud 2017-12-29 14:39:50 UTC
Created attachment 70206 [details] [review]
Bug 17047 security token agst flooding for Mana-KB

Rework messages from Mana-KB.

- Add A syspref contains an authentication token. The token will be used to prevent anaonymous flooding of Mana-KB
- To get an Authentication token, you have to fill a form and validate your e-mail address
- Messages return codes are now correctly displayed and there shouldn't be any crash when Mana-KB webservices return a wrong answer or doesn't answer

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 183 Alex Arnaud 2017-12-29 14:40:04 UTC
Created attachment 70208 [details] [review]
Bug 17047: Minor changes

- search on reports module is now also validated by pressing enter.
- AutoShare now initialized with nothing autmaticaly shared.
- To create a report you now have to click on New report => New report from Mana.
- Error messages are displayed in case of fail
- Correct the display of sql reports containing "'"
- Importing a report from Mana now opens the edit page
- You don't get message after a successful import from mana (you simply get redirected)
- Fix an error when cretaing subscription
- Fix mana search
- Correct encoding issues

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 184 Alex Arnaud 2017-12-29 14:40:27 UTC
Created attachment 70209 [details] [review]
Bug 17047 [QA Followup] - Fix misc koha-qa.pl failures - Fix up database schema change, add to kohastructure.sql - Update schema files - Remove javascript debugger call

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 185 Alex Arnaud 2017-12-29 14:40:44 UTC
Created attachment 70210 [details] [review]
Bug 17047 - [QA Followup] - Fix untranslatable strings - Remove onclick html attribute - Remove useless passing of mana_id variable in serials-toolbar.inc - Remove using CGI::param in list context - remove new subs from serials/subscription-add.pl - remov
Comment 186 Alex Arnaud 2017-12-29 14:40:59 UTC
Created attachment 70211 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring
Comment 187 Nick Clemens 2018-01-02 12:20:06 UTC
Tried testing, seems to be some issues:
1 - Template code in subscription-add.js file breaks serial biblio search:
620             //[% IF Koha.Preference('Mana') == 1 %]
2 - When I attempt to save a serial:
Variable "$loggedinuser" is not available at /home/vagrant/kohaclone/serials/subscription-add.pl line 371.
Variable "$template" is not available at /home/vagrant/kohaclone/serials/subscription-add.pl line 372.
Variable "$loggedinuser" is not available at /home/vagrant/kohaclone/serials/subscription-add.pl line 371.
Variable "$template" is not available at /home/vagrant/kohaclone/serials/subscription-add.pl line 372.
Can't use string ("koha_login_context") as a HASH ref while "strict refs" in use at /home/vagrant/kohaclone/Koha/Subscription/Numberpatterns.pm line 63.
3 - Blank modal when attempting to share report with no notes
4 - Internal server error when trying to share a new report with notes:
Use of uninitialized value $loggedinuser in string ne at /home/vagrant/kohaclone/Koha/SharedContent.pm line 106.
Can't call method "first_valid_email_address" on an undefined value at /home/vagrant/kohaclone/Koha/SharedContent.pm line 108.

I stopped testing at this point
Comment 188 Alex Arnaud 2018-01-16 16:26:58 UTC
Created attachment 70561 [details] [review]
Bug 17047 - Fix template code in subscription-add.js Fix errors when saving a serial Provide a more visible message when sharing a report without note Fix Internal server error when trying to share a new report Make update DB idempotent
Comment 189 Hugo Agud 2018-01-22 11:36:59 UTC
I have applied the patch propertly, but I am not able to make the local mana server work.. I follow all instructions.

I have installed in a kohadev server, I had to install manual via cpan some of the perl packages, everything seems to goes fine.. but on localhost:5000 nothing appears..  is that the normal behaviour? 

PID/Program name
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      2814/plackup    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:45397           0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      -               
tcp6       0      0 :::41475                :::*                    LISTEN      -               
tcp6       0      0 :::111                  :::*                    LISTEN      -               
tcp6       0      0 :::8080                 :::*                    LISTEN      -               
tcp6       0      0 :::80                   :::*                    LISTEN      -               
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 ::1:25                  :::*                    LISTEN      -
Comment 190 Alex Arnaud 2018-01-23 08:30:40 UTC
(In reply to Hugo Agud from comment #189)
> I have applied the patch propertly, but I am not able to make the local mana
> server work.. I follow all instructions.
> 
> I have installed in a kohadev server, I had to install manual via cpan some
> of the perl packages, everything seems to goes fine.. but on localhost:5000
> nothing appears..  is that the normal behaviour? 
> 
> PID/Program name
> tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN  
> 2814/plackup    
> tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN  
> -               
> tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN  
> -               
> tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN  
> -               
> tcp        0      0 0.0.0.0:45397           0.0.0.0:*               LISTEN  
> -               
> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN  
> -               
> tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN  
> -               
> tcp6       0      0 :::41475                :::*                    LISTEN  
> -               
> tcp6       0      0 :::111                  :::*                    LISTEN  
> -               
> tcp6       0      0 :::8080                 :::*                    LISTEN  
> -               
> tcp6       0      0 :::80                   :::*                    LISTEN  
> -               
> tcp6       0      0 :::22                   :::*                    LISTEN  
> -               
> tcp6       0      0 ::1:25                  :::*                    LISTEN  
> -

Hello Hugo,

You can use the test server: https://mana-test.koha-community.org