Bug 17047 - Mana Knowledge Base : Data sharing
Summary: Mana Knowledge Base : Data sharing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature with 10 votes (vote)
Assignee: Alex Arnaud
QA Contact: Kyle M Hall
URL:
Keywords:
: 12710 17045 (view as bug list)
Depends on:
Blocks: 18618 18922 22193 22252 22257 22488 25572 26142 22196 22197 22198 22202 22210 22222 22237 22248 22249 22250 22357 22358 22400 22452 22849 22850 22913 23087 27061 30253
  Show dependency treegraph
 
Reported: 2016-08-04 07:20 UTC by morgane alonso
Modified: 2023-10-04 13:03 UTC (History)
24 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Large patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This new feature adds the ability for Koha to talk to a Mana Knowledge Base server, allowing libraries to share a small, but hopefully growing, number sets of data. Currently this includes sharing serial subscription patterns and reports.
Version(s) released in:


Attachments
Bug 17047 add mana syspref (3.94 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 ability to search subscription model on mana (16.85 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 ability to share a subscription to mana (20.95 KB, patch)
2016-10-11 13:08 UTC, Alex Arnaud
Details | Diff | 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 | Diff | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2016-10-11 13:09 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Use Koha::Libraries instead of GetBranches (1.17 KB, patch)
2016-10-11 13:09 UTC, Alex Arnaud
Details | Diff | 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 | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (75.39 KB, patch)
2017-04-05 14:36 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add mana syspref (3.94 KB, patch)
2017-04-11 14:13 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2017-04-11 14:13 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 ability to search subscription model on mana (16.85 KB, patch)
2017-04-11 14:13 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 ability to share a subscription to mana (20.96 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 ability to import a subscription model from mana (77.68 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 - Use Koha::Libraries instead of GetBranches (1.17 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 - Don't create numberpattern if the same exists (5.45 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Diff | 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 | Diff | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (75.48 KB, patch)
2017-04-11 14:14 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Add report, factorize code, add a comment feature (73.40 KB, patch)
2017-04-12 10:37 UTC, Baptiste
Details | Diff | 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 | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047: minor corrections on report share (1.83 KB, patch)
2017-04-21 16:40 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add mana syspref (3.94 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 ability to search subscription model on mana (16.85 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 ability to share a subscription to mana (20.96 KB, patch)
2017-04-21 16:53 UTC, Paul Poulain
Details | Diff | 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 | Diff | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 - Use Koha::Libraries instead of GetBranches (1.17 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Diff | 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 | Diff | 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 | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047: minor corrections on report share (1.83 KB, patch)
2017-04-21 16:54 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047: Add report_group as shared attribute (708 bytes, patch)
2017-04-24 08:27 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add mana syspref (3.94 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 add frequencies and numberpattern in subscription class (6.47 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 ability to search subscription model on mana (17.12 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 ability to share a subscription to mana (20.96 KB, patch)
2017-04-24 13:15 UTC, Paul Poulain
Details | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047 Add unit tests (5.56 KB, patch)
2017-04-24 13:16 UTC, Paul Poulain
Details | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (119.90 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.84 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.23 KB, patch)
2017-04-24 14:28 UTC, Paul Poulain
Details | Diff | 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 | Diff | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-05-22 08:42 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-05-22 14:56 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (119.90 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.74 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-05-22 14:57 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (18.64 KB, patch)
2017-06-21 07:41 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (18.97 KB, patch)
2017-06-22 08:52 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 08:23 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: subscriptions management with Mana-KB (113.25 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (70.30 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.57 KB, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 08:24 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (18.89 KB, patch)
2017-06-26 08:25 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 09:06 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (129.99 KB, patch)
2017-06-26 09:06 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 09:06 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.24 KB, patch)
2017-06-26 09:07 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-06-26 09:07 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (3.43 KB, patch)
2017-06-26 09:07 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 09:09 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (18.85 KB, patch)
2017-06-26 09:11 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (18.76 KB, patch)
2017-06-26 09:21 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 09:29 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (18.76 KB, patch)
2017-06-26 09:29 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 09:31 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (18.76 KB, patch)
2017-06-26 09:32 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 09:32 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.24 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (3.43 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (18.85 KB, patch)
2017-06-26 09:33 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (3.95 KB, patch)
2017-06-26 13:44 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (129.99 KB, patch)
2017-06-26 13:44 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.57 KB, patch)
2017-06-26 13:44 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.24 KB, patch)
2017-06-26 13:45 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.87 KB, patch)
2017-06-26 13:45 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Correct encoding issues (886 bytes, patch)
2017-06-26 13:45 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (18.84 KB, patch)
2017-06-26 13:46 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (19.55 KB, patch)
2017-06-28 15:03 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047: Minor changes (2.02 KB, patch)
2017-07-10 13:05 UTC, Baptiste
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.01 KB, patch)
2017-07-14 17:56 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (130.06 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.63 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.30 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.94 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047: Correct encoding issues (953 bytes, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047: Minor changes (19.62 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047: Minor changes (2.08 KB, patch)
2017-07-14 17:57 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 [QA Followup] - Misc minor fixes (2.50 KB, patch)
2017-08-09 17:54 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 - Fix an error when cretaing subscription (888 bytes, patch)
2017-08-31 10:26 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix mana search (2.20 KB, patch)
2017-08-31 10:27 UTC, Alex Arnaud
Details | Diff | 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 | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047 [QA Followup] - Update schema files (2.54 KB, patch)
2017-09-08 17:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 [QA Followup] - Remove javascript debugger call (1.03 KB, patch)
2017-09-08 17:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (130.11 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 Mana-KB, Add unit tests (5.69 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.36 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | 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 | Diff | Splinter Review
Bug 17047: Correct encoding issues (1010 bytes, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: Minor changes (19.68 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: Minor changes (2.14 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 [QA Followup] - Misc minor fixes (2.54 KB, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 - Fix an error when cretaing subscription (944 bytes, patch)
2017-09-08 18:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 - Fix mana search (2.25 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047 [QA Followup] - Update schema files (2.59 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 [QA Followup] - Remove javascript debugger call (1.08 KB, patch)
2017-09-08 18:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2017-11-08 16:11 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.94 KB, patch)
2017-11-08 16:11 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.32 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (31.99 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (24.84 KB, patch)
2017-11-08 16:12 UTC, Alex Arnaud
Details | Diff | 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 | Diff | 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 | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (135.23 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (75.04 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.30 KB, patch)
2017-12-29 14:39 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.50 KB, patch)
2017-12-29 14:40 UTC, Alex Arnaud
Details | Diff | 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 | Diff | 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 | Diff | 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 | Diff | 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 | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.56 KB, patch)
2018-01-24 09:39 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2018-03-12 11:30 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (135.23 KB, patch)
2018-03-12 11:30 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (75.04 KB, patch)
2018-03-12 11:31 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.30 KB, patch)
2018-03-12 11:31 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.50 KB, patch)
2018-03-12 11:31 UTC, Alex Arnaud
Details | Diff | 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 (11.81 KB, patch)
2018-03-12 11:32 UTC, Alex Arnaud
Details | Diff | 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.72 KB, patch)
2018-03-12 11:32 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.69 KB, patch)
2018-03-12 11:33 UTC, Alex Arnaud
Details | Diff | 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 (14.48 KB, patch)
2018-03-12 11:33 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.56 KB, patch)
2018-03-12 11:33 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.31 KB, patch)
2018-03-12 11:33 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.67 KB, patch)
2018-04-05 14:21 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.07 KB, patch)
2018-04-06 08:25 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (135.42 KB, patch)
2018-04-06 08:26 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.72 KB, patch)
2018-04-06 08:26 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.33 KB, patch)
2018-04-06 08:26 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.50 KB, patch)
2018-04-06 08:26 UTC, Alex Arnaud
Details | Diff | 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 (11.41 KB, patch)
2018-04-06 08:27 UTC, Alex Arnaud
Details | Diff | 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.72 KB, patch)
2018-04-06 08:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.69 KB, patch)
2018-04-06 08:27 UTC, Alex Arnaud
Details | Diff | 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 (14.51 KB, patch)
2018-04-06 08:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.56 KB, patch)
2018-04-06 08:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.30 KB, patch)
2018-04-06 08:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.67 KB, patch)
2018-04-06 08:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.13 KB, patch)
2018-04-10 22:37 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (135.49 KB, patch)
2018-04-10 22:37 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.79 KB, patch)
2018-04-10 22:37 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.39 KB, patch)
2018-04-10 22:37 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.57 KB, patch)
2018-04-10 22:37 UTC, Brendan Gallagher
Details | Diff | 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 (11.47 KB, patch)
2018-04-10 22:38 UTC, Brendan Gallagher
Details | Diff | 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.78 KB, patch)
2018-04-10 22:38 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.75 KB, patch)
2018-04-10 22:38 UTC, Brendan Gallagher
Details | Diff | 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 (14.57 KB, patch)
2018-04-10 22:38 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.62 KB, patch)
2018-04-10 22:38 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.36 KB, patch)
2018-04-10 22:38 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.74 KB, patch)
2018-04-10 22:38 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.24 KB, patch)
2018-07-04 13:32 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.71 KB, patch)
2018-07-04 13:32 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.78 KB, patch)
2018-07-04 13:33 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.39 KB, patch)
2018-07-04 13:33 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.56 KB, patch)
2018-07-04 13:33 UTC, Alex Arnaud
Details | Diff | 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 (11.47 KB, patch)
2018-07-04 13:33 UTC, Alex Arnaud
Details | Diff | 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.84 KB, patch)
2018-07-04 13:34 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.25 KB, patch)
2018-07-04 13:34 UTC, Alex Arnaud
Details | Diff | 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 (14.55 KB, patch)
2018-07-04 13:34 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.62 KB, patch)
2018-07-04 13:35 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.36 KB, patch)
2018-07-04 13:35 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.66 KB, patch)
2018-07-04 13:35 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.24 KB, patch)
2018-08-28 14:44 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.30 KB, patch)
2018-08-28 14:44 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (159.34 KB, patch)
2018-08-28 14:45 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.39 KB, patch)
2018-08-28 14:45 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.51 KB, patch)
2018-08-28 14:45 UTC, Alex Arnaud
Details | Diff | 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 (11.47 KB, patch)
2018-08-28 14:46 UTC, Alex Arnaud
Details | Diff | 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.85 KB, patch)
2018-08-28 14:46 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.25 KB, patch)
2018-08-28 14:46 UTC, Alex Arnaud
Details | Diff | 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 (14.58 KB, patch)
2018-08-28 14:47 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.66 KB, patch)
2018-08-28 14:47 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.36 KB, patch)
2018-08-28 14:47 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.67 KB, patch)
2018-08-28 14:48 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (5.92 KB, patch)
2018-08-28 14:48 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.45 KB, patch)
2018-08-28 14:48 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.44 KB, patch)
2018-08-28 15:01 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.24 KB, patch)
2018-10-03 13:22 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.30 KB, patch)
2018-10-03 13:23 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.85 KB, patch)
2018-10-03 13:23 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.39 KB, patch)
2018-10-03 13:23 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.51 KB, patch)
2018-10-03 13:24 UTC, Alex Arnaud
Details | Diff | 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 (11.37 KB, patch)
2018-10-03 13:25 UTC, Alex Arnaud
Details | Diff | 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.85 KB, patch)
2018-10-03 13:25 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.22 KB, patch)
2018-10-03 13:26 UTC, Alex Arnaud
Details | Diff | 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 (14.58 KB, patch)
2018-10-03 13:26 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.47 KB, patch)
2018-10-03 13:26 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.36 KB, patch)
2018-10-03 13:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.65 KB, patch)
2018-10-03 13:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (4.91 KB, patch)
2018-10-03 13:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.45 KB, patch)
2018-10-03 13:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (18.16 KB, patch)
2018-10-03 13:29 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (86.99 KB, patch)
2018-10-03 13:29 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.39 KB, patch)
2018-10-03 13:29 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.42 KB, patch)
2018-10-03 13:30 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.24 KB, patch)
2018-10-04 08:09 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.30 KB, patch)
2018-10-04 08:09 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.83 KB, patch)
2018-10-04 08:10 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.39 KB, patch)
2018-10-04 08:10 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.51 KB, patch)
2018-10-04 08:10 UTC, Alex Arnaud
Details | Diff | 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 (11.37 KB, patch)
2018-10-04 08:11 UTC, Alex Arnaud
Details | Diff | 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.83 KB, patch)
2018-10-04 08:11 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.22 KB, patch)
2018-10-04 08:12 UTC, Alex Arnaud
Details | Diff | 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 (14.65 KB, patch)
2018-10-04 08:12 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.47 KB, patch)
2018-10-04 08:12 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.36 KB, patch)
2018-10-04 08:13 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.65 KB, patch)
2018-10-04 08:13 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (4.91 KB, patch)
2018-10-04 08:13 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.45 KB, patch)
2018-10-04 08:14 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (18.16 KB, patch)
2018-10-04 08:14 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (87.06 KB, patch)
2018-10-04 08:14 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.39 KB, patch)
2018-10-04 08:15 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.42 KB, patch)
2018-10-04 08:15 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.33 KB, patch)
2018-10-08 07:20 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.39 KB, patch)
2018-10-08 07:20 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.93 KB, patch)
2018-10-08 07:21 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.49 KB, patch)
2018-10-08 07:21 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.60 KB, patch)
2018-10-08 07:21 UTC, Michal Denar
Details | Diff | 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 (11.46 KB, patch)
2018-10-08 07:21 UTC, Michal Denar
Details | Diff | 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.93 KB, patch)
2018-10-08 07:21 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.31 KB, patch)
2018-10-08 07:21 UTC, Michal Denar
Details | Diff | 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 (14.75 KB, patch)
2018-10-08 07:22 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.57 KB, patch)
2018-10-08 07:22 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.46 KB, patch)
2018-10-08 07:22 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.75 KB, patch)
2018-10-08 07:22 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (5.00 KB, patch)
2018-10-08 07:22 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.54 KB, patch)
2018-10-08 07:22 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (18.25 KB, patch)
2018-10-08 07:22 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (87.15 KB, patch)
2018-10-08 07:23 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.49 KB, patch)
2018-10-08 07:23 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.52 KB, patch)
2018-10-08 07:23 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (88.76 KB, patch)
2018-10-12 12:30 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.49 KB, patch)
2018-10-12 12:31 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.52 KB, patch)
2018-10-12 12:32 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.33 KB, patch)
2018-10-19 09:18 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.39 KB, patch)
2018-10-19 09:19 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.99 KB, patch)
2018-10-19 09:19 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.49 KB, patch)
2018-10-19 09:19 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.66 KB, patch)
2018-10-19 09:20 UTC, Alex Arnaud
Details | Diff | 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 (11.46 KB, patch)
2018-10-19 09:20 UTC, Alex Arnaud
Details | Diff | 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.97 KB, patch)
2018-10-19 09:21 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.31 KB, patch)
2018-10-19 09:21 UTC, Alex Arnaud
Details | Diff | 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 (14.80 KB, patch)
2018-10-19 09:21 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.57 KB, patch)
2018-10-19 09:22 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.46 KB, patch)
2018-10-19 09:22 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.76 KB, patch)
2018-10-19 09:22 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (5.00 KB, patch)
2018-10-19 09:22 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.55 KB, patch)
2018-10-19 09:23 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (18.25 KB, patch)
2018-10-19 09:23 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (88.76 KB, patch)
2018-10-19 09:23 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.49 KB, patch)
2018-10-19 09:24 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.54 KB, patch)
2018-10-19 09:24 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.33 KB, patch)
2018-11-05 13:24 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (134.56 KB, patch)
2018-11-05 13:24 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.99 KB, patch)
2018-11-05 13:24 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.49 KB, patch)
2018-11-05 13:25 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.66 KB, patch)
2018-11-05 13:25 UTC, Alex Arnaud
Details | Diff | 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 (11.46 KB, patch)
2018-11-05 13:25 UTC, Alex Arnaud
Details | Diff | 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.97 KB, patch)
2018-11-05 13:26 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.31 KB, patch)
2018-11-05 13:26 UTC, Alex Arnaud
Details | Diff | 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 (14.78 KB, patch)
2018-11-05 13:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.57 KB, patch)
2018-11-05 13:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.46 KB, patch)
2018-11-05 13:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.76 KB, patch)
2018-11-05 13:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (5.00 KB, patch)
2018-11-05 13:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.55 KB, patch)
2018-11-05 13:29 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (18.25 KB, patch)
2018-11-05 13:29 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (90.55 KB, patch)
2018-11-05 13:30 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.49 KB, patch)
2018-11-05 13:30 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.54 KB, patch)
2018-11-05 13:31 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [QA tool] add template filters (29.97 KB, patch)
2018-11-05 15:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.33 KB, patch)
2019-01-14 09:57 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (132.46 KB, patch)
2019-01-14 09:57 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.76 KB, patch)
2019-01-14 09:58 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.49 KB, patch)
2019-01-14 09:58 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.66 KB, patch)
2019-01-14 09:58 UTC, Alex Arnaud
Details | Diff | 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 (11.49 KB, patch)
2019-01-14 09:59 UTC, Alex Arnaud
Details | Diff | 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.97 KB, patch)
2019-01-14 09:59 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.33 KB, patch)
2019-01-14 09:59 UTC, Alex Arnaud
Details | Diff | 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 (14.78 KB, patch)
2019-01-14 10:00 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.57 KB, patch)
2019-01-14 10:00 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.46 KB, patch)
2019-01-14 10:00 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.80 KB, patch)
2019-01-14 10:01 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (4.77 KB, patch)
2019-01-14 10:01 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.55 KB, patch)
2019-01-14 10:01 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (18.36 KB, patch)
2019-01-14 10:02 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (91.14 KB, patch)
2019-01-14 10:02 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.49 KB, patch)
2019-01-14 10:02 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.54 KB, patch)
2019-01-14 10:03 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [QA tool] add template filters (29.97 KB, patch)
2019-01-14 10:03 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.40 KB, patch)
2019-01-14 18:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (132.55 KB, patch)
2019-01-14 18:47 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (73.85 KB, patch)
2019-01-14 18:47 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 security token agst flooding for Mana-KB (32.57 KB, patch)
2019-01-14 18:47 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: Minor changes (25.74 KB, patch)
2019-01-14 18:47 UTC, Kyle M Hall
Details | Diff | 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 (11.56 KB, patch)
2019-01-14 18:48 UTC, Kyle M Hall
Details | Diff | 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 (63.05 KB, patch)
2019-01-14 18:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page (20.40 KB, patch)
2019-01-14 18:48 UTC, Kyle M Hall
Details | Diff | 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 (14.86 KB, patch)
2019-01-14 18:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 - Fix retrieving Mana token (3.64 KB, patch)
2019-01-14 18:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice (2.54 KB, patch)
2019-01-14 18:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 - Move mana JS and put correct subscription id when sharing (5.87 KB, patch)
2019-01-14 18:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings (4.87 KB, patch)
2019-01-14 18:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: Koha::SharedContent subs snake casing/renaming (14.67 KB, patch)
2019-01-14 18:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (18.43 KB, patch)
2019-01-14 18:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (91.22 KB, patch)
2019-01-14 18:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.56 KB, patch)
2019-01-14 18:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: Fix reports sharing (12.60 KB, patch)
2019-01-14 18:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: [QA tool] add template filters (30.04 KB, patch)
2019-01-14 18:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 [QA Followup] - Fixes to make unit tests pass (2.02 KB, patch)
2019-01-14 18:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047 [QA Followup] - Don't enable by default (3.41 KB, patch)
2019-01-14 18:51 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17047: QA fixes: - don't search subscriptions when mana is disabled, - subscription detail page: don't show share button or search link if Mana is disabled, - fix report sharing, - submit report search form by pressing enter, - add a waittin (8.38 KB, patch)
2019-01-17 15:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: QA fixes: - don't search subscriptions when mana is disabled, - subscription detail page: don't show share button or search link if Mana is disabled, - fix report sharing, - submit report search form by pressing enter, - add a waittin (8.99 KB, patch)
2019-01-17 15:59 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: (follow-up) Improve mana messages, enable by default, show messages if not configured (8.34 KB, patch)
2019-01-18 19:10 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17047 add Mana-KB syspref (4.39 KB, patch)
2019-01-21 09:44 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 subscriptions management with Mana-KB (132.52 KB, patch)
2019-01-21 09:45 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047 SQL reports management with Mana-KB (135.13 KB, patch)
2019-01-21 09:45 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (67.36 KB, patch)
2019-01-21 09:46 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (91.20 KB, patch)
2019-01-21 09:46 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.54 KB, patch)
2019-01-21 09:47 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add Mana-KB syspref (4.39 KB, patch)
2019-01-23 09:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: subscriptions management with Mana-KB (132.52 KB, patch)
2019-01-23 09:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: SQL reports management with Mana-KB (135.13 KB, patch)
2019-01-23 09:27 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: add a dedicated page for Mana setup (67.36 KB, patch)
2019-01-23 09:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Add a third option for Mana system preference (8.39 KB, patch)
2019-01-23 09:28 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provide staff-global.css (91.20 KB, patch)
2019-01-23 09:29 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: [DO NOT PUSH] provides schema files (4.54 KB, patch)
2019-01-23 09:29 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 17047: Add a third option for Mana system preference (8.45 KB, patch)
2019-01-23 12:39 UTC, Kyle M Hall
Details | Diff | 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
Comment 191 Hugo Agud 2018-01-23 10:38:26 UTC
Dear Alex

thank you very much! we have added this line to Shared

 our  $MANA_IP = "https://mana-test.koha-community.org";

and we have been able to work.

REPORTS:
We have been able to download reports from MANA BUT they are not able to execute because it dissapears spaces between orders.. we have got to review and separate some statements in order to make it works.

We have NOT been able to upload a report or a serial patter , the systema it claims Can't call method "first_valid_email_address" on an undefined value at /home/vagrant/kohaclone/Koha/SharedContent.pm line 108.

We have checked that the user has primary and secondary email and the library has also a library defined... (perhas it needs to be registered in MANA? we have not been able to register in MANA using syspref.

 Orex Digital (XXXXX)

    Primary email:info@orex.es
    Secondary email: info@orex.es

SERIAL
We have added a serial with a issn that MANA manage and it never finds it

No subscription found on Mana Knowledge Base :(

Please feel free to share you pattern with all others librarians once you are done




Reviewing logs...

dozens of 
Use of uninitialized value in concatenation (.) or string at /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc line 53.
Use of uninitialized value in concatenation (.) or string at /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc line 53.
Comment 192 Jonathan Druart 2018-01-23 14:17:51 UTC
(In reply to Jonathan Druart from comment #177)
> Can I get an answer to my comments 162-164?

Still waiting for that, I am switching to FQA until I get what I asked 4 months ago, to avoid testers to lose their time.
Comment 193 Alex Arnaud 2018-01-24 09:39:18 UTC
Created attachment 70874 [details] [review]
Bug 17047 - Fix retrieving Mana token
Comment 194 Alex Arnaud 2018-01-24 09:50:11 UTC
To be clear with the job done since Jonathan's QA:

> Comment 161 - /cgi-bin/koha/svc/mana/getToken is not successfully returning a security token?
Fixed

> Comment 162 and Comment 163
Fixed

> Comment 164 - How can we open issue on http://git.biblibre.com/biblibre/koha-mana
We plan to move Mana server sources on Koha community repository

> Comment 164 - I'd like a more complete README to run the server and the tests.
http://git.biblibre.com/biblibre/koha-mana/blob/master/README.md. Need to be completed
Comment 195 Alex Arnaud 2018-01-24 09:52:39 UTC
I will work on Comment 191 as soon as possible
Comment 196 Hugo Agud 2018-01-26 12:41:08 UTC Comment hidden (obsolete)
Comment 197 Alex Arnaud 2018-03-12 11:30:39 UTC Comment hidden (obsolete)
Comment 198 Alex Arnaud 2018-03-12 11:30:55 UTC Comment hidden (obsolete)
Comment 199 Alex Arnaud 2018-03-12 11:31:16 UTC Comment hidden (obsolete)
Comment 200 Alex Arnaud 2018-03-12 11:31:32 UTC Comment hidden (obsolete)
Comment 201 Alex Arnaud 2018-03-12 11:31:50 UTC Comment hidden (obsolete)
Comment 202 Alex Arnaud 2018-03-12 11:32:06 UTC Comment hidden (obsolete)
Comment 203 Alex Arnaud 2018-03-12 11:32:53 UTC Comment hidden (obsolete)
Comment 204 Alex Arnaud 2018-03-12 11:33:06 UTC Comment hidden (obsolete)
Comment 205 Alex Arnaud 2018-03-12 11:33:18 UTC Comment hidden (obsolete)
Comment 206 Alex Arnaud 2018-03-12 11:33:34 UTC Comment hidden (obsolete)
Comment 207 Alex Arnaud 2018-03-12 11:33:44 UTC Comment hidden (obsolete)
Comment 208 Alex Arnaud 2018-03-12 11:39:59 UTC
(In reply to Hugo Agud from comment #191)
> Dear Alex
> 
> thank you very much! we have added this line to Shared
> 
>  our  $MANA_IP = "https://mana-test.koha-community.org";
> 
> and we have been able to work.
> 
> REPORTS:
> We have been able to download reports from MANA BUT they are not able to
> execute because it dissapears spaces between orders.. we have got to review
> and separate some statements in order to make it works.
Yes, there is bad reports in Mana database. They came here when the share method was broken.
We should clear them now.
> 
> We have NOT been able to upload a report or a serial patter , the systema it
> claims Can't call method "first_valid_email_address" on an undefined value
> at /home/vagrant/kohaclone/Koha/SharedContent.pm line 108.
Works for me. But i did some little changes today. Can you apply them and test again?
> 
> We have checked that the user has primary and secondary email and the
> library has also a library defined... (perhas it needs to be registered in
> MANA? we have not been able to register in MANA using syspref.
> 
>  Orex Digital (XXXXX)
> 
>     Primary email:info@orex.es
>     Secondary email: info@orex.es
> 
> SERIAL
> We have added a serial with a issn that MANA manage and it never finds it
> 
> No subscription found on Mana Knowledge Base :(
> 
> Please feel free to share you pattern with all others librarians once you
> are done
> 
> 
> 
> 
> Reviewing logs...
> 
> dozens of 
> Use of uninitialized value in concatenation (.) or string at
> /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-
> subscription-search-result.inc line 53.
> Use of uninitialized value in concatenation (.) or string at
> /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-
> subscription-search-result.inc line 53.
Comment 209 Alex Arnaud 2018-04-05 14:21:22 UTC Comment hidden (obsolete)
Comment 210 Jesse Maseto 2018-04-05 19:00:59 UTC Comment hidden (obsolete)
Comment 211 Alex Arnaud 2018-04-06 08:25:44 UTC Comment hidden (obsolete)
Comment 212 Alex Arnaud 2018-04-06 08:26:00 UTC Comment hidden (obsolete)
Comment 213 Alex Arnaud 2018-04-06 08:26:17 UTC Comment hidden (obsolete)
Comment 214 Alex Arnaud 2018-04-06 08:26:36 UTC Comment hidden (obsolete)
Comment 215 Alex Arnaud 2018-04-06 08:26:49 UTC Comment hidden (obsolete)
Comment 216 Alex Arnaud 2018-04-06 08:27:05 UTC Comment hidden (obsolete)
Comment 217 Alex Arnaud 2018-04-06 08:27:36 UTC Comment hidden (obsolete)
Comment 218 Alex Arnaud 2018-04-06 08:27:53 UTC Comment hidden (obsolete)
Comment 219 Alex Arnaud 2018-04-06 08:28:06 UTC Comment hidden (obsolete)
Comment 220 Alex Arnaud 2018-04-06 08:28:20 UTC Comment hidden (obsolete)
Comment 221 Alex Arnaud 2018-04-06 08:28:39 UTC Comment hidden (obsolete)
Comment 222 Alex Arnaud 2018-04-06 08:28:51 UTC Comment hidden (obsolete)
Comment 223 Jesse Maseto 2018-04-06 16:48:48 UTC
Getting some errors in the plack logs while testing.

Use of uninitialized value $ressourcetype in ucfirst at /home/vagrant/kohaclone/Koha/SharedContent.pm line 123.
Use of uninitialized value $ressourcetype in ucfirst at /home/vagrant/kohaclone/Koha/SharedContent.pm line 124.
Can't locate object method "get_sharable_info" via package "Koha::" (perhaps you forgot to load "Koha::"?) at /home/vagrant/kohaclone/Koha/SharedContent.pm line 125.
Comment 224 Brendan Gallagher 2018-04-10 22:37:20 UTC
Created attachment 73975 [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>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 225 Brendan Gallagher 2018-04-10 22:37:35 UTC
Created attachment 73976 [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>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 226 Brendan Gallagher 2018-04-10 22:37:42 UTC
Created attachment 73977 [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>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 227 Brendan Gallagher 2018-04-10 22:37:49 UTC
Created attachment 73978 [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>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 228 Brendan Gallagher 2018-04-10 22:37:56 UTC
Created attachment 73979 [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>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 229 Brendan Gallagher 2018-04-10 22:38:03 UTC
Created attachment 73980 [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>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 230 Brendan Gallagher 2018-04-10 22:38:09 UTC
Created attachment 73981 [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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 231 Brendan Gallagher 2018-04-10 22:38:16 UTC
Created attachment 73982 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 232 Brendan Gallagher 2018-04-10 22:38:23 UTC
Created attachment 73983 [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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 233 Brendan Gallagher 2018-04-10 22:38:29 UTC
Created attachment 73984 [details] [review]
Bug 17047 - Fix retrieving Mana token

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 234 Brendan Gallagher 2018-04-10 22:38:36 UTC
Created attachment 73985 [details] [review]
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 235 Brendan Gallagher 2018-04-10 22:38:42 UTC
Created attachment 73986 [details] [review]
Bug 17047 - Move mana JS and put correct subscription id when sharing

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Comment 236 Jonathan Druart 2018-06-18 19:09:04 UTC
Is there a plan to avoid never-ending rebases?


(In reply to Alex Arnaud from comment #194)
> > Comment 164 - How can we open issue on http://git.biblibre.com/biblibre/koha-mana
> We plan to move Mana server sources on Koha community repository
> 
> > Comment 164 - I'd like a more complete README to run the server and the tests.
> http://git.biblibre.com/biblibre/koha-mana/blob/master/README.md. Need to be
> completed

What about these two points?
Comment 237 Alex Arnaud 2018-06-21 14:48:07 UTC
(In reply to Jonathan Druart from comment #236)
> Is there a plan to avoid never-ending rebases?
> 
> 
> (In reply to Alex Arnaud from comment #194)
> > > Comment 164 - How can we open issue on http://git.biblibre.com/biblibre/koha-mana
> > We plan to move Mana server sources on Koha community repository
> > 
> > > Comment 164 - I'd like a more complete README to run the server and the tests.
> > http://git.biblibre.com/biblibre/koha-mana/blob/master/README.md. Need to be
> > completed
> 
> What about these two points?

I think only the second point needs an answer. What do you miss on the README file?
Comment 238 Alex Arnaud 2018-06-21 14:51:16 UTC
(In reply to Jonathan Druart from comment #236)
> Is there a plan to avoid never-ending rebases?
> 
Make QA and push? :p
Comment 239 Jonathan Druart 2018-06-21 15:34:53 UTC
I can get back to this one when the documentation to test locally (server too) will be completed.
Comment 240 Alex Arnaud 2018-07-04 13:32:36 UTC Comment hidden (obsolete)
Comment 241 Alex Arnaud 2018-07-04 13:32:53 UTC Comment hidden (obsolete)
Comment 242 Alex Arnaud 2018-07-04 13:33:09 UTC Comment hidden (obsolete)
Comment 243 Alex Arnaud 2018-07-04 13:33:23 UTC Comment hidden (obsolete)
Comment 244 Alex Arnaud 2018-07-04 13:33:36 UTC Comment hidden (obsolete)
Comment 245 Alex Arnaud 2018-07-04 13:33:58 UTC Comment hidden (obsolete)
Comment 246 Alex Arnaud 2018-07-04 13:34:27 UTC Comment hidden (obsolete)
Comment 247 Alex Arnaud 2018-07-04 13:34:43 UTC Comment hidden (obsolete)
Comment 248 Alex Arnaud 2018-07-04 13:34:59 UTC Comment hidden (obsolete)
Comment 249 Alex Arnaud 2018-07-04 13:35:15 UTC Comment hidden (obsolete)
Comment 250 Alex Arnaud 2018-07-04 13:35:29 UTC Comment hidden (obsolete)
Comment 251 Alex Arnaud 2018-07-04 13:35:42 UTC Comment hidden (obsolete)
Comment 252 Alex Arnaud 2018-07-04 13:42:04 UTC
(In reply to Jonathan Druart from comment #239)
> I can get back to this one when the documentation to test locally (server
> too) will be completed.

I have updated the README.md of Mana server. There you'll find a link to the documentation of Mana feature in Koha. And a documentation on Mana server (install and use).

Also i've just rebased the 12 patches above.
Comment 253 Jonathan Druart 2018-08-06 15:53:32 UTC
1. Unit tests:
[kohadev-koha@kohadevbox:/home/vagrant/kohaclone (BZ17047_s) ✹ ✭]% prove -r t/db_dependent/Koha/SharedContent.t t/db_dependent/Koha/Subscription* t/db_dependent/Serial*
t/db_dependent/Koha/SharedContent.t ................ Name "Koha::SharedContent::MANA_IP" used only once: possible typo at t/db_dependent/Koha/SharedContent.t line 44.

t/db_dependent/Koha/Subscription.t ................. "my" variable $builder masks earlier declaration in same scope at t/db_dependent/Koha/Subscription.t line 38.
t/db_dependent/Koha/Subscription.t ................. 1/9 Can't call method "biblionumber" on an undefined value at /home/vagrant/kohaclone/Koha/Subscription.pm line 143.
# Looks like your test exited with 255 just after 8.
t/db_dependent/Koha/Subscription.t ................. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/9 subtests 

t/db_dependent/Serials/ReNewSubscription.t ......... Undefined subroutine &Koha::SharedContent::manaGetRequestWithId called at /home/vagrant/kohaclone/C4/Serials.pm line 303.


2. QA script:

 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
   FAIL   forbidden patterns
                forbidden pattern: Do *not* include full path to js files, use the Asset TT plugin (bug 20538) (line 196)
                forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 196)


 FAIL   t/db_dependent/Koha/SharedContent.t
   FAIL   valid
                Name "Koha::SharedContent::MANA_IP" used only once: possible typo 

 FAIL   t/db_dependent/Koha/Subscription.t
   FAIL   valid
                "my" variable $builder masks earlier declaration in same scope 


About MANA_IP, you should move it to a Koha::SharedContent method. It would be the only way to retrieve mana_config from the config.
It will help to handle non-existent/invalid entry. Moreover I think we should avoid having config at package level (because of usage of Memcached and Plack). It will be easy to mock with mock_config.

3. There is a CamelCase/snake_case mix in method's names
Comment 254 Jonathan Druart 2018-08-06 16:57:41 UTC
- Message on the admin page - click here, then you enable, then? We should link to a documentation page.

- log_path is not in the default yaml file or specify in any docs.
I did not manage to configure the server config file to make it work locally. Can you share a working example please?

- What is supposed to happen when I click on "Send" in the ManaToken syspref block? There is a wrong error handling, as my server is not setup properly, I click and nothing happens.
Comment 255 Alex Arnaud 2018-08-28 14:44:37 UTC
Created attachment 78215 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 256 Alex Arnaud 2018-08-28 14:44:53 UTC
Created attachment 78216 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 257 Alex Arnaud 2018-08-28 14:45:12 UTC
Created attachment 78217 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 258 Alex Arnaud 2018-08-28 14:45:32 UTC
Created attachment 78218 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 259 Alex Arnaud 2018-08-28 14:45:53 UTC
Created attachment 78219 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 260 Alex Arnaud 2018-08-28 14:46:14 UTC
Created attachment 78220 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 261 Alex Arnaud 2018-08-28 14:46:34 UTC
Created attachment 78221 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 262 Alex Arnaud 2018-08-28 14:46:53 UTC
Created attachment 78222 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 263 Alex Arnaud 2018-08-28 14:47:09 UTC
Created attachment 78223 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 264 Alex Arnaud 2018-08-28 14:47:26 UTC
Created attachment 78224 [details] [review]
Bug 17047 - Fix retrieving Mana token

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 265 Alex Arnaud 2018-08-28 14:47:42 UTC
Created attachment 78225 [details] [review]
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 266 Alex Arnaud 2018-08-28 14:48:00 UTC
Created attachment 78226 [details] [review]
Bug 17047 - Move mana JS and put correct subscription id when sharing

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 267 Alex Arnaud 2018-08-28 14:48:16 UTC
Created attachment 78227 [details] [review]
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings
Comment 268 Alex Arnaud 2018-08-28 14:48:33 UTC Comment hidden (obsolete)
Comment 269 Alex Arnaud 2018-08-28 14:50:28 UTC
(In reply to Jonathan Druart from comment #253)
> 1. Unit tests:
> [kohadev-koha@kohadevbox:/home/vagrant/kohaclone (BZ17047_s) ✹ ✭]% prove -r
> t/db_dependent/Koha/SharedContent.t t/db_dependent/Koha/Subscription*
> t/db_dependent/Serial*
> t/db_dependent/Koha/SharedContent.t ................ Name
> "Koha::SharedContent::MANA_IP" used only once: possible typo at
> t/db_dependent/Koha/SharedContent.t line 44.
> 
> t/db_dependent/Koha/Subscription.t ................. "my" variable $builder
> masks earlier declaration in same scope at
> t/db_dependent/Koha/Subscription.t line 38.
> t/db_dependent/Koha/Subscription.t ................. 1/9 Can't call method
> "biblionumber" on an undefined value at
> /home/vagrant/kohaclone/Koha/Subscription.pm line 143.
> # Looks like your test exited with 255 just after 8.
> t/db_dependent/Koha/Subscription.t ................. Dubious, test returned
> 255 (wstat 65280, 0xff00)
> Failed 1/9 subtests 
> 
> t/db_dependent/Serials/ReNewSubscription.t ......... Undefined subroutine
> &Koha::SharedContent::manaGetRequestWithId called at
> /home/vagrant/kohaclone/C4/Serials.pm line 303.
> 
> 
> 2. QA script:
> 
>  FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
>    FAIL   forbidden patterns
>                 forbidden pattern: Do *not* include full path to js files,
> use the Asset TT plugin (bug 20538) (line 196)
>                 forbidden pattern: intranet-tmpl should certainly replaced
> with [% interface %] (line 196)
> 
> 
>  FAIL   t/db_dependent/Koha/SharedContent.t
>    FAIL   valid
>                 Name "Koha::SharedContent::MANA_IP" used only once: possible
> typo 
> 
>  FAIL   t/db_dependent/Koha/Subscription.t
>    FAIL   valid
>                 "my" variable $builder masks earlier declaration in same
> scope 
> 
> 
> About MANA_IP, you should move it to a Koha::SharedContent method. It would
> be the only way to retrieve mana_config from the config.
> It will help to handle non-existent/invalid entry. Moreover I think we
> should avoid having config at package level (because of usage of Memcached
> and Plack). It will be easy to mock with mock_config.
> 
> 3. There is a CamelCase/snake_case mix in method's names

Fixed
Comment 270 Alex Arnaud 2018-08-28 15:01:19 UTC
Created attachment 78229 [details] [review]
Bug 17047: Koha::SharedContent subs snake casing/renaming

manaRequest           => process_request
manaIncrementRequest  => increment_entity_value
manaPostRequest       => send_entity
prepareSharedData     => prepare_entity_data
manaGetRequestWithId  => get_entity_by_id
manaGetRequest        => search_entities
buildRequest          => build_request
manaUrl               => get_sharing_url
Comment 271 Alex Arnaud 2018-08-28 15:05:51 UTC
(In reply to Jonathan Druart from comment #254)
> - Message on the admin page - click here, then you enable, then? We should
> link to a documentation page.
> 
> - log_path is not in the default yaml file or specify in any docs.
> I did not manage to configure the server config file to make it work
> locally. Can you share a working example please?
I don't know what your are talking about for these 2 points
> 
> - What is supposed to happen when I click on "Send" in the ManaToken syspref
> block? There is a wrong error handling, as my server is not setup properly,
> I click and nothing happens.

You are supposed to receive an email containing a link to activate your Mana account. Like this one:

"
Hello Alex Arnaud,
    Someone asked on 2018-08-28 for an authentication on the Mana KB webservice. To activate your account definitively, please click on the following link and follow the instruction https://mana-test.koha-community.org/registration?id=DnX************************

"

It works for me because i set the official Mana server url in Koha. May be you are using a locale one?
Comment 272 Jonathan Druart 2018-08-29 18:38:40 UTC
(In reply to Alex Arnaud from comment #271)
> (In reply to Jonathan Druart from comment #254)
> > - Message on the admin page - click here, then you enable, then? We should
> > link to a documentation page.

IIRC there is a link on the admin page, which point to the syspref. But it's not clear what "mana" is and what need to be done to configure/use it correctly. I suggested to add a link to point to a documentation page (wiki or manual)

> > - log_path is not in the default yaml file or specify in any docs.
> > I did not manage to configure the server config file to make it work
> > locally. Can you share a working example please?

Server-side, I am trying to make it work locally to test the whole things. I did not manage to get a working config file to make the server run properly.

> > - What is supposed to happen when I click on "Send" in the ManaToken syspref
> > block? There is a wrong error handling, as my server is not setup properly,
> > I click and nothing happens.
> 
> You are supposed to receive an email containing a link to activate your Mana
> account. Like this one:
> 
> "
> Hello Alex Arnaud,
>     Someone asked on 2018-08-28 for an authentication on the Mana KB
> webservice. To activate your account definitively, please click on the
> following link and follow the instruction
> https://mana-test.koha-community.org/
> registration?id=DnX************************
> 
> "
> 
> It works for me because i set the official Mana server url in Koha. May be
> you are using a locale one?

Yes, the server I am using does not return a correct message and nothing happens when I click, which means errors are not handled correctly in JS code.
Comment 273 Alex Arnaud 2018-08-30 13:32:00 UTC
(In reply to Jonathan Druart from comment #272)

> IIRC there is a link on the admin page, which point to the syspref. But it's
> not clear what "mana" is and what need to be done to configure/use it
> correctly. I suggested to add a link to point to a documentation page (wiki
> or manual)

I didn't write all the code, so i may have missed something: I don't see any "Mana" link on the admin page.
> 
> > > - log_path is not in the default yaml file or specify in any docs.
> > > I did not manage to configure the server config file to make it work
> > > locally. Can you share a working example please?
> 
> Server-side, I am trying to make it work locally to test the whole things. I
> did not manage to get a working config file to make the server run properly.

Quite complicated to solve server side problems from here. At which step are you stuck ? Did you get errors?
I can take a moment to help you (with screen share) to set up the server when you are available.
> 
> 
> Yes, the server I am using does not return a correct message and nothing
> happens when I click, which means errors are not handled correctly in JS
> code.

Work to be done.
Comment 274 Alex Arnaud 2018-10-03 13:22:42 UTC Comment hidden (obsolete)
Comment 275 Alex Arnaud 2018-10-03 13:23:03 UTC Comment hidden (obsolete)
Comment 276 Alex Arnaud 2018-10-03 13:23:26 UTC Comment hidden (obsolete)
Comment 277 Alex Arnaud 2018-10-03 13:23:57 UTC Comment hidden (obsolete)
Comment 278 Alex Arnaud 2018-10-03 13:24:28 UTC Comment hidden (obsolete)
Comment 279 Alex Arnaud 2018-10-03 13:25:05 UTC Comment hidden (obsolete)
Comment 280 Alex Arnaud 2018-10-03 13:25:38 UTC Comment hidden (obsolete)
Comment 281 Alex Arnaud 2018-10-03 13:26:06 UTC Comment hidden (obsolete)
Comment 282 Alex Arnaud 2018-10-03 13:26:28 UTC Comment hidden (obsolete)
Comment 283 Alex Arnaud 2018-10-03 13:26:51 UTC Comment hidden (obsolete)
Comment 284 Alex Arnaud 2018-10-03 13:27:13 UTC Comment hidden (obsolete)
Comment 285 Alex Arnaud 2018-10-03 13:27:50 UTC Comment hidden (obsolete)
Comment 286 Alex Arnaud 2018-10-03 13:28:14 UTC Comment hidden (obsolete)
Comment 287 Alex Arnaud 2018-10-03 13:28:45 UTC Comment hidden (obsolete)
Comment 288 Alex Arnaud 2018-10-03 13:29:13 UTC Comment hidden (obsolete)
Comment 289 Alex Arnaud 2018-10-03 13:29:33 UTC Comment hidden (obsolete)
Comment 290 Alex Arnaud 2018-10-03 13:29:54 UTC Comment hidden (obsolete)
Comment 291 Alex Arnaud 2018-10-03 13:30:17 UTC Comment hidden (obsolete)
Comment 292 Alex Arnaud 2018-10-03 13:35:05 UTC Comment hidden (obsolete)
Comment 293 Jonathan Druart 2018-10-03 15:01:20 UTC
Applying: Bug 17047 SQL reports management with Mana-KB
error: sha1 information is lacking or useless (installer/data/mysql/sysprefs.sql).
Comment 294 Alex Arnaud 2018-10-04 08:09:06 UTC
Created attachment 79922 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 295 Alex Arnaud 2018-10-04 08:09:41 UTC
Created attachment 79923 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 296 Alex Arnaud 2018-10-04 08:10:19 UTC
Created attachment 79924 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 297 Alex Arnaud 2018-10-04 08:10:36 UTC
Created attachment 79925 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 298 Alex Arnaud 2018-10-04 08:10:57 UTC
Created attachment 79926 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 299 Alex Arnaud 2018-10-04 08:11:24 UTC
Created attachment 79927 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 300 Alex Arnaud 2018-10-04 08:11:47 UTC
Created attachment 79928 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 301 Alex Arnaud 2018-10-04 08:12:07 UTC
Created attachment 79929 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 302 Alex Arnaud 2018-10-04 08:12:28 UTC
Created attachment 79930 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 303 Alex Arnaud 2018-10-04 08:12:47 UTC
Created attachment 79931 [details] [review]
Bug 17047 - Fix retrieving Mana token

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 304 Alex Arnaud 2018-10-04 08:13:10 UTC
Created attachment 79932 [details] [review]
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 305 Alex Arnaud 2018-10-04 08:13:29 UTC
Created attachment 79933 [details] [review]
Bug 17047 - Move mana JS and put correct subscription id when sharing

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Comment 306 Alex Arnaud 2018-10-04 08:13:51 UTC
Created attachment 79934 [details] [review]
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings
Comment 307 Alex Arnaud 2018-10-04 08:14:10 UTC
Created attachment 79935 [details] [review]
Bug 17047: Koha::SharedContent subs snake casing/renaming

manaRequest           => process_request
manaIncrementRequest  => increment_entity_value
manaPostRequest       => send_entity
prepareSharedData     => prepare_entity_data
manaGetRequestWithId  => get_entity_by_id
manaGetRequest        => search_entities
buildRequest          => build_request
manaUrl               => get_sharing_url
Comment 308 Alex Arnaud 2018-10-04 08:14:32 UTC
Created attachment 79936 [details] [review]
Bug 17047: add a dedicated page for Mana setup
Comment 309 Alex Arnaud 2018-10-04 08:14:55 UTC
Created attachment 79937 [details] [review]
Bug 17047: [DO NOT PUSH] provide staff-global.css
Comment 310 Alex Arnaud 2018-10-04 08:15:19 UTC
Created attachment 79938 [details] [review]
Bug 17047: [DO NOT PUSH] provides schema files
Comment 311 Alex Arnaud 2018-10-04 08:15:41 UTC
Created attachment 79939 [details] [review]
Bug 17047: Fix reports sharing
Comment 312 Brendan Gallagher 2018-10-04 19:14:37 UTC
In the system preferences there isn't a place to fill out a request for a mana token anymore.  Did I miss something in the comments that I don't need to get a token anymore?
Comment 313 Paul Poulain 2018-10-04 19:54:22 UTC
(In reply to Brendan Gallagher from comment #312)
> In the system preferences there isn't a place to fill out a request for a
> mana token anymore.  Did I miss something in the comments that I don't need
> to get a token anymore?

Hi brendan,
There's now a page on admin/admin-home, like for HEA (bottom right, close to the hea page ;) )
Comment 314 Brendan Gallagher 2018-10-04 20:04:14 UTC
oh very cool Paul!  Thanks!
Comment 315 Michal Denar 2018-10-05 12:55:29 UTC
Hi,
If I filled registration and cliked on activation link, I was on 404 page. So registration wasn't confirmed. I'm not able to test comunication between Kohadexbox and Mana. What I can to do?

Mana will be great tool :-)

Mike
Comment 316 Alex Arnaud 2018-10-05 13:49:17 UTC
(In reply to Michal Denar from comment #315)
> Hi,
> If I filled registration and cliked on activation link, I was on 404 page.
> So registration wasn't confirmed. I'm not able to test comunication between
> Kohadexbox and Mana. What I can to do?
> 
> Mana will be great tool :-)
> 
> Mike

Hello Mike,

I your mana config points to mana-test.koha-community.org, it's normal. Mana server is temporarily unavailable.
Comment 317 Michal Denar 2018-10-08 07:20:39 UTC
Created attachment 80183 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Comment 318 Michal Denar 2018-10-08 07:20:51 UTC
Created attachment 80184 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 319 Michal Denar 2018-10-08 07:21:02 UTC
Created attachment 80185 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 320 Michal Denar 2018-10-08 07:21:12 UTC
Created attachment 80186 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 321 Michal Denar 2018-10-08 07:21:22 UTC
Created attachment 80187 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 322 Michal Denar 2018-10-08 07:21:33 UTC
Created attachment 80188 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 323 Michal Denar 2018-10-08 07:21:42 UTC
Created attachment 80189 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 324 Michal Denar 2018-10-08 07:21:52 UTC
Created attachment 80190 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 325 Michal Denar 2018-10-08 07:22:02 UTC
Created attachment 80191 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 326 Michal Denar 2018-10-08 07:22:12 UTC
Created attachment 80192 [details] [review]
Bug 17047 - Fix retrieving Mana token

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 327 Michal Denar 2018-10-08 07:22:22 UTC
Created attachment 80193 [details] [review]
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 328 Michal Denar 2018-10-08 07:22:32 UTC
Created attachment 80194 [details] [review]
Bug 17047 - Move mana JS and put correct subscription id when sharing

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 329 Michal Denar 2018-10-08 07:22:41 UTC
Created attachment 80195 [details] [review]
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 330 Michal Denar 2018-10-08 07:22:50 UTC
Created attachment 80196 [details] [review]
Bug 17047: Koha::SharedContent subs snake casing/renaming

manaRequest           => process_request
manaIncrementRequest  => increment_entity_value
manaPostRequest       => send_entity
prepareSharedData     => prepare_entity_data
manaGetRequestWithId  => get_entity_by_id
manaGetRequest        => search_entities
buildRequest          => build_request
manaUrl               => get_sharing_url

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 331 Michal Denar 2018-10-08 07:22:59 UTC
Created attachment 80197 [details] [review]
Bug 17047: add a dedicated page for Mana setup

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 332 Michal Denar 2018-10-08 07:23:09 UTC
Created attachment 80198 [details] [review]
Bug 17047: [DO NOT PUSH] provide staff-global.css

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 333 Michal Denar 2018-10-08 07:23:18 UTC
Created attachment 80199 [details] [review]
Bug 17047: [DO NOT PUSH] provides schema files

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 334 Michal Denar 2018-10-08 07:23:30 UTC
Created attachment 80200 [details] [review]
Bug 17047: Fix reports sharing

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 335 Fridolin Somers 2018-10-12 12:02:02 UTC
*** Bug 12710 has been marked as a duplicate of this bug. ***
Comment 336 Alex Arnaud 2018-10-12 12:30:53 UTC Comment hidden (obsolete)
Comment 337 Alex Arnaud 2018-10-12 12:31:45 UTC Comment hidden (obsolete)
Comment 338 Alex Arnaud 2018-10-12 12:32:05 UTC Comment hidden (obsolete)
Comment 339 Jonathan Druart 2018-10-17 16:51:18 UTC
Cannot apply, there is something wrong (patches order?)

error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt).
Comment 340 Alex Arnaud 2018-10-19 09:18:55 UTC
Created attachment 80907 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 341 Alex Arnaud 2018-10-19 09:19:13 UTC
Created attachment 80908 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 342 Alex Arnaud 2018-10-19 09:19:34 UTC
Created attachment 80909 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 343 Alex Arnaud 2018-10-19 09:19:53 UTC
Created attachment 80910 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 344 Alex Arnaud 2018-10-19 09:20:11 UTC
Created attachment 80911 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 345 Alex Arnaud 2018-10-19 09:20:32 UTC
Created attachment 80912 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 346 Alex Arnaud 2018-10-19 09:21:06 UTC
Created attachment 80913 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 347 Alex Arnaud 2018-10-19 09:21:25 UTC
Created attachment 80914 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 348 Alex Arnaud 2018-10-19 09:21:46 UTC
Created attachment 80915 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 349 Alex Arnaud 2018-10-19 09:22:03 UTC
Created attachment 80916 [details] [review]
Bug 17047 - Fix retrieving Mana token

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 350 Alex Arnaud 2018-10-19 09:22:20 UTC
Created attachment 80917 [details] [review]
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 351 Alex Arnaud 2018-10-19 09:22:41 UTC
Created attachment 80918 [details] [review]
Bug 17047 - Move mana JS and put correct subscription id when sharing

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 352 Alex Arnaud 2018-10-19 09:22:59 UTC
Created attachment 80919 [details] [review]
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 353 Alex Arnaud 2018-10-19 09:23:20 UTC
Created attachment 80920 [details] [review]
Bug 17047: Koha::SharedContent subs snake casing/renaming

manaRequest           => process_request
manaIncrementRequest  => increment_entity_value
manaPostRequest       => send_entity
prepareSharedData     => prepare_entity_data
manaGetRequestWithId  => get_entity_by_id
manaGetRequest        => search_entities
buildRequest          => build_request
manaUrl               => get_sharing_url

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 354 Alex Arnaud 2018-10-19 09:23:40 UTC
Created attachment 80921 [details] [review]
Bug 17047: add a dedicated page for Mana setup

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 355 Alex Arnaud 2018-10-19 09:23:58 UTC
Created attachment 80922 [details] [review]
Bug 17047: [DO NOT PUSH] provide staff-global.css

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 356 Alex Arnaud 2018-10-19 09:24:14 UTC
Created attachment 80923 [details] [review]
Bug 17047: [DO NOT PUSH] provides schema files

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 357 Alex Arnaud 2018-10-19 09:24:28 UTC
Created attachment 80924 [details] [review]
Bug 17047: Fix reports sharing

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 358 Jonathan Druart 2018-10-31 21:06:39 UTC
I will try to have a look at this one before the feature freeze to evaluate if this could be part of 18.11.

Could you catch possible QA failures (update the QA script repo and run it over the whole patchset)?

It would also help to have a remote branch with the stack up-to-date (the one on the biblibre repo is 18 months old), I tried to rebase but got:
  error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt).
Comment 359 Alex Arnaud 2018-11-05 13:24:03 UTC Comment hidden (obsolete)
Comment 360 Alex Arnaud 2018-11-05 13:24:26 UTC Comment hidden (obsolete)
Comment 361 Alex Arnaud 2018-11-05 13:24:46 UTC Comment hidden (obsolete)
Comment 362 Alex Arnaud 2018-11-05 13:25:09 UTC Comment hidden (obsolete)
Comment 363 Alex Arnaud 2018-11-05 13:25:30 UTC Comment hidden (obsolete)
Comment 364 Alex Arnaud 2018-11-05 13:25:57 UTC Comment hidden (obsolete)
Comment 365 Alex Arnaud 2018-11-05 13:26:20 UTC Comment hidden (obsolete)
Comment 366 Alex Arnaud 2018-11-05 13:26:54 UTC Comment hidden (obsolete)
Comment 367 Alex Arnaud 2018-11-05 13:27:20 UTC Comment hidden (obsolete)
Comment 368 Alex Arnaud 2018-11-05 13:27:42 UTC Comment hidden (obsolete)
Comment 369 Alex Arnaud 2018-11-05 13:28:04 UTC Comment hidden (obsolete)
Comment 370 Alex Arnaud 2018-11-05 13:28:27 UTC Comment hidden (obsolete)
Comment 371 Alex Arnaud 2018-11-05 13:28:58 UTC Comment hidden (obsolete)
Comment 372 Alex Arnaud 2018-11-05 13:29:22 UTC Comment hidden (obsolete)
Comment 373 Alex Arnaud 2018-11-05 13:29:44 UTC Comment hidden (obsolete)
Comment 374 Alex Arnaud 2018-11-05 13:30:07 UTC Comment hidden (obsolete)
Comment 375 Alex Arnaud 2018-11-05 13:30:44 UTC Comment hidden (obsolete)
Comment 376 Alex Arnaud 2018-11-05 13:31:05 UTC Comment hidden (obsolete)
Comment 377 Alex Arnaud 2018-11-05 15:27:21 UTC Comment hidden (obsolete)
Comment 378 Alex Arnaud 2018-11-05 15:37:41 UTC
(In reply to Jonathan Druart from comment #358)
> I will try to have a look at this one before the feature freeze to evaluate
> if this could be part of 18.11.
> 
> Could you catch possible QA failures (update the QA script repo and run it
> over the whole patchset)?
Done => nothing to fix.
Also, i run the tools on joubu/qa-test-tools-issue_3 branch which caused my last patch.
> 
> It would also help to have a remote branch with the stack up-to-date (the
> one on the biblibre repo is 18 months old), I tried to rebase but got:
>   error: sha1 information is lacking or useless
> (koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt).

Which repo ? github, biblibre ? Mana server ?

All patches are rebased here.
Comment 379 Kyle M Hall 2019-01-11 14:34:02 UTC
Alex, could you rebase this patch set again? I'd like to QA it!
Comment 380 Alex Arnaud 2019-01-14 09:57:18 UTC
Created attachment 83863 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 381 Alex Arnaud 2019-01-14 09:57:40 UTC
Created attachment 83864 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 382 Alex Arnaud 2019-01-14 09:58:04 UTC
Created attachment 83865 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 383 Alex Arnaud 2019-01-14 09:58:25 UTC
Created attachment 83866 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 384 Alex Arnaud 2019-01-14 09:58:44 UTC
Created attachment 83867 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 385 Alex Arnaud 2019-01-14 09:59:04 UTC
Created attachment 83868 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 386 Alex Arnaud 2019-01-14 09:59:32 UTC
Created attachment 83869 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 387 Alex Arnaud 2019-01-14 09:59:52 UTC
Created attachment 83870 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 388 Alex Arnaud 2019-01-14 10:00:10 UTC
Created attachment 83871 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 389 Alex Arnaud 2019-01-14 10:00:30 UTC
Created attachment 83872 [details] [review]
Bug 17047 - Fix retrieving Mana token

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 390 Alex Arnaud 2019-01-14 10:00:49 UTC
Created attachment 83873 [details] [review]
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 391 Alex Arnaud 2019-01-14 10:01:08 UTC
Created attachment 83874 [details] [review]
Bug 17047 - Move mana JS and put correct subscription id when sharing

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 392 Alex Arnaud 2019-01-14 10:01:26 UTC
Created attachment 83875 [details] [review]
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 393 Alex Arnaud 2019-01-14 10:01:50 UTC
Created attachment 83876 [details] [review]
Bug 17047: Koha::SharedContent subs snake casing/renaming

manaRequest           => process_request
manaIncrementRequest  => increment_entity_value
manaPostRequest       => send_entity
prepareSharedData     => prepare_entity_data
manaGetRequestWithId  => get_entity_by_id
manaGetRequest        => search_entities
buildRequest          => build_request
manaUrl               => get_sharing_url

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 394 Alex Arnaud 2019-01-14 10:02:08 UTC
Created attachment 83877 [details] [review]
Bug 17047: add a dedicated page for Mana setup

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 395 Alex Arnaud 2019-01-14 10:02:34 UTC
Created attachment 83878 [details] [review]
Bug 17047: [DO NOT PUSH] provide staff-global.css

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 396 Alex Arnaud 2019-01-14 10:02:55 UTC
Created attachment 83879 [details] [review]
Bug 17047: [DO NOT PUSH] provides schema files

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 397 Alex Arnaud 2019-01-14 10:03:14 UTC
Created attachment 83880 [details] [review]
Bug 17047: Fix reports sharing

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 398 Alex Arnaud 2019-01-14 10:03:35 UTC
Created attachment 83881 [details] [review]
Bug 17047: [QA tool] add template filters
Comment 399 Kyle M Hall 2019-01-14 18:46:36 UTC
Created attachment 83892 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 400 Kyle M Hall 2019-01-14 18:47:21 UTC
Created attachment 83893 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 401 Kyle M Hall 2019-01-14 18:47:35 UTC
Created attachment 83894 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 402 Kyle M Hall 2019-01-14 18:47:45 UTC
Created attachment 83895 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 403 Kyle M Hall 2019-01-14 18:47:58 UTC
Created attachment 83896 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 404 Kyle M Hall 2019-01-14 18:48:12 UTC
Created attachment 83897 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 405 Kyle M Hall 2019-01-14 18:48:29 UTC
Created attachment 83898 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 406 Kyle M Hall 2019-01-14 18:48:38 UTC
Created attachment 83899 [details] [review]
Bug 17047 - Move ability to comment mana entities from search results table to report/subscription detail page

+ code refactoring

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 407 Kyle M Hall 2019-01-14 18:48:48 UTC
Created attachment 83900 [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

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 408 Kyle M Hall 2019-01-14 18:48:58 UTC
Created attachment 83901 [details] [review]
Bug 17047 - Fix retrieving Mana token

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 409 Kyle M Hall 2019-01-14 18:49:10 UTC
Created attachment 83902 [details] [review]
Bug 17047 - Remove changes on Koha/Schema/Result/SavedSql.pm and Subscription.pm - mana.inc included twice

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 410 Kyle M Hall 2019-01-14 18:49:22 UTC
Created attachment 83903 [details] [review]
Bug 17047 - Move mana JS and put correct subscription id when sharing

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 411 Kyle M Hall 2019-01-14 18:49:33 UTC
Created attachment 83904 [details] [review]
Bug 17047: Fix unit tests Replace MANA_IP variable with subroutine Fix QA script warnings

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 412 Kyle M Hall 2019-01-14 18:49:43 UTC
Created attachment 83905 [details] [review]
Bug 17047: Koha::SharedContent subs snake casing/renaming

manaRequest           => process_request
manaIncrementRequest  => increment_entity_value
manaPostRequest       => send_entity
prepareSharedData     => prepare_entity_data
manaGetRequestWithId  => get_entity_by_id
manaGetRequest        => search_entities
buildRequest          => build_request
manaUrl               => get_sharing_url

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 413 Kyle M Hall 2019-01-14 18:49:54 UTC
Created attachment 83906 [details] [review]
Bug 17047: add a dedicated page for Mana setup

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 414 Kyle M Hall 2019-01-14 18:50:06 UTC
Created attachment 83907 [details] [review]
Bug 17047: [DO NOT PUSH] provide staff-global.css

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 415 Kyle M Hall 2019-01-14 18:50:15 UTC
Created attachment 83908 [details] [review]
Bug 17047: [DO NOT PUSH] provides schema files

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 416 Kyle M Hall 2019-01-14 18:50:24 UTC
Created attachment 83909 [details] [review]
Bug 17047: Fix reports sharing

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 417 Kyle M Hall 2019-01-14 18:50:32 UTC
Created attachment 83910 [details] [review]
Bug 17047: [QA tool] add template filters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 418 Kyle M Hall 2019-01-14 18:50:48 UTC
Created attachment 83911 [details] [review]
Bug 17047 [QA Followup] - Fixes to make unit tests pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 419 Kyle M Hall 2019-01-14 18:51:05 UTC
Created attachment 83912 [details] [review]
Bug 17047 [QA Followup] - Don't enable by default

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 420 Alex Arnaud 2019-01-17 15:28:22 UTC
Created attachment 84142 [details] [review]
Bug 17047: QA fixes:   - don't search subscriptions when mana is disabled,   - subscription detail page: don't show share button or search link if Mana is disabled,   - fix report sharing,   - submit report search form by pressing enter,   - add a waittin
Comment 421 Alex Arnaud 2019-01-17 15:59:27 UTC
Created attachment 84145 [details] [review]
Bug 17047: QA fixes:   - don't search subscriptions when mana is disabled,   - subscription detail page: don't show share button or search link if Mana is disabled,   - fix report sharing,   - submit report search form by pressing enter,   - add a waittin

foo
Comment 422 Nick Clemens 2019-01-18 19:10:40 UTC
Created attachment 84210 [details] [review]
Bug 17047: (follow-up) Improve mana messages, enable by default, show messages if not configured
Comment 423 Nick Clemens 2019-01-18 19:13:10 UTC
(In reply to Nick Clemens from comment #422)
> Created attachment 84210 [details] [review] [review]
> Bug 17047: (follow-up) Improve mana messages, enable by default, show
> messages if not configured

Hi Alex,

I added a followup to enable by default, show a helpful tip if not configured, and updated some language - if this one is okay can you remove the third option from the syspref, squash the followups and then I think we can push this one.

-Nick
Comment 424 Katrin Fischer 2019-01-19 09:12:35 UTC
Hi all, as this means you are communicating with an external server, I am not sure if we should enable by default. I think all those should be opt-in choices. Even an IP address is considered personal data.
Comment 425 Katrin Fischer 2019-01-19 09:15:09 UTC
So last comment doesn't get missed (it's a looong bug)
Comment 426 Paul Poulain 2019-01-19 09:30:11 UTC
(In reply to Katrin Fischer from comment #424)
> Hi all, as this means you are communicating with an external server, I am
> not sure if we should enable by default. I think all those should be opt-in
> choices. Even an IP address is considered personal data.

If it the syspref is set to 0, BUT there is no mana token, there's no communication.
The patch just remove the syspref value "I haven't decided" and replace it by "set to yes + no token = the librarian hasn't decided"
And the token is set only when the library ask for it by clicking on the "get token button".
Comment 427 Katrin Fischer 2019-01-19 09:55:34 UTC
Hi Paul, thx for replying!

I've applied the patches and taken a look at the configuration page. What's the difference between the 'no' and 'no, let me think about it'? Where is it explained? I think as the system preference reads "Enable request to Mana Webservice" this is not clear to the user that there is no communication without the token. I would feel better if we left to "no". We can still advertise Mana of course - I am not against the service at all, but I feel we should be consistent and clear about protecting user's privacy.

Noticing while testing: commmit messages are a bit messy and not following guidelines (old patch, I know, but easy to fix). I even volunteer doing it :)
Comment 428 Alex Arnaud 2019-01-21 09:44:53 UTC
Created attachment 84260 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 429 Alex Arnaud 2019-01-21 09:45:15 UTC
Created attachment 84261 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 430 Alex Arnaud 2019-01-21 09:45:42 UTC
Created attachment 84262 [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:
    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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 431 Alex Arnaud 2019-01-21 09:46:13 UTC
Created attachment 84263 [details] [review]
Bug 17047: add a dedicated page for Mana setup

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 432 Alex Arnaud 2019-01-21 09:46:51 UTC
Created attachment 84264 [details] [review]
Bug 17047: [DO NOT PUSH] provide staff-global.css

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 433 Alex Arnaud 2019-01-21 09:47:16 UTC
Created attachment 84265 [details] [review]
Bug 17047: [DO NOT PUSH] provides schema files

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 434 Alex Arnaud 2019-01-21 09:53:24 UTC
(In reply to Nick Clemens from comment #423)
> (In reply to Nick Clemens from comment #422)
> > Created attachment 84210 [details] [review] [review] [review]
> > Bug 17047: (follow-up) Improve mana messages, enable by default, show
> > messages if not configured
> 
> Hi Alex,
> 
> I added a followup to enable by default, show a helpful tip if not
> configured, and updated some language - if this one is okay can you remove
> the third option from the syspref, squash the followups and then I think we
> can push this one.
> 
> -Nick

Hi Nick,

Removed the third option, restore the IGNORE in SQL statement to make it idempotent and did a big squash.
Comment 435 Alex Arnaud 2019-01-21 10:08:14 UTC
(In reply to Katrin Fischer from comment #427)
> Hi Paul, thx for replying!
> 
> I've applied the patches and taken a look at the configuration page. What's
> the difference between the 'no' and 'no, let me think about it'? Where is it
> explained? I think as the system preference reads "Enable request to Mana
> Webservice" this is not clear to the user that there is no communication
> without the token. I would feel better if we left to "no". We can still
> advertise Mana of course - I am not against the service at all, but I feel
> we should be consistent and clear about protecting user's privacy.
> 
> Noticing while testing: commmit messages are a bit messy and not following
> guidelines (old patch, I know, but easy to fix). I even volunteer doing it :)

Hello Katrin,

It was a way to promote the feature (i say "it was" since we decided to remove this third option).
"No, let me think about it" was the default choice, and, in this case, the user saw a message telling him he has not decided yet to use or not Mana.

You can communicate with Mana if you did not set a token. You can retrieve subscriptions and reports but not share them.
Comment 436 Katrin Fischer 2019-01-21 11:30:21 UTC
(In reply to Alex Arnaud from comment #435)
 guidelines (old patch, I know, but easy to fix). I even volunteer doing it :)
> 
> Hello Katrin,
> 
> It was a way to promote the feature (i say "it was" since we decided to
> remove this third option).
> "No, let me think about it" was the default choice, and, in this case, the
> user saw a message telling him he has not decided yet to use or not Mana.
> 
> You can communicate with Mana if you did not set a token. You can retrieve
> subscriptions and reports but not share them.

Thx Alex for clearing this up! In this case I really think we should default to no, like we do for other external services like Covers, Hea etc.

I see the file attached. What could be a good way to provide that information to the users interested in Mana? 

We could update the wiki page: https://wiki.koha-community.org/wiki/Mana_central_database. Adding the information to the manual might also be good.
Comment 437 Paul Poulain 2019-01-21 12:52:28 UTC
(In reply to Katrin Fischer from comment #436)

> Thx Alex for clearing this up! In this case I really think we should default
> to no, like we do for other external services like Covers, Hea etc.
mana defaulted to yes/no token is similar to "I haven't explicitly decided". If we set it to "no" by default, then the library can miss the feature. I want to avoid the hea case where the default set to "no" result in many libraries missing the feature, and not saying "I don't want to share".
the proposed behavior is harmless from privacy as well as from ergonomics point of view.
So I really think we must not default to "no" and the proposed change is fine.

Hea is a good example of something we could have promoted better: how many libraries are not sharing because they don't know that hea exist vs not sharing because they don't want to share ?
I want to avoid this behavior.

> I see the file attached. What could be a good way to provide that
> information to the users interested in Mana? 
> 
> We could update the wiki page:
> https://wiki.koha-community.org/wiki/Mana_central_database. Adding the
> information to the manual might also be good.
I agree with promoting & documenting.
But that's not enough, many libraries don't read the doc, or don't investigate.
Add the case where an IT makes upgrade and the library don't even know...
So making mana visible in the staff interface, to be sure the librarian chose, and not only "don't know" is the way to go.
Comment 438 Katrin Fischer 2019-01-21 14:15:43 UTC
Hea is actually sending data. While it's not personal data, I still think having Hea turned off by default was the only way to go. We should not create an application that is calling home without asking. 

I actually liked your approach with the third option - turn off, but show a message to give them a note. Maybe this idea could be explored further?

But ultimately it would be nice to get more opinions on this, because we won't agree :)
Comment 439 Paul Poulain 2019-01-21 14:25:46 UTC
(In reply to Katrin Fischer from comment #438)
> Hea is actually sending data. While it's not personal data, I still think
> having Hea turned off by default was the only way to go. We should not
> create an application that is calling home without asking. 
> 
> I actually liked your approach with the third option - turn off, but show a
> message to give them a note. Maybe this idea could be explored further?
> 
> But ultimately it would be nice to get more opinions on this, because we
> won't agree :)

Hey, but we agree !!!
I fully agree that we don't want to activate HEA by default !
The mistake we made, was to set it OFF by default. The right approach would have been to have "undecided yet" by default. And show the "please, look at HEA, there's some important decision we want YOU do take". So the library can be warned they have a decision to take, a choice to make.
I'm sure that it would have been resulting in more libraries sharing.

That's what I wanted to avoid with MANA, and that's what's Kyle patch improve: our initial dev was a syspref with 3 status (explicit yes, explicit no, no explicit decision), and kyle found a way to have those 3 options with a binary syspref and the token
* syspref=yes / token empty => no explicit decision
* syspref=yes / token filled => explicit decision
* syspref=no => explicit decision

do you agree that we agree ? :D
Comment 440 Katrin Fischer 2019-01-21 14:39:57 UTC
"No undecided" sounds fine to me indeed :)

But I wonder if this is really the behaviur of the current patches? I think it said "Enabled" when I test installed the other day. But I won't have time for another test the next days :(
Comment 441 Alex Arnaud 2019-01-22 16:32:38 UTC
(In reply to Katrin Fischer from comment #440)
> "No undecided" sounds fine to me indeed :)
> 
> But I wonder if this is really the behaviur of the current patches? I think
> it said "Enabled" when I test installed the other day. But I won't have time
> for another test the next days :(

Katrin,

Does that means you are ok for the third option (the so called "No, let me think about it") as described above ?
Comment 442 Katrin Fischer 2019-01-23 06:39:52 UTC
(In reply to Alex Arnaud from comment #441)
> (In reply to Katrin Fischer from comment #440)
> > "No undecided" sounds fine to me indeed :)
> > 
> > But I wonder if this is really the behaviur of the current patches? I think
> > it said "Enabled" when I test installed the other day. But I won't have time
> > for another test the next days :(
> 
> Katrin,
> 
> Does that means you are ok for the third option (the so called "No, let me
> think about it") as described above ?

Yes, if I understood the feature correctly, I would be fine. I understand it would mean off by default, but with an information to the user that they might want to turn it on. Turning it yes or no would turn the message off.
Comment 443 Alex Arnaud 2019-01-23 09:27:00 UTC
Created attachment 84323 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 444 Alex Arnaud 2019-01-23 09:27:34 UTC
Created attachment 84324 [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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 445 Alex Arnaud 2019-01-23 09:27:58 UTC
Created attachment 84325 [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:
    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>

Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 446 Alex Arnaud 2019-01-23 09:28:20 UTC
Created attachment 84326 [details] [review]
Bug 17047: add a dedicated page for Mana setup

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 447 Alex Arnaud 2019-01-23 09:28:50 UTC
Created attachment 84327 [details] [review]
Bug 17047: Add a third option for Mana system preference

This adds the "No, let me think about it" option.
It is the default option. If the Mana system preference
is set to "No, let me think about it", the user is warned
on the admin home page that he has not decided yet to use
or not Mana knowlegde base.
Comment 448 Alex Arnaud 2019-01-23 09:29:11 UTC
Created attachment 84328 [details] [review]
Bug 17047: [DO NOT PUSH] provide staff-global.css

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 449 Alex Arnaud 2019-01-23 09:29:34 UTC
Created attachment 84329 [details] [review]
Bug 17047: [DO NOT PUSH] provides schema files

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 450 Alex Arnaud 2019-01-23 09:32:32 UTC
I re-added the third "No, let me think about it" option.
Also, reword the commit message to be consistent with the naming conventions.

Need a signoff for this last patch.
Comment 451 Kyle M Hall 2019-01-23 12:39:26 UTC
Created attachment 84332 [details] [review]
Bug 17047: Add a third option for Mana system preference

This adds the "No, let me think about it" option.
It is the default option. If the Mana system preference
is set to "No, let me think about it", the user is warned
on the admin home page that he has not decided yet to use
or not Mana knowlegde base.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 452 Nick Clemens 2019-01-23 14:43:28 UTC
Awesome work all!

This adds Mana with default setting 'No,let me think about it' which advertises the feature. I think before release we may want to consider a way to move this to a yes/no, but I think it will help advertise for testing and usage before release.

Pushed to master for 19.05
Comment 453 Martin Renvoize 2019-01-31 16:23:21 UTC
This enhancement will not be backported to the 18.11.x series.
Comment 454 Jonathan Druart 2019-02-16 15:21:32 UTC
Please add POD to Koha::SharedContent:

perldoc Koha/SharedContent.pm

DESCRIPTION
    Package for accessing shared content via Mana

  Package Functions
   process_request
   increment_entity_value
   send_entity
   prepare_entity_data
   get_entity_by_id
   search_entities
   build_request
   get_sharing_url
Comment 455 Katrin Fischer 2019-02-17 12:02:15 UTC
(In reply to Jonathan Druart from comment #454)
> Please add POD to Koha::SharedContent:
> 
> perldoc Koha/SharedContent.pm
> 
> DESCRIPTION
>     Package for accessing shared content via Mana
> 
>   Package Functions
>    process_request
>    increment_entity_value
>    send_entity
>    prepare_entity_data
>    get_entity_by_id
>    search_entities
>    build_request
>    get_sharing_url

Moved to Bug 22358 - Add POD to Koha::SharedContent
Comment 456 Jonathan Druart 2019-02-17 15:59:34 UTC
A couple of things wrong in serials/subscription-add.pl

1.
447     if ( defined( $query->param('mana_id') ) ) {

It's always defined, you wanted to test with ""

2. 
375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){

Mana == 2 == let me think about it
=> I am not expecting to reach Koha::SharedContent in that case
Comment 457 Lisette Scheer 2019-02-21 18:45:23 UTC
*** Bug 17045 has been marked as a duplicate of this bug. ***
Comment 458 Katrin Fischer 2019-02-24 11:35:30 UTC
(In reply to Jonathan Druart from comment #456)
> A couple of things wrong in serials/subscription-add.pl
> 
> 1.
> 447     if ( defined( $query->param('mana_id') ) ) {
> 
> It's always defined, you wanted to test with ""
> 
> 2. 
> 375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq
> "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){
> 
> Mana == 2 == let me think about it
> => I am not expecting to reach Koha::SharedContent in that case

Should we move this to a separate bug as well?
Comment 459 Jonathan Druart 2019-02-26 22:19:02 UTC
t/db_dependent/Koha/SharedContent.t:C4::Context->set_userenv(0,0,0,

->set_userenv should no longer be used in tests. See bug 21817.
Comment 460 Jonathan Druart 2019-05-04 16:21:56 UTC
(In reply to Katrin Fischer from comment #458)
> (In reply to Jonathan Druart from comment #456)
> > A couple of things wrong in serials/subscription-add.pl
> > 
> > 1.
> > 447     if ( defined( $query->param('mana_id') ) ) {
> > 
> > It's always defined, you wanted to test with ""
> > 
> > 2. 
> > 375     if ( (C4::Context->preference('Mana')) and ( grep { $_ eq
> > "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){
> > 
> > Mana == 2 == let me think about it
> > => I am not expecting to reach Koha::SharedContent in that case
> 
> Should we move this to a separate bug as well?

See bug 22849, I would have expected someone else to deal with that. I have opened the bug report, it's blocker for 19.05 IMO.

Comments should not be ignored, even when the work is pushed.
Comment 461 Jonathan Druart 2019-05-04 16:24:49 UTC
(In reply to Jonathan Druart from comment #459)
> t/db_dependent/Koha/SharedContent.t:C4::Context->set_userenv(0,0,0,
> 
> ->set_userenv should no longer be used in tests. See bug 21817.

See bug 22850.
Comment 462 Andrii Nugged 2021-11-27 17:43:14 UTC
Comment on attachment 84325 [details] [review]
Bug 17047: SQL reports management with Mana-KB

Hidden gem in https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84325&action=diff&headers=0#a/reports/guided_reports.pl_sec3 

➟

185	        'mana_success' => $input->param('mana_success'),
186	        'mana_success' => scalar $input->param('mana_success'),

"Double Mana" feature, but of course that's the hash so first one useless + more: it generates warning:

/koha/intranet/cgi-bin/reports/guided_reports.pl line 188