Bug 30708 - Creation of a new 'Preservation' module
Summary: Creation of a new 'Preservation' module
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Preservation (show other bugs)
Version: Main
Hardware: All All
: P3 new feature (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 34054 33289 34055 34215 34418
Blocks: 35071 36565 33547 35201 35230 35376 35377 35387 35463 35476 35477 35759 36629
  Show dependency treegraph
 
Reported: 2022-05-06 09:09 UTC by Séverine Queune
Modified: 2024-04-17 20:32 UTC (History)
20 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Large patch
Documentation contact: amaury.gau@bulac.fr
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/756
Text to go in the release notes:
This new module allows libraries to integrate preservation treatments into their workflow and monitor them. Its main goal is to attach data about the preservation treatments to items (contained in a new Koha table).
Version(s) released in:
23.11.00


Attachments
[Fr] Module Conservation - Note générale (166.71 KB, application/pdf)
2022-05-06 09:09 UTC, Séverine Queune
Details
[En] Preservation module - Main principles (164.08 KB, application/pdf)
2022-05-06 09:09 UTC, Séverine Queune
Details
[Fr] Module Conservation - Note générale (165.67 KB, application/pdf)
2022-05-06 12:59 UTC, Séverine Queune
Details
[Fr] Module Conservation - Annexe 1 Specs 'Administrateur' (286.44 KB, application/pdf)
2022-05-06 12:59 UTC, Séverine Queune
Details
[Fr] Module Conservation - Annexe 2 Specs 'Utilisateur' (190.66 KB, application/pdf)
2022-05-06 13:09 UTC, Séverine Queune
Details
[Fr] Module Conservation - Annexe 3 Specs 'Architecture' (161.36 KB, application/pdf)
2022-05-06 13:15 UTC, Séverine Queune
Details
[Fr] Module Conservation - Annexe 3 Specs 'Architecture' (160.13 KB, application/pdf)
2022-05-06 13:18 UTC, Séverine Queune
Details
[Fr] Module Conservation - Annexe 4 (299.55 KB, application/pdf)
2022-05-06 13:21 UTC, Séverine Queune
Details
[En] Preservation module - 1 'Admin' specifications (273.51 KB, application/pdf)
2022-05-09 09:43 UTC, Séverine Queune
Details
[En] Preservation module - 2 'Users' specifications (175.94 KB, application/pdf)
2022-05-09 09:44 UTC, Séverine Queune
Details
[En] Preservation module - 3 'Architecture' specifications (157.95 KB, application/pdf)
2022-05-09 09:44 UTC, Séverine Queune
Details
[En] Preservation module - 4 Appendix (289.95 KB, application/pdf)
2022-05-09 09:44 UTC, Séverine Queune
Details
Bug 30708: Add REST API controllers (25.33 KB, patch)
2023-07-03 13:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add REST API controllers (25.37 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add Koha Objects (21.93 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add tests (79.95 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: REST API specs (37.25 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Vue app (130.46 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DB changes (15.98 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add apache RewriteRule (1.49 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Koha controller script and template changes (11.57 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add user_train_item_id (15.14 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow edition of 'status for item added to train' (1.36 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Keep item attributes when editing a new processing (3.88 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Show the copy button right after the train is received (1.98 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Duplicate/copy items to an opened train (14.27 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow deletion of processings that are used (6.08 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow copy item to a train if the item already exists in a non-received train (6.60 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow adding new items to a closed train (7.45 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DBIC schema changes (17.77 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DBIC specific (3.34 KB, patch)
2023-07-03 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Allow attributes to be multivalued (11.31 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DO NOT PUSH - ONLY FOR DB UPDATE DURING TESTING STAGE (1.98 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DBIC (2.04 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Allow modifying attribute linked with AV to another value (2.53 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Set default values for items added in batch to a train (21.92 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: (follow-up) Add user_train_item_id (1.44 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Display AV descriptions instead of codes (8.78 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add spacing for buttons (2.25 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Prevent dropdown list to be hidden behind the modal (995 bytes, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add a default sort for trains (1.49 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add missing action buttons for non-table view (2.56 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Deal with deleted authorised value categories (3.21 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Fix Trains.ts tests (4.56 KB, patch)
2023-07-03 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Remove q_header from specs (2.18 KB, patch)
2023-07-06 15:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Screenshot of Train display (60.13 KB, image/jpeg)
2023-07-17 20:06 UTC, Heather
Details
Bug 30708: Add REST API controllers (25.49 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add Koha Objects (22.04 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add tests (80.07 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: REST API specs (37.39 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Vue app (130.58 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DB changes (16.09 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add apache RewriteRule (1.61 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Koha controller script and template changes (11.69 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add user_train_item_id (15.89 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow edition of 'status for item added to train' (1.48 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Keep item attributes when editing a new processing (4.00 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Show the copy button right after the train is received (2.10 KB, patch)
2023-08-03 08:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Duplicate/copy items to an opened train (14.39 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow deletion of processings that are used (6.20 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow copy item to a train if the item already exists in a non-received train (6.72 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow adding new items to a closed train (7.57 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DBIC schema changes (17.89 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DBIC specific (3.46 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Allow attributes to be multivalued (11.43 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DO NOT PUSH - ONLY FOR DB UPDATE DURING TESTING STAGE (2.10 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: DBIC (2.16 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Allow modifying attribute linked with AV to another value (2.65 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Set default values for items added in batch to a train (22.04 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Display AV descriptions instead of codes (8.90 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add spacing for buttons (2.37 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Prevent dropdown list to be hidden behind the modal (1.09 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add a default sort for trains (1.61 KB, patch)
2023-08-03 08:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add missing action buttons for non-table view (2.68 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Deal with deleted authorised value categories (3.33 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Fix Trains.ts tests (4.68 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Remove q_header from specs (2.30 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: (bugfix) Redirect to train list view after the train is deleted (1.24 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Rebase - Rewrite toolbar (6.80 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Rebase - Use name instead of url for router-links (25.29 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Rebase - Adjust breadcrumbs (21.21 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Rebase - Use a dedicated 'config' endpoint (17.57 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Do not allow non-authorised users to edit the settings (4.91 KB, patch)
2023-08-03 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Pass csrf_token to the Vue app (1.13 KB, patch)
2023-10-06 08:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Fix conflict with 34055 and 34219 (1.90 KB, patch)
2023-10-06 10:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Remove c->validation in API controllers (9.23 KB, patch)
2023-10-06 10:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Add REST API controllers (25.58 KB, patch)
2023-10-07 06:39 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add Koha Objects (22.12 KB, patch)
2023-10-07 06:39 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add tests (80.15 KB, patch)
2023-10-07 06:39 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: REST API specs (37.47 KB, patch)
2023-10-07 06:39 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Vue app (130.64 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: DB changes (16.18 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add apache RewriteRule (1.70 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Koha controller script and template changes (11.76 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add user_train_item_id (15.97 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Do not allow edition of 'status for item added to train' (1.57 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Keep item attributes when editing a new processing (4.09 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Show the copy button right after the train is received (2.20 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Duplicate/copy items to an opened train (14.47 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Do not allow deletion of processings that are used (6.29 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Do not allow copy item to a train if the item already exists in a non-received train (6.80 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Do not allow adding new items to a closed train (7.66 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: DBIC schema changes (17.97 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: DBIC specific (3.55 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Allow attributes to be multivalued (11.52 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: DO NOT PUSH - ONLY FOR DB UPDATE DURING TESTING STAGE (2.19 KB, patch)
2023-10-07 06:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: DBIC (2.25 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Allow modifying attribute linked with AV to another value (2.74 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Set default values for items added in batch to a train (22.12 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Display AV descriptions instead of codes (8.99 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add spacing for buttons (2.46 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Prevent dropdown list to be hidden behind the modal (1.18 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add a default sort for trains (1.70 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add missing action buttons for non-table view (2.77 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Deal with deleted authorised value categories (3.42 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Fix Trains.ts tests (4.77 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Remove q_header from specs (2.39 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: (bugfix) Redirect to train list view after the train is deleted (1.34 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Rebase - Rewrite toolbar (6.89 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Rebase - Use name instead of url for router-links (25.37 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Rebase - Adjust breadcrumbs (21.29 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Rebase - Use a dedicated 'config' endpoint (17.65 KB, patch)
2023-10-07 06:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Do not allow non-authorised users to edit the settings (5.00 KB, patch)
2023-10-07 06:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Pass csrf_token to the Vue app (1.22 KB, patch)
2023-10-07 06:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Fix conflict with 34055 and 34219 (1.99 KB, patch)
2023-10-07 06:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Remove c->validation in API controllers (9.32 KB, patch)
2023-10-07 06:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30708: Add 'preservation' to Makefile.PL (871 bytes, patch)
2023-10-20 11:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30708: Some spec fixes (6.56 KB, patch)
2023-10-20 11:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30708: Add missing koha_object(s)_class definitions (1.12 KB, patch)
2023-10-20 11:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30708: Fix API specs (3.48 KB, patch)
2023-10-20 12:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Last spec fixes (2.16 KB, patch)
2023-10-20 13:01 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30708: Adjust spec for train_item (881 bytes, patch)
2023-10-20 13:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30708: Adjust spec for train_item (1.60 KB, patch)
2023-10-20 16:04 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Séverine Queune 2022-05-06 09:09:20 UTC
Created attachment 134715 [details]
[Fr] Module Conservation - Note générale

The BULAC (http://www.bulac.fr/) would like to sponsor the development of a new feature (module or plugin) allowing to manage preservation treatment using Koha.

A complete description of the expected features in English and French are available in attachments.

In a few words, this new option :
  - can be activated like the ILL ou Housebound modules if developed as an integrated into Koha / plugin is also an option 
  - allows to created baskets and, optionality for now, budget tracking (like the Acquisitions module)
  - allows to create different profiles for treatments
  - allows to precisely locate an item in the workflow of Preservation treatments
  - keeps an history of the different processes for the items/records

As long as “Change sponsored?” is set on “Seeking developer”, anyone wanting to quote us for the development or just ask for more information is welcome to write to us: <sigb@bulac.fr>.
Comment 1 Séverine Queune 2022-05-06 09:09:52 UTC
Created attachment 134716 [details]
[En] Preservation module - Main principles
Comment 2 Marcel de Rooy 2022-05-06 09:46:01 UTC
Hi Severine,
We recently had a talk in our library about the need to save details about the condition of an item, vulnerability status (think of scan requests for precious books), and marking items as precious apart from a special collection status.

Might be a bit out of scope, but certainly in the periphery of this development.
Comment 3 Séverine Queune 2022-05-06 12:59:07 UTC
Created attachment 134732 [details]
[Fr] Module Conservation - Note générale
Comment 4 Séverine Queune 2022-05-06 12:59:47 UTC
Created attachment 134733 [details]
[Fr] Module Conservation - Annexe 1 Specs 'Administrateur'
Comment 5 Séverine Queune 2022-05-06 13:09:29 UTC
Created attachment 134734 [details]
[Fr] Module Conservation - Annexe 2 Specs 'Utilisateur'
Comment 6 Séverine Queune 2022-05-06 13:15:05 UTC Comment hidden (obsolete)
Comment 7 Séverine Queune 2022-05-06 13:18:13 UTC
Created attachment 134737 [details]
[Fr] Module Conservation - Annexe 3 Specs 'Architecture'
Comment 8 Séverine Queune 2022-05-06 13:21:07 UTC
Created attachment 134738 [details]
[Fr] Module Conservation - Annexe 4
Comment 9 Séverine Queune 2022-05-09 09:43:49 UTC
Created attachment 134782 [details]
[En] Preservation module - 1 'Admin' specifications
Comment 10 Séverine Queune 2022-05-09 09:44:06 UTC
Created attachment 134783 [details]
[En] Preservation module - 2 'Users' specifications
Comment 11 Séverine Queune 2022-05-09 09:44:20 UTC
Created attachment 134784 [details]
[En] Preservation module - 3 'Architecture' specifications
Comment 12 Séverine Queune 2022-05-09 09:44:36 UTC
Created attachment 134785 [details]
[En] Preservation module - 4 Appendix
Comment 13 Jonathan Druart 2023-04-12 09:48:57 UTC
Progress on this new feature can be found at
https://tree.taiga.io/project/joubu-koha-preservation-module/kanban

The current state of the code is at https://gitlab.com/joubu/Koha/-/commits/bug_30708
Comment 14 Jonathan Druart 2023-07-03 13:26:57 UTC
Created attachment 152939 [details] [review]
Bug 30708: Add REST API controllers

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 15 Jonathan Druart 2023-07-03 13:29:00 UTC
Created attachment 152940 [details] [review]
Bug 30708: Add REST API controllers

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 16 Jonathan Druart 2023-07-03 13:29:03 UTC
Created attachment 152941 [details] [review]
Bug 30708: Add Koha Objects

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 17 Jonathan Druart 2023-07-03 13:29:07 UTC
Created attachment 152942 [details] [review]
Bug 30708: Add tests

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 18 Jonathan Druart 2023-07-03 13:29:10 UTC
Created attachment 152943 [details] [review]
Bug 30708: REST API specs

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 19 Jonathan Druart 2023-07-03 13:29:14 UTC
Created attachment 152944 [details] [review]
Bug 30708: Vue app

This commit contains the main commit message

The description of the original need is described in documents attached by the sponsor on the bug report specifically "[En] Preservation module - Main principles".
The idea is to develop a whole new module to track the status of the documents that are sent for processings/treatments in order to preserve them (eg. covering).

This is a first step, more are certainly coming later.

The author and sponsors have worked for several months before providing this MVP version. The different discussion and needs can be found at https://tree.taiga.io/project/joubu-koha-preservation-module/kanban
Some ideas of the next steps are also listed.

The first iterations have been done using the classic .pl/.tt Koha style but we finally switched to a new Vue module, for more fun.

These patches made the following main changes:
New files
* Koha objects under Koha/Preservation
* REST API controllers under Koha/REST/V1/Preservation
* preservation/home.pl and preservation/home.tt
* Vue components under js/vue/components/Preservation
* tests under t/db_dependent/Koha/Preservation and t/db_dependent/api/v1/preservation_*
* Cypress tests under t/cypress/integration/Preservation
DB:
* 3 new sysprefs PreservationModule, PreservationNotForLoanWaitingListIn, PreservationNotForLoanDefaultTrainIn
* 1 new permission "preservation" (will be split into subpermissions later)
* 5 new tables:
- preservation_processings
- preservation_trains
- preservation_processing_attributes
- preservation_trains_items
- preservation_processing_attributes_items

Terminology and workflow:
*Processings* are the different treatments an item can receive during its stay in the preservation module
A *processing* is defined by a list of *attributes*. To make the module as easy to use for the librarians in charge of the preservation area a list of processings will be defined when the module will be set up. An *attribute* is a name and a value. That's it. However it also has a type, to define what the value is coming from: *free text*, *authorised value* or *database column*.
For instance if you are defining a processing that will handling the book cover you could have 3 *attributes*:
- first named "Barcode" that will be automatically filled with "items.barcode" (type *database column*"
- second attribute named "color" linked with a new PRES_COLOR authorised value category you would have previously defined with "red", "blue", "green", etc. (type *authorised value*)
- third attribute named "notes", because librarians like notes (type *free text*)
Important: Even if the attribute is linked with a DB column or AV category, the value will be automatically pre filled but will stay editable (could be a config option to restrict the edition, later, if needed).

The *status* of an item will change during the preservation process. First it will arrive in the preservation area and be on a *waiting list*. It is not processed already but is not available anymore for the patrons of the library. That's why we are going to use the "not for loan" (items.notforloan) value for this. This *waiting list* is a fictional concept, it simply lists all the items in the library with a specific *status*.
A *train* is... how they call that at the BULAC, a train (same in French!). And we quite like the word so we kept it. It is what it is: a list of items/waggons, one after each other. We could have picked "cart", "list", but the concepts were already used in different places. We are not strongly attached to the term and it can be modified (but it's spread all over the code already and will be tedious to modify!) if you have a very good suggestion :)
So, a *train* is where items are going after they have been sent to the waiting list. It's a stack of items that will be sent to a provider. When you create a new train you will be asked for the "Status for item added to this train", that will be the "not for loan" value to set to the items added to this train, and a "Default processing" that will be the processing used. But keep in mind that a train can have items that have different processings (specific case, will see later).
When all items have been added to a *train*, you can *close* it. You cannot add items anymore to it! Then you can *send* it, and finally *receive* it. They are just statuses to keep track of the dates, and filter trains by status.
However when a train is received you can *copy* an item to another (opened) train. It means that you have the item on hand but something went wrong, you are not happy with the work done by the supplier and want to send it back, so you create a new train (that can have different items, and it is the case where you will have items in a train that don't all have the same processing!).

Test plan:
A. Prerequisites
0. Just `reset_all` and jump to B, or:
1. Apache configuration
You will need to edit /etc/koha/apache-shared-intranet-git.conf and add the following lines after the RewriteRule for erm (line.24?)
RewriteCond %{REQUEST_URI} !^/cgi-bin/koha/preservation/.*.pl$
RewriteRule ^/cgi-bin/koha/preservation/.*$ /cgi-bin/koha/preservation/home.pl [PT]
The RewriteCond is only useful if you are testing the "print slips" bugs as well, but it cannot hurt to have it!
2. `yarn js:build` to regenerate the Vue app for the preservation module
3. `updatedatabase`
4. `restart_all`
B. Settings
0.
Create 2 different values for NOTLOAN, eg. 'In preservation' and 'In preservation external'
Create different authorised values for a new category, eg. PRES_COLORS: RED, BLUE, GREEN. Feel free to create more categories.
1. You can turn on the "PreservationModule" syspref and go to the Koha homepage to see a new "Preservation" link
2. You landed on the empty home page of the preservation, no worry! We need to fill this page with useful information! (see #2 on the kanban)
3. Go to settings
4. Set "Status for item added to waiting list" to "In preservation"
and "Default status for item added to train": "In preservation external"
Create a new processing and define some attributes. Ideally at least one of each type.
5. Go to "Waiting list" and add some items
6. Go to "Trains" and create several trains (at least 2). Notice that the "Status for item added to this train" value is set to the value defined in the settings, but can be modified. Notice that this status can be set when a train is created but it won't be possible to edit later.
7. Add items to a train. You can only add items that are already in the waiting list. Add values for the attributes. Notice that the attributes linked with a database column are automatically pre filled. Notice that attributes linked with an authorised value are displayed with a dropdown list but that a different value can be set (remember, this is a feature!). Notice that attributes can be multivalued.
8. Add other items to the waiting list, notice the "Add last X items to a train" link at the top of the waiting list table, click it
9. You can now add several items to a train, directly (for instance if you don't really need to pass through the waiting list). Values can be set for the batch, but attributes linked with a database column are not editable (they will be prefilled automatically)
10. Once you have a train with several items, look at the "show train" view and notice the item list. If all of them are using the same processing then a table is displayed, one column per attribute. However if at least one item of the train has a different processing then the items are not listed in a table.
11. Edit items and confirm that the values are correctly saved.
12. Close, send and receive a train
13. Once a train is closed you can no longer add items to it
14. Once a train is received notice that you can "copy" an item to another (opened) train

QA notes:
The patch is huge! New enhancements and improvements have been moved to separate bug reports but this cannot be split. We need a ground base to build on top.
The size is mainly coming from Vue components, Koha::Objects, REST API controllers and specs, and tests. Nothing hard ;)

More to come:
- See the kanban!
- Print slips (bug 33547 and bug 34030)
- Put something on the landing page!
- Link with the acquisition module (suppliers, funds, etc.)

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 20 Jonathan Druart 2023-07-03 13:29:17 UTC
Created attachment 152945 [details] [review]
Bug 30708: DB changes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 21 Jonathan Druart 2023-07-03 13:29:21 UTC
Created attachment 152946 [details] [review]
Bug 30708: Add apache RewriteRule

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 22 Jonathan Druart 2023-07-03 13:29:24 UTC
Created attachment 152947 [details] [review]
Bug 30708: Koha controller script and template changes

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 23 Jonathan Druart 2023-07-03 13:29:28 UTC
Created attachment 152948 [details] [review]
Bug 30708: Add user_train_item_id

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 24 Jonathan Druart 2023-07-03 13:29:32 UTC
Created attachment 152949 [details] [review]
Bug 30708: Do not allow edition of 'status for item added to train'

It does not seem useful to enforce it at lower level, it is not a
condition that will break the feature, but it does not feel correct to
allow the modification of this value

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 25 Jonathan Druart 2023-07-03 13:29:35 UTC
Created attachment 152950 [details] [review]
Bug 30708: Keep item attributes when editing a new processing

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 26 Jonathan Druart 2023-07-03 13:29:39 UTC
Created attachment 152951 [details] [review]
Bug 30708: Show the copy button right after the train is received

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 27 Jonathan Druart 2023-07-03 13:29:42 UTC
Created attachment 152952 [details] [review]
Bug 30708: Duplicate/copy items to an opened train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 28 Jonathan Druart 2023-07-03 13:29:45 UTC
Created attachment 152953 [details] [review]
Bug 30708: Do not allow deletion of processings that are used

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 29 Jonathan Druart 2023-07-03 13:29:49 UTC
Created attachment 152954 [details] [review]
Bug 30708: Do not allow copy item to a train if the item already exists in a non-received train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 30 Jonathan Druart 2023-07-03 13:29:52 UTC
Created attachment 152955 [details] [review]
Bug 30708: Do not allow adding new items to a closed train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 31 Jonathan Druart 2023-07-03 13:29:55 UTC
Created attachment 152956 [details] [review]
Bug 30708: DBIC schema changes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 32 Jonathan Druart 2023-07-03 13:29:59 UTC
Created attachment 152957 [details] [review]
Bug 30708: DBIC specific

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 33 Jonathan Druart 2023-07-03 13:30:02 UTC
Created attachment 152958 [details] [review]
Bug 30708: Allow attributes to be multivalued

This is not working as it, but we are going to fix the problem when
working on the "Set default values for items added in batch to a train"

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 34 Jonathan Druart 2023-07-03 13:30:06 UTC
Created attachment 152959 [details] [review]
Bug 30708: DO NOT PUSH - ONLY FOR DB UPDATE DURING TESTING STAGE

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 35 Jonathan Druart 2023-07-03 13:30:10 UTC
Created attachment 152960 [details] [review]
Bug 30708: DBIC

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 36 Jonathan Druart 2023-07-03 13:30:13 UTC
Created attachment 152961 [details] [review]
Bug 30708: Allow modifying attribute linked with AV to another value

If a value is not in the AV list, or if it differs slightly, they would
like to force the modification of the value, without creating a new
authorised value.

Note that this could be a candidate for an option at the attribute
level if there are different needs (ie. for some attributes we don't
want to allow an other value).

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 37 Jonathan Druart 2023-07-03 13:30:17 UTC
Created attachment 152962 [details] [review]
Bug 30708: Set default values for items added in batch to a train

Technical notes: Ideally we would have split TrainsFormAddItem to make some part
reusable, but it turned out into a complicated component that would have
been hard to maintain. It seems easier to have two different components.
Ideas to improve this area are welcome!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 38 Jonathan Druart 2023-07-03 13:30:20 UTC
Created attachment 152963 [details] [review]
Bug 30708: (follow-up) Add user_train_item_id

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 39 Jonathan Druart 2023-07-03 13:30:24 UTC
Created attachment 152964 [details] [review]
Bug 30708: Display AV descriptions instead of codes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 40 Jonathan Druart 2023-07-03 13:30:27 UTC
Created attachment 152965 [details] [review]
Bug 30708: Add spacing for buttons

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 41 Jonathan Druart 2023-07-03 13:30:31 UTC
Created attachment 152966 [details] [review]
Bug 30708: Prevent dropdown list to be hidden behind the modal

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 42 Jonathan Druart 2023-07-03 13:30:35 UTC
Created attachment 152967 [details] [review]
Bug 30708: Add a default sort for trains

We want opened, closed, sent, then finally received trains.
But ordering by desc for opened, and asc for the others.
Which means the last opened will be first, but the closed, send and received will display oldest first.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 43 Jonathan Druart 2023-07-03 13:30:38 UTC
Created attachment 152968 [details] [review]
Bug 30708: Add missing action buttons for non-table view

If items with different processings are in a train, there is only the "edit" action button.
It's missing "Remove" and "Copy".

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 44 Jonathan Druart 2023-07-03 13:30:42 UTC
Created attachment 152969 [details] [review]
Bug 30708: Deal with deleted authorised value categories

If a AV category is renamed or deleted, the app will freeze with
"TypeError: av_match is undefined"

To prevent that we add an check to prevent the freeze and a warning in
the settings.

We could eventually add a FK on option_source, but the idea was to let
it flexible in case we want to add another source.

This bug can be considered a configuration error anyway.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 45 Jonathan Druart 2023-07-03 13:30:45 UTC
Created attachment 152970 [details] [review]
Bug 30708: Fix Trains.ts tests

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 46 Jonathan Druart 2023-07-03 13:31:13 UTC
This patchset has been deeply tested and approve by the sponsor. Keeping the "Needs signoff" status to get an independent signoff.
Comment 47 Jonathan Druart 2023-07-05 10:03:42 UTC
Amaury (from BULAC) presented this development during a French conference (Symposium Kohala), here are the slides: https://drive.google.com/file/d/12IclGOcVrwivCNIg0KW1mBmaiukgpdp7/view?usp=sharing

It contains some screenshots.
Comment 48 Jonathan Druart 2023-07-06 15:45:11 UTC
Created attachment 153102 [details] [review]
Bug 30708: Remove q_header from specs

It broke the REST API routes.
Adjustement for bug 33971.
Comment 49 Heather 2023-07-13 15:55:05 UTC
I just came across this--I want it SO much!!  Unfortunately I don't have the expertise to do a sign off (I don't know how to do all the steps), but I hope someone who does know how to do it signs off on it!!!!
--h2
Comment 50 Amaury GAU 2023-07-14 08:53:50 UTC
(In reply to Heather from comment #49)
> I just came across this--I want it SO much!!  Unfortunately I don't have the
> expertise to do a sign off (I don't know how to do all the steps), but I
> hope someone who does know how to do it signs off on it!!!!
> --h2

Hi Heather, 
Thank you for your interest ! It would mean the world to us if you could test it. 
Here is a wiki page for patch testing.
https://wiki.koha-community.org/wiki/Sandboxes

If it's any trouble, feel free to contact me by email so we can arrange some time for you to try this patch.
Comment 51 Heather 2023-07-14 16:17:00 UTC
Hi!  Thank you!!  I am aware of that wiki page (it's SO helpful!) and have tested before, but I do have lots of questions (e.g., I don't see anyway to "reset all...") so I will send you an email!

Cheerio!
--h2
Comment 52 Heather 2023-07-17 20:06:13 UTC
Created attachment 153576 [details]
Screenshot of Train display
Comment 53 Heather 2023-07-17 20:17:03 UTC
Thank you again for your help & your email!  I have some questions:

Around step 7, I'm not sure I'm seeing everything I should when looking at a "Train"--I attached a screenshot.  I'm not sure I saw all this: "Notice that the attributes linked with a database column are automatically pre filled. Notice that attributes linked with an authorised value are displayed with a dropdown list but that a different value can be set..."  So maybe this is why the columns are empty?  I followed the test plan exactly, and when I added items to the train, boxes were empty, and therefore the boxes in this column were empty.  I was able to change the processing and get the different "non-column" display.  Is this looking the way it should?

I had a problem at step 9--it wouldn't allow me to add items to a train directly.  I got an error saying I had to add items through the waiting list.

Otherwise, everything worked!  Let me know if the screenshot is looking the way it should.  And let me know if I'm misunderstanding step 9.  If these are OK, I can sign off!  It looks like a great enhancement!!!

Cheerio!
h2
Comment 54 Amaury GAU 2023-07-19 12:28:16 UTC
(In reply to Heather from comment #53)
> Thank you again for your help & your email!  I have some questions:
> 
> Around step 7, I'm not sure I'm seeing everything I should when looking at a
> "Train"--I attached a screenshot.  I'm not sure I saw all this: "Notice that
> the attributes linked with a database column are automatically pre filled.
> Notice that attributes linked with an authorised value are displayed with a
> dropdown list but that a different value can be set..."  So maybe this is
> why the columns are empty?  I followed the test plan exactly, and when I
> added items to the train, boxes were empty, and therefore the boxes in this
> column were empty.  I was able to change the processing and get the
> different "non-column" display.  Is this looking the way it should?
> 
> I had a problem at step 9--it wouldn't allow me to add items to a train
> directly.  I got an error saying I had to add items through the waiting list.
> 
> Otherwise, everything worked!  Let me know if the screenshot is looking the
> way it should.  And let me know if I'm misunderstanding step 9.  If these
> are OK, I can sign off!  It looks like a great enhancement!!!
> 
> Cheerio!
> h2

Hi Heather, 

About the prefilled information, when you edit the processing settings, you can choose between for each attribute one of the following: 
- free text (not prefilled) 
- AV (not prefilled) 
- Date from Koha tables(such as author, editor, etc. ; prefilled) 

This is what you can notice after adding an item to the train. 

Concerning step 9. We asked specifically that no item could go to a train without passing through the waiting list. Like a decompression chamber if I might say so. Otherwise, if some items are already in the wainting list, then you can add them to the train, from the train page. 

I let you tell me if my answers/explanations are sufficient. 
Thank you again for the test. 

Regards, 
Amaury
Comment 55 Heather 2023-07-27 16:47:09 UTC
Hi, Amaury--

Today I'm getting a different problem--there is no "PreservationModule" syspref--no sysprefs with *preservation* in them anywhere.  When I try to apply this patch, I get this text:

---Begin quote:
 Bug 30708 Depends on bug 34054 (Signed Off)
Follow? [(y)es, (n)o] 
Bug 34054 - Allow to embed biblio on GET /items

153819 - Bug 34054: Add tests
153820 - Bug 34054: Allow to embed biblio on GET /items

Apply? [(y)es, (n)o, (i)nteractive] fatal: previous rebase directory .git/rebase-apply still exists but mbox given.
Patch left in /tmp/Bug-34054-Add-tests-eehavq7y.patch

Cannot apply cleanly patches from bug 34054. Everything will be left dirty.
git bz apply --continue will not continue the process if patches from other bug reports need to be applied.

{UNKNOWN}: Version control conflict marker at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 961, near "<<<<<<<"
Version control conflict marker at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 964, near "======="
Version control conflict marker at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 967, near ">>>>>>>"
BEGIN not safe after errors--compilation aborted at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1015.
Compilation failed in require at /usr/share/perl5/Class/C3/Componentised.pm line 146. at /usr/share/perl5/Class/C3/Componentised.pm line 151
Compilation failed in require at /kohadevbox/koha/C4/Installer.pm line 30.
BEGIN failed--compilation aborted at /kohadevbox/koha/C4/Installer.pm line 30.
Compilation failed in require at koha/installer/data/mysql/updatedatabase.pl line 40.
BEGIN failed--compilation aborted at koha/installer/data/mysql/updatedatabase.pl line 40.
---End quote

So perhaps there's a problem applying the patch to my sandbox?  (My sandbox is here, http://sandboxes.ptfs-europe.co.uk/ )

Thank you for your help!
--h2
Comment 56 Jonathan Druart 2023-07-27 19:31:33 UTC
(In reply to Heather from comment #55)
> Hi, Amaury--
> 
> Today I'm getting a different problem--there is no "PreservationModule"
> syspref--no sysprefs with *preservation* in them anywhere.  When I try to
> apply this patch, I get this text:

Please use the remote branch. On the sandbox creation form, click "advanced options"
  git remote & branch: 
    repository url: https://gitlab.com/joubu/Koha
    name of branch:  preservation_module

Nothing in the bug number.

Consider using the biblibre's sandboxes, on which I fixed a bug a couple of weeks ago when using a different remote.

Also note that there is an existing sandbox with this branch applied, that can be used for testing: https://staff-preservatio.sandboxes.biblibre.eu/
(I've just recreated it, it got destroyed by... I don't know!)

Don't use it to signoff however.
Comment 57 Laurence Rault 2023-07-28 14:15:27 UTC
Tested on https://staff-preservatio.sandboxes.biblibre.eu

1. ok
2. ok
3. ok
4. ok
Once a processing added, it can be removed (only if it is not used in a train), or edited
5. ok
Possible to add items from waiting list. Also possible to update items from the catalog (or by batch item modification) with the status defined in PreservationNotForLoanWaitingListIn, they'll appear in the waiting list.
6. ok
7. ok
Note : when adding manually a value not in the AV list for an attribute linked to an AV list, it does not update the AV list (and it is the feature).
The content of attributes linked to db fields can also be changed : example, change in the title
8. ok
9. ok ?
You can now add several items to a train, directly (for instance if you don't really need to pass through the waiting list) : I did not see that. From the train, you can only add one barcode at once. Possible only from the "Add last X items to a train" in the witing list.
Values can be set for the batch, but attributes linked with a database column are not editable (they will be prefilled automatically) : ok
10. ok
11. ok
12. ok
13. ok
In a closed ,sent, or received train, you cannot add new items, but you can edit them, and delete them : could deletion be a problem here ?
14. ok


More : 

1) in waiting items and train list, tables can be exported : the Actions column is exported with the data, should it be ?

2) Add items to a train : would it be possible, from a train, to check items in the waiting list to add them by batch ? (but maybe it has no sense because librarians have books in hand when filling a train)

3) It is not possible to re-open a train, would it be interesting ?

4) Item status does not change automatically at reception, may be useful to do that

5) In the train list, display the number of items in the train would be great

6) In the train the default processing is displayed, even if items have different processings. Maybe a processing different from the default should be displayed near its item ?

7) For a User not superlibrarian, with only Catalog and Preservation permission
When going to Preservation module : Something went wrong : error 400 : KO

8) My impression is that pages display slowly, with message "Loading" displayed, even with very few data (waiting list, train, train creation...)
Comment 58 Heather 2023-07-28 16:56:26 UTC
Hi!

@Jonathan, I used https://staff-preservatio.sandboxes.biblibre.eu/ to test and followed the test plan:  everything worked!  I didn't use this to sign off, since you said not to.  (I didn't get any of the errors that Laurence got, and didn't experience any slowness.)

I created a sandbox at biblibre.eu with your instructions to use the remote branch, etc., and tried using that to sign off, but it didn't work.

I want to sign off, but don't know how to do it directly here in Bugzilla, and the instructions on signing off on the wiki at:
https://wiki.koha-community.org/wiki/Sandboxes#Step_4:_Sign-off
Just say how to do it using a sandbox.

So, how can I sign off...?

Thanks!
h2
Comment 59 Jonathan Druart 2023-07-31 11:15:50 UTC
(In reply to Laurence Rault from comment #57)

Thanks!

> 9. ok ?
> You can now add several items to a train, directly (for instance if you
> don't really need to pass through the waiting list) : I did not see that.
> From the train, you can only add one barcode at once. Possible only from the
> "Add last X items to a train" in the witing list.

Yes, that's what I meant. Maybe the test plan was not clear.
You cannot add (for now) more than one item to a train if you are not using the "Add last X items" link.

> In a closed ,sent, or received train, you cannot add new items, but you can
> edit them, and delete them : could deletion be a problem here ?

Could be, I don't remember. Amaury?

> More : 
> 
> 1) in waiting items and train list, tables can be exported : the Actions
> column is exported with the data, should it be ?

No, I will fix later.

> 2) Add items to a train : would it be possible, from a train, to check items
> in the waiting list to add them by batch ? (but maybe it has no sense
> because librarians have books in hand when filling a train)

Everything is possible ;)
It's reported already on https://tree.taiga.io/project/joubu-koha-preservation-module/us/31

> 3) It is not possible to re-open a train, would it be interesting ?

We decided to keep it as simple as possible for a first version. Could be adjusted later.

> 4) Item status does not change automatically at reception, may be useful to
> do that

See https://tree.taiga.io/project/joubu-koha-preservation-module/us/10

> 5) In the train list, display the number of items in the train would be great

Good idea, I've created a new card https://tree.taiga.io/project/joubu-koha-preservation-module/us/40

> 6) In the train the default processing is displayed, even if items have
> different processings. Maybe a processing different from the default should
> be displayed near its item ?

Same, https://tree.taiga.io/project/joubu-koha-preservation-module/us/41

> 7) For a User not superlibrarian, with only Catalog and Preservation
> permission
> When going to Preservation module : Something went wrong : error 400 : KO

Ok, will fix later.

> 8) My impression is that pages display slowly, with message "Loading"
> displayed, even with very few data (waiting list, train, train creation...)

That's the sandboxes server, it is slow (and actually overloaded by a broken elastic box currently).

(In reply to Heather from comment #58)
> Hi!
Hi :) Thanks, Heather!

> So, how can I sign off...?

Just add a comment here, and switch the status to "Signed Off", I will deal with the rest of the signoff process myself.
Comment 60 Heather 2023-07-31 15:34:13 UTC
Hi, Jonathan!

> Just add a comment here, and switch the status to "Signed Off", I will deal
> with the rest of the signoff process myself.

Okey-dokey!  Thank you very much!
--h2
Comment 61 Jonathan Druart 2023-07-31 15:59:41 UTC
(In reply to Jonathan Druart from comment #59)
> (In reply to Laurence Rault from comment #57)
> > 
> > 1) in waiting items and train list, tables can be exported : the Actions
> > column is exported with the data, should it be ?
> 
> No, I will fix later.

See bug 34447, it's a global bugfix (will fix tables in the ERM module as well).

> > 7) For a User not superlibrarian, with only Catalog and Preservation
> > permission
> > When going to Preservation module : Something went wrong : error 400 : KO
> 
> Ok, will fix later.

Good catch. I had to provide the same fix we wrote for bug ERM on bug 33606.
Done in commit "Bug 30708: Rebase - Use a dedicated 'config' endpoint"

However there is still a problem when the logged in user tries to set the settings without having the necessary permissions.

I've adjusted the remote branch and the sandbox.
Comment 62 Jonathan Druart 2023-07-31 16:02:30 UTC
(In reply to Heather from comment #60)
> Hi, Jonathan!
> 
> > Just add a comment here, and switch the status to "Signed Off", I will deal
> > with the rest of the signoff process myself.
> 
> Okey-dokey!  Thank you very much!
> --h2

Thanks!

I've added your signed-off-by lines to the commits that were on the remote branch when you have tested.
Comment 63 Jonathan Druart 2023-07-31 16:22:05 UTC
(In reply to Jonathan Druart from comment #61)
> However there is still a problem when the logged in user tries to set the
> settings without having the necessary permissions.

Fixed in a new patch "Bug 30708: Do not allow non-authorised users to edit the settings"

I've adjusted the remote branch and the sandbox.
Comment 64 Laurence Rault 2023-08-03 07:53:48 UTC
User no superlibrarian with Preservation permission can access the module now and use it.
User with no Preservation permission can't access to any page of the Preservation module.

I sign off
Comment 65 Jonathan Druart 2023-08-03 08:22:14 UTC
Created attachment 154167 [details] [review]
Bug 30708: Add REST API controllers

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 66 Jonathan Druart 2023-08-03 08:22:19 UTC
Created attachment 154168 [details] [review]
Bug 30708: Add Koha Objects

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 67 Jonathan Druart 2023-08-03 08:22:23 UTC
Created attachment 154169 [details] [review]
Bug 30708: Add tests

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 68 Jonathan Druart 2023-08-03 08:22:27 UTC
Created attachment 154170 [details] [review]
Bug 30708: REST API specs

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 69 Jonathan Druart 2023-08-03 08:22:31 UTC
Created attachment 154171 [details] [review]
Bug 30708: Vue app

This commit contains the main commit message

The description of the original need is described in documents attached by the sponsor on the bug report specifically "[En] Preservation module - Main principles".
The idea is to develop a whole new module to track the status of the documents that are sent for processings/treatments in order to preserve them (eg. covering).

This is a first step, more are certainly coming later.

The author and sponsors have worked for several months before providing this MVP version. The different discussion and needs can be found at https://tree.taiga.io/project/joubu-koha-preservation-module/kanban
Some ideas of the next steps are also listed.

The first iterations have been done using the classic .pl/.tt Koha style but we finally switched to a new Vue module, for more fun.

These patches made the following main changes:
New files
* Koha objects under Koha/Preservation
* REST API controllers under Koha/REST/V1/Preservation
* preservation/home.pl and preservation/home.tt
* Vue components under js/vue/components/Preservation
* tests under t/db_dependent/Koha/Preservation and t/db_dependent/api/v1/preservation_*
* Cypress tests under t/cypress/integration/Preservation
DB:
* 3 new sysprefs PreservationModule, PreservationNotForLoanWaitingListIn, PreservationNotForLoanDefaultTrainIn
* 1 new permission "preservation" (will be split into subpermissions later)
* 5 new tables:
- preservation_processings
- preservation_trains
- preservation_processing_attributes
- preservation_trains_items
- preservation_processing_attributes_items

Terminology and workflow:
*Processings* are the different treatments an item can receive during its stay in the preservation module
A *processing* is defined by a list of *attributes*. To make the module as easy to use for the librarians in charge of the preservation area a list of processings will be defined when the module will be set up. An *attribute* is a name and a value. That's it. However it also has a type, to define what the value is coming from: *free text*, *authorised value* or *database column*.
For instance if you are defining a processing that will handling the book cover you could have 3 *attributes*:
- first named "Barcode" that will be automatically filled with "items.barcode" (type *database column*"
- second attribute named "color" linked with a new PRES_COLOR authorised value category you would have previously defined with "red", "blue", "green", etc. (type *authorised value*)
- third attribute named "notes", because librarians like notes (type *free text*)
Important: Even if the attribute is linked with a DB column or AV category, the value will be automatically pre filled but will stay editable (could be a config option to restrict the edition, later, if needed).

The *status* of an item will change during the preservation process. First it will arrive in the preservation area and be on a *waiting list*. It is not processed already but is not available anymore for the patrons of the library. That's why we are going to use the "not for loan" (items.notforloan) value for this. This *waiting list* is a fictional concept, it simply lists all the items in the library with a specific *status*.
A *train* is... how they call that at the BULAC, a train (same in French!). And we quite like the word so we kept it. It is what it is: a list of items/waggons, one after each other. We could have picked "cart", "list", but the concepts were already used in different places. We are not strongly attached to the term and it can be modified (but it's spread all over the code already and will be tedious to modify!) if you have a very good suggestion :)
So, a *train* is where items are going after they have been sent to the waiting list. It's a stack of items that will be sent to a provider. When you create a new train you will be asked for the "Status for item added to this train", that will be the "not for loan" value to set to the items added to this train, and a "Default processing" that will be the processing used. But keep in mind that a train can have items that have different processings (specific case, will see later).
When all items have been added to a *train*, you can *close* it. You cannot add items anymore to it! Then you can *send* it, and finally *receive* it. They are just statuses to keep track of the dates, and filter trains by status.
However when a train is received you can *copy* an item to another (opened) train. It means that you have the item on hand but something went wrong, you are not happy with the work done by the supplier and want to send it back, so you create a new train (that can have different items, and it is the case where you will have items in a train that don't all have the same processing!).

Test plan:
A. Prerequisites
0. Just `reset_all` and jump to B, or:
1. Apache configuration
You will need to edit /etc/koha/apache-shared-intranet-git.conf and add the following lines after the RewriteRule for erm (line.24?)
RewriteCond %{REQUEST_URI} !^/cgi-bin/koha/preservation/.*.pl$
RewriteRule ^/cgi-bin/koha/preservation/.*$ /cgi-bin/koha/preservation/home.pl [PT]
The RewriteCond is only useful if you are testing the "print slips" bugs as well, but it cannot hurt to have it!
2. `yarn js:build` to regenerate the Vue app for the preservation module
3. `updatedatabase`
4. `restart_all`
B. Settings
0.
Create 2 different values for NOTLOAN, eg. 'In preservation' and 'In preservation external'
Create different authorised values for a new category, eg. PRES_COLORS: RED, BLUE, GREEN. Feel free to create more categories.
1. You can turn on the "PreservationModule" syspref and go to the Koha homepage to see a new "Preservation" link
2. You landed on the empty home page of the preservation, no worry! We need to fill this page with useful information! (see #2 on the kanban)
3. Go to settings
4. Set "Status for item added to waiting list" to "In preservation"
and "Default status for item added to train": "In preservation external"
Create a new processing and define some attributes. Ideally at least one of each type.
5. Go to "Waiting list" and add some items
6. Go to "Trains" and create several trains (at least 2). Notice that the "Status for item added to this train" value is set to the value defined in the settings, but can be modified. Notice that this status can be set when a train is created but it won't be possible to edit later.
7. Add items to a train. You can only add items that are already in the waiting list. Add values for the attributes. Notice that the attributes linked with a database column are automatically pre filled. Notice that attributes linked with an authorised value are displayed with a dropdown list but that a different value can be set (remember, this is a feature!). Notice that attributes can be multivalued.
8. Add other items to the waiting list, notice the "Add last X items to a train" link at the top of the waiting list table, click it
9. You can now add several items to a train, directly (for instance if you don't really need to pass through the waiting list). Values can be set for the batch, but attributes linked with a database column are not editable (they will be prefilled automatically)
10. Once you have a train with several items, look at the "show train" view and notice the item list. If all of them are using the same processing then a table is displayed, one column per attribute. However if at least one item of the train has a different processing then the items are not listed in a table.
11. Edit items and confirm that the values are correctly saved.
12. Close, send and receive a train
13. Once a train is closed you can no longer add items to it
14. Once a train is received notice that you can "copy" an item to another (opened) train

QA notes:
The patch is huge! New enhancements and improvements have been moved to separate bug reports but this cannot be split. We need a ground base to build on top.
The size is mainly coming from Vue components, Koha::Objects, REST API controllers and specs, and tests. Nothing hard ;)

More to come:
- See the kanban!
- Print slips (bug 33547 and bug 34030)
- Put something on the landing page!
- Link with the acquisition module (suppliers, funds, etc.)

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 70 Jonathan Druart 2023-08-03 08:22:36 UTC
Created attachment 154172 [details] [review]
Bug 30708: DB changes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 71 Jonathan Druart 2023-08-03 08:22:40 UTC
Created attachment 154173 [details] [review]
Bug 30708: Add apache RewriteRule

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 72 Jonathan Druart 2023-08-03 08:22:44 UTC
Created attachment 154174 [details] [review]
Bug 30708: Koha controller script and template changes

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 73 Jonathan Druart 2023-08-03 08:22:47 UTC
Created attachment 154175 [details] [review]
Bug 30708: Add user_train_item_id

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 74 Jonathan Druart 2023-08-03 08:22:51 UTC
Created attachment 154176 [details] [review]
Bug 30708: Do not allow edition of 'status for item added to train'

It does not seem useful to enforce it at lower level, it is not a
condition that will break the feature, but it does not feel correct to
allow the modification of this value

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 75 Jonathan Druart 2023-08-03 08:22:55 UTC
Created attachment 154177 [details] [review]
Bug 30708: Keep item attributes when editing a new processing

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 76 Jonathan Druart 2023-08-03 08:22:59 UTC
Created attachment 154178 [details] [review]
Bug 30708: Show the copy button right after the train is received

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 77 Jonathan Druart 2023-08-03 08:23:03 UTC
Created attachment 154179 [details] [review]
Bug 30708: Duplicate/copy items to an opened train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 78 Jonathan Druart 2023-08-03 08:23:07 UTC
Created attachment 154180 [details] [review]
Bug 30708: Do not allow deletion of processings that are used

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 79 Jonathan Druart 2023-08-03 08:23:11 UTC
Created attachment 154181 [details] [review]
Bug 30708: Do not allow copy item to a train if the item already exists in a non-received train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 80 Jonathan Druart 2023-08-03 08:23:15 UTC
Created attachment 154182 [details] [review]
Bug 30708: Do not allow adding new items to a closed train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 81 Jonathan Druart 2023-08-03 08:23:19 UTC
Created attachment 154183 [details] [review]
Bug 30708: DBIC schema changes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 82 Jonathan Druart 2023-08-03 08:23:23 UTC
Created attachment 154184 [details] [review]
Bug 30708: DBIC specific

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 83 Jonathan Druart 2023-08-03 08:23:27 UTC
Created attachment 154185 [details] [review]
Bug 30708: Allow attributes to be multivalued

This is not working as it, but we are going to fix the problem when
working on the "Set default values for items added in batch to a train"

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 84 Jonathan Druart 2023-08-03 08:23:31 UTC
Created attachment 154186 [details] [review]
Bug 30708: DO NOT PUSH - ONLY FOR DB UPDATE DURING TESTING STAGE

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 85 Jonathan Druart 2023-08-03 08:23:35 UTC
Created attachment 154187 [details] [review]
Bug 30708: DBIC

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 86 Jonathan Druart 2023-08-03 08:23:39 UTC
Created attachment 154188 [details] [review]
Bug 30708: Allow modifying attribute linked with AV to another value

If a value is not in the AV list, or if it differs slightly, they would
like to force the modification of the value, without creating a new
authorised value.

Note that this could be a candidate for an option at the attribute
level if there are different needs (ie. for some attributes we don't
want to allow an other value).

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 87 Jonathan Druart 2023-08-03 08:23:43 UTC
Created attachment 154189 [details] [review]
Bug 30708: Set default values for items added in batch to a train

Technical notes: Ideally we would have split TrainsFormAddItem to make some part
reusable, but it turned out into a complicated component that would have
been hard to maintain. It seems easier to have two different components.
Ideas to improve this area are welcome!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 88 Jonathan Druart 2023-08-03 08:23:47 UTC
Created attachment 154190 [details] [review]
Bug 30708: Display AV descriptions instead of codes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 89 Jonathan Druart 2023-08-03 08:23:51 UTC
Created attachment 154191 [details] [review]
Bug 30708: Add spacing for buttons

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 90 Jonathan Druart 2023-08-03 08:23:55 UTC
Created attachment 154192 [details] [review]
Bug 30708: Prevent dropdown list to be hidden behind the modal

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 91 Jonathan Druart 2023-08-03 08:23:59 UTC
Created attachment 154193 [details] [review]
Bug 30708: Add a default sort for trains

We want opened, closed, sent, then finally received trains.
But ordering by desc for opened, and asc for the others.
Which means the last opened will be first, but the closed, send and received will display oldest first.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 92 Jonathan Druart 2023-08-03 08:24:03 UTC
Created attachment 154194 [details] [review]
Bug 30708: Add missing action buttons for non-table view

If items with different processings are in a train, there is only the "edit" action button.
It's missing "Remove" and "Copy".

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 93 Jonathan Druart 2023-08-03 08:24:07 UTC
Created attachment 154195 [details] [review]
Bug 30708: Deal with deleted authorised value categories

If a AV category is renamed or deleted, the app will freeze with
"TypeError: av_match is undefined"

To prevent that we add an check to prevent the freeze and a warning in
the settings.

We could eventually add a FK on option_source, but the idea was to let
it flexible in case we want to add another source.

This bug can be considered a configuration error anyway.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 94 Jonathan Druart 2023-08-03 08:24:11 UTC
Created attachment 154196 [details] [review]
Bug 30708: Fix Trains.ts tests

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 95 Jonathan Druart 2023-08-03 08:24:15 UTC
Created attachment 154197 [details] [review]
Bug 30708: Remove q_header from specs

It broke the REST API routes.
Adjustement for bug 33971.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 96 Jonathan Druart 2023-08-03 08:24:19 UTC
Created attachment 154198 [details] [review]
Bug 30708: (bugfix) Redirect to train list view after the train is deleted

Do not stay on the show train view.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 97 Jonathan Druart 2023-08-03 08:24:23 UTC
Created attachment 154199 [details] [review]
Bug 30708: Rebase - Rewrite toolbar

Bug 33417 has changed how we handle the toolbars in Vue apps, this patch
is adjusting the 'Preservation' module code on top of it, but also adds
to make it more flexible (see bug 34215).

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 98 Jonathan Druart 2023-08-03 08:24:27 UTC
Created attachment 154200 [details] [review]
Bug 30708: Rebase - Use name instead of url for router-links

Adjust code to match changes done by bug 32932.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 99 Jonathan Druart 2023-08-03 08:24:31 UTC
Created attachment 154201 [details] [review]
Bug 30708: Rebase - Adjust breadcrumbs

To match what has been done on bug 33169 and bug 34418.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 100 Jonathan Druart 2023-08-03 08:24:35 UTC
Created attachment 154202 [details] [review]
Bug 30708: Rebase - Use a dedicated 'config' endpoint

To retrieve the sysprefs, instead of using the svc script. See bug
33606.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 101 Jonathan Druart 2023-08-03 08:24:39 UTC
Created attachment 154203 [details] [review]
Bug 30708: Do not allow non-authorised users to edit the settings

In case the logged in user does not have manage_sysprefs we should no
display the form in the settings.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 102 Marcel de Rooy 2023-10-06 07:16:58 UTC
Still applies, looking here (no promise of a full QA yet given size)
Comment 103 Marcel de Rooy 2023-10-06 07:17:55 UTC
(In reply to Jonathan Druart from comment #47)
> Amaury (from BULAC) presented this development during a French conference
> (Symposium Kohala), here are the slides:
> https://drive.google.com/file/d/12IclGOcVrwivCNIg0KW1mBmaiukgpdp7/
> view?usp=sharing
> 
> It contains some screenshots.

French text :)
Comment 104 Jonathan Druart 2023-10-06 08:56:52 UTC
Created attachment 156592 [details] [review]
Bug 30708: Pass csrf_token to the Vue app

It's needed since bug 34369 to POST to the syspref route
Comment 105 Marcel de Rooy 2023-10-06 09:58:57 UTC
Seeing things like this in qa tools:

DBIx::Class::Relationship::ManyToMany::many_to_many():
***************************************************************************
The many-to-many relationship 'bundle_items' is trying to create a utility method
called set_bundle_items.
This will completely overwrite one such already existing method on class
Koha::Schema::Result::Item.

You almost certainly want to rename your method or the many-to-many
relationship, as the functionality of the original method will not be
accessible anymore.

To disable this warning set to a true value the environment variable
DBIC_OVERWRITE_HELPER_METHODS_OK
Comment 106 Marcel de Rooy 2023-10-06 09:59:32 UTC
        * Signed-off-by line 'Signed-off-by: BULAC - http://www.bulac.fr/' seems invalid
Comment 107 Marcel de Rooy 2023-10-06 10:00:43 UTC
$c->validation errors too in qa tools
Comment 108 Marcel de Rooy 2023-10-06 10:04:48 UTC
I do not object to signoff and pass qa but it is just a rough visual check. I understand that there was a lot of test feedback though.
The module is more or less separated from core features, so it wont hurt even if we should call it experimental or so.

I like to hear feedback for the DBIC stuff still.
Comment 109 Marcel de Rooy 2023-10-06 10:08:08 UTC
And a few (innocent) notes during the process:

But keep in mind that a train can have items that have different processings (specific case, will see later).
RewriteRule ^/cgi-bin/koha/preservation/.*$ /cgi-bin/koha/preservation/home.pl [PT]
ASK Shouldnt we have a few default NFL statuses added now ?

POST /api/v1/preservation/waiting-list/items: unhandled exception (Koha::Exceptions::Preservation::MissingSettings)<<The following parameter settings is required: PreservationNotForLoanWaitingListIn>>
POST /intranet/svc/config/systempreferences
Did not work at the start without warns or alerts.. Related to CSRF bug. Now solved, but error checking could be improved.

Home page
Kind of weird to land at an empty page constantly.

user_train_item_id => $max + 1,
Looking further, I wonder what is the exact use of this column? Cant really see when git grepping on it.

If a value is not in the AV list, or if it differs slightly, they would like to force the modification of the value, without creating a new authorised value.
-            value: "Paraguay",
=> Not very clear.
Comment 110 Jonathan Druart 2023-10-06 10:45:52 UTC
Created attachment 156596 [details] [review]
Bug 30708: Fix conflict with 34055 and 34219
Comment 111 Jonathan Druart 2023-10-06 10:45:57 UTC
Created attachment 156597 [details] [review]
Bug 30708: Remove c->validation in API controllers

Fixed conflict with bug 33556
Comment 112 Jonathan Druart 2023-10-06 10:58:17 UTC
(In reply to Marcel de Rooy from comment #105)
> Seeing things like this in qa tools:
> 
> DBIx::Class::Relationship::ManyToMany::many_to_many():
> ***************************************************************************
> The many-to-many relationship 'bundle_items' is trying to create a utility
> method
> called set_bundle_items.
> This will completely overwrite one such already existing method on class
> Koha::Schema::Result::Item.

"bundle_items", that's not related to this development.

It happens between the "before" and "after" the patch, we reload the different module (and so the schema file), that's why you see the warnings.

(In reply to Marcel de Rooy from comment #106)
>         * Signed-off-by line 'Signed-off-by: BULAC - http://www.bulac.fr/'
> seems invalid

We could add the whole team, but I think is what they want here.

(In reply to Marcel de Rooy from comment #107)
> $c->validation errors too in qa tools

Fixed.

Also fixed another bug.

(In reply to Marcel de Rooy from comment #109)
> And a few (innocent) notes during the process:
> 
> But keep in mind that a train can have items that have different processings
> (specific case, will see later).

Hum?

> RewriteRule ^/cgi-bin/koha/preservation/.*$
> /cgi-bin/koha/preservation/home.pl [PT]

Yes?

> ASK Shouldnt we have a few default NFL statuses added now ?

I don't think so. It really depends on how the library will use the module.
We could however add sample data in misc4dev.

> POST /api/v1/preservation/waiting-list/items: unhandled exception
> (Koha::Exceptions::Preservation::MissingSettings)<<The following parameter
> settings is required: PreservationNotForLoanWaitingListIn>>
> POST /intranet/svc/config/systempreferences
> Did not work at the start without warns or alerts.. Related to CSRF bug. Now
> solved, but error checking could be improved.

I don't think so. Discussed already in PM: this was a programming error, and a programmer/reviewer must have the JS console opened (especially if something wrong happened).
It's a whole global Koha question anyway, absolutely nothing directly related to this bug.

> Home page
> Kind of weird to land at an empty page constantly.

Please see the kanban, still lot of things in mind.
https://tree.taiga.io/project/joubu-koha-preservation-module/us/2

Note that we have the same for ERM.

> user_train_item_id => $max + 1,
> Looking further, I wonder what is the exact use of this column? Cant really
> see when git grepping on it.

For display/info purpose. We want the items inside a given train to be numbered.
This is the "ID" column displayed on the item table of the "show train" view.

> If a value is not in the AV list, or if it differs slightly, they would like
> to force the modification of the value, without creating a new authorised
> value.
> -            value: "Paraguay",
> => Not very clear.

(This is referring to bug 30708: Allow modifying attribute linked with AV to another value)
Before this patch it was not possible de force the value of a dropdown list, you had to select a value from the AV list.
With this patch it's possible to enter another value.
AV list is only there as suggestions, but not to force a choice.

Hence the rest of the commit message:
"""
Note that this could be a candidate for an option at the attribute
level if there are different needs (ie. for some attributes we don't
want to allow an other value).
"""
Comment 113 Marcel de Rooy 2023-10-07 06:39:47 UTC
Created attachment 156636 [details] [review]
Bug 30708: Add REST API controllers

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 114 Marcel de Rooy 2023-10-07 06:39:51 UTC
Created attachment 156637 [details] [review]
Bug 30708: Add Koha Objects

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 115 Marcel de Rooy 2023-10-07 06:39:55 UTC
Created attachment 156638 [details] [review]
Bug 30708: Add tests

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 116 Marcel de Rooy 2023-10-07 06:39:59 UTC
Created attachment 156639 [details] [review]
Bug 30708: REST API specs

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 117 Marcel de Rooy 2023-10-07 06:40:03 UTC
Created attachment 156640 [details] [review]
Bug 30708: Vue app

This commit contains the main commit message

The description of the original need is described in documents attached by the sponsor on the bug report specifically "[En] Preservation module - Main principles".
The idea is to develop a whole new module to track the status of the documents that are sent for processings/treatments in order to preserve them (eg. covering).

This is a first step, more are certainly coming later.

The author and sponsors have worked for several months before providing this MVP version. The different discussion and needs can be found at https://tree.taiga.io/project/joubu-koha-preservation-module/kanban
Some ideas of the next steps are also listed.

The first iterations have been done using the classic .pl/.tt Koha style but we finally switched to a new Vue module, for more fun.

These patches made the following main changes:
New files
* Koha objects under Koha/Preservation
* REST API controllers under Koha/REST/V1/Preservation
* preservation/home.pl and preservation/home.tt
* Vue components under js/vue/components/Preservation
* tests under t/db_dependent/Koha/Preservation and t/db_dependent/api/v1/preservation_*
* Cypress tests under t/cypress/integration/Preservation
DB:
* 3 new sysprefs PreservationModule, PreservationNotForLoanWaitingListIn, PreservationNotForLoanDefaultTrainIn
* 1 new permission "preservation" (will be split into subpermissions later)
* 5 new tables:
- preservation_processings
- preservation_trains
- preservation_processing_attributes
- preservation_trains_items
- preservation_processing_attributes_items

Terminology and workflow:
*Processings* are the different treatments an item can receive during its stay in the preservation module
A *processing* is defined by a list of *attributes*. To make the module as easy to use for the librarians in charge of the preservation area a list of processings will be defined when the module will be set up. An *attribute* is a name and a value. That's it. However it also has a type, to define what the value is coming from: *free text*, *authorised value* or *database column*.
For instance if you are defining a processing that will handling the book cover you could have 3 *attributes*:
- first named "Barcode" that will be automatically filled with "items.barcode" (type *database column*"
- second attribute named "color" linked with a new PRES_COLOR authorised value category you would have previously defined with "red", "blue", "green", etc. (type *authorised value*)
- third attribute named "notes", because librarians like notes (type *free text*)
Important: Even if the attribute is linked with a DB column or AV category, the value will be automatically pre filled but will stay editable (could be a config option to restrict the edition, later, if needed).

The *status* of an item will change during the preservation process. First it will arrive in the preservation area and be on a *waiting list*. It is not processed already but is not available anymore for the patrons of the library. That's why we are going to use the "not for loan" (items.notforloan) value for this. This *waiting list* is a fictional concept, it simply lists all the items in the library with a specific *status*.
A *train* is... how they call that at the BULAC, a train (same in French!). And we quite like the word so we kept it. It is what it is: a list of items/waggons, one after each other. We could have picked "cart", "list", but the concepts were already used in different places. We are not strongly attached to the term and it can be modified (but it's spread all over the code already and will be tedious to modify!) if you have a very good suggestion :)
So, a *train* is where items are going after they have been sent to the waiting list. It's a stack of items that will be sent to a provider. When you create a new train you will be asked for the "Status for item added to this train", that will be the "not for loan" value to set to the items added to this train, and a "Default processing" that will be the processing used. But keep in mind that a train can have items that have different processings (specific case, will see later).
When all items have been added to a *train*, you can *close* it. You cannot add items anymore to it! Then you can *send* it, and finally *receive* it. They are just statuses to keep track of the dates, and filter trains by status.
However when a train is received you can *copy* an item to another (opened) train. It means that you have the item on hand but something went wrong, you are not happy with the work done by the supplier and want to send it back, so you create a new train (that can have different items, and it is the case where you will have items in a train that don't all have the same processing!).

Test plan:
A. Prerequisites
0. Just `reset_all` and jump to B, or:
1. Apache configuration
You will need to edit /etc/koha/apache-shared-intranet-git.conf and add the following lines after the RewriteRule for erm (line.24?)
RewriteCond %{REQUEST_URI} !^/cgi-bin/koha/preservation/.*.pl$
RewriteRule ^/cgi-bin/koha/preservation/.*$ /cgi-bin/koha/preservation/home.pl [PT]
The RewriteCond is only useful if you are testing the "print slips" bugs as well, but it cannot hurt to have it!
2. `yarn js:build` to regenerate the Vue app for the preservation module
3. `updatedatabase`
4. `restart_all`
B. Settings
0.
Create 2 different values for NOTLOAN, eg. 'In preservation' and 'In preservation external'
Create different authorised values for a new category, eg. PRES_COLORS: RED, BLUE, GREEN. Feel free to create more categories.
1. You can turn on the "PreservationModule" syspref and go to the Koha homepage to see a new "Preservation" link
2. You landed on the empty home page of the preservation, no worry! We need to fill this page with useful information! (see #2 on the kanban)
3. Go to settings
4. Set "Status for item added to waiting list" to "In preservation"
and "Default status for item added to train": "In preservation external"
Create a new processing and define some attributes. Ideally at least one of each type.
5. Go to "Waiting list" and add some items
6. Go to "Trains" and create several trains (at least 2). Notice that the "Status for item added to this train" value is set to the value defined in the settings, but can be modified. Notice that this status can be set when a train is created but it won't be possible to edit later.
7. Add items to a train. You can only add items that are already in the waiting list. Add values for the attributes. Notice that the attributes linked with a database column are automatically pre filled. Notice that attributes linked with an authorised value are displayed with a dropdown list but that a different value can be set (remember, this is a feature!). Notice that attributes can be multivalued.
8. Add other items to the waiting list, notice the "Add last X items to a train" link at the top of the waiting list table, click it
9. You can now add several items to a train, directly (for instance if you don't really need to pass through the waiting list). Values can be set for the batch, but attributes linked with a database column are not editable (they will be prefilled automatically)
10. Once you have a train with several items, look at the "show train" view and notice the item list. If all of them are using the same processing then a table is displayed, one column per attribute. However if at least one item of the train has a different processing then the items are not listed in a table.
11. Edit items and confirm that the values are correctly saved.
12. Close, send and receive a train
13. Once a train is closed you can no longer add items to it
14. Once a train is received notice that you can "copy" an item to another (opened) train

QA notes:
The patch is huge! New enhancements and improvements have been moved to separate bug reports but this cannot be split. We need a ground base to build on top.
The size is mainly coming from Vue components, Koha::Objects, REST API controllers and specs, and tests. Nothing hard ;)

More to come:
- See the kanban!
- Print slips (bug 33547 and bug 34030)
- Put something on the landing page!
- Link with the acquisition module (suppliers, funds, etc.)

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 118 Marcel de Rooy 2023-10-07 06:40:07 UTC
Created attachment 156641 [details] [review]
Bug 30708: DB changes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 119 Marcel de Rooy 2023-10-07 06:40:10 UTC
Created attachment 156642 [details] [review]
Bug 30708: Add apache RewriteRule

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 120 Marcel de Rooy 2023-10-07 06:40:14 UTC
Created attachment 156643 [details] [review]
Bug 30708: Koha controller script and template changes

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 121 Marcel de Rooy 2023-10-07 06:40:19 UTC
Created attachment 156644 [details] [review]
Bug 30708: Add user_train_item_id

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 122 Marcel de Rooy 2023-10-07 06:40:22 UTC
Created attachment 156645 [details] [review]
Bug 30708: Do not allow edition of 'status for item added to train'

It does not seem useful to enforce it at lower level, it is not a
condition that will break the feature, but it does not feel correct to
allow the modification of this value

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 123 Marcel de Rooy 2023-10-07 06:40:26 UTC
Created attachment 156646 [details] [review]
Bug 30708: Keep item attributes when editing a new processing

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 124 Marcel de Rooy 2023-10-07 06:40:29 UTC
Created attachment 156647 [details] [review]
Bug 30708: Show the copy button right after the train is received

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 125 Marcel de Rooy 2023-10-07 06:40:33 UTC
Created attachment 156648 [details] [review]
Bug 30708: Duplicate/copy items to an opened train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 126 Marcel de Rooy 2023-10-07 06:40:37 UTC
Created attachment 156649 [details] [review]
Bug 30708: Do not allow deletion of processings that are used

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 127 Marcel de Rooy 2023-10-07 06:40:41 UTC
Created attachment 156650 [details] [review]
Bug 30708: Do not allow copy item to a train if the item already exists in a non-received train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 128 Marcel de Rooy 2023-10-07 06:40:44 UTC
Created attachment 156651 [details] [review]
Bug 30708: Do not allow adding new items to a closed train

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 129 Marcel de Rooy 2023-10-07 06:40:48 UTC
Created attachment 156652 [details] [review]
Bug 30708: DBIC schema changes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 130 Marcel de Rooy 2023-10-07 06:40:52 UTC
Created attachment 156653 [details] [review]
Bug 30708: DBIC specific

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 131 Marcel de Rooy 2023-10-07 06:40:55 UTC
Created attachment 156654 [details] [review]
Bug 30708: Allow attributes to be multivalued

This is not working as it, but we are going to fix the problem when
working on the "Set default values for items added in batch to a train"

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 132 Marcel de Rooy 2023-10-07 06:40:59 UTC
Created attachment 156655 [details] [review]
Bug 30708: DO NOT PUSH - ONLY FOR DB UPDATE DURING TESTING STAGE

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 133 Marcel de Rooy 2023-10-07 06:41:02 UTC
Created attachment 156656 [details] [review]
Bug 30708: DBIC

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 134 Marcel de Rooy 2023-10-07 06:41:06 UTC
Created attachment 156657 [details] [review]
Bug 30708: Allow modifying attribute linked with AV to another value

If a value is not in the AV list, or if it differs slightly, they would
like to force the modification of the value, without creating a new
authorised value.

Note that this could be a candidate for an option at the attribute
level if there are different needs (ie. for some attributes we don't
want to allow an other value).

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 135 Marcel de Rooy 2023-10-07 06:41:10 UTC
Created attachment 156658 [details] [review]
Bug 30708: Set default values for items added in batch to a train

Technical notes: Ideally we would have split TrainsFormAddItem to make some part
reusable, but it turned out into a complicated component that would have
been hard to maintain. It seems easier to have two different components.
Ideas to improve this area are welcome!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 136 Marcel de Rooy 2023-10-07 06:41:13 UTC
Created attachment 156659 [details] [review]
Bug 30708: Display AV descriptions instead of codes

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 137 Marcel de Rooy 2023-10-07 06:41:17 UTC
Created attachment 156660 [details] [review]
Bug 30708: Add spacing for buttons

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 138 Marcel de Rooy 2023-10-07 06:41:20 UTC
Created attachment 156661 [details] [review]
Bug 30708: Prevent dropdown list to be hidden behind the modal

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 139 Marcel de Rooy 2023-10-07 06:41:24 UTC
Created attachment 156662 [details] [review]
Bug 30708: Add a default sort for trains

We want opened, closed, sent, then finally received trains.
But ordering by desc for opened, and asc for the others.
Which means the last opened will be first, but the closed, send and received will display oldest first.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 140 Marcel de Rooy 2023-10-07 06:41:28 UTC
Created attachment 156663 [details] [review]
Bug 30708: Add missing action buttons for non-table view

If items with different processings are in a train, there is only the "edit" action button.
It's missing "Remove" and "Copy".

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 141 Marcel de Rooy 2023-10-07 06:41:32 UTC
Created attachment 156664 [details] [review]
Bug 30708: Deal with deleted authorised value categories

If a AV category is renamed or deleted, the app will freeze with
"TypeError: av_match is undefined"

To prevent that we add an check to prevent the freeze and a warning in
the settings.

We could eventually add a FK on option_source, but the idea was to let
it flexible in case we want to add another source.

This bug can be considered a configuration error anyway.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 142 Marcel de Rooy 2023-10-07 06:41:35 UTC
Created attachment 156665 [details] [review]
Bug 30708: Fix Trains.ts tests

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 143 Marcel de Rooy 2023-10-07 06:41:39 UTC
Created attachment 156666 [details] [review]
Bug 30708: Remove q_header from specs

It broke the REST API routes.
Adjustement for bug 33971.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 144 Marcel de Rooy 2023-10-07 06:41:42 UTC
Created attachment 156667 [details] [review]
Bug 30708: (bugfix) Redirect to train list view after the train is deleted

Do not stay on the show train view.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 145 Marcel de Rooy 2023-10-07 06:41:46 UTC
Created attachment 156668 [details] [review]
Bug 30708: Rebase - Rewrite toolbar

Bug 33417 has changed how we handle the toolbars in Vue apps, this patch
is adjusting the 'Preservation' module code on top of it, but also adds
to make it more flexible (see bug 34215).

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 146 Marcel de Rooy 2023-10-07 06:41:50 UTC
Created attachment 156669 [details] [review]
Bug 30708: Rebase - Use name instead of url for router-links

Adjust code to match changes done by bug 32932.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 147 Marcel de Rooy 2023-10-07 06:41:54 UTC
Created attachment 156670 [details] [review]
Bug 30708: Rebase - Adjust breadcrumbs

To match what has been done on bug 33169 and bug 34418.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 148 Marcel de Rooy 2023-10-07 06:41:57 UTC
Created attachment 156671 [details] [review]
Bug 30708: Rebase - Use a dedicated 'config' endpoint

To retrieve the sysprefs, instead of using the svc script. See bug
33606.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 149 Marcel de Rooy 2023-10-07 06:42:01 UTC
Created attachment 156672 [details] [review]
Bug 30708: Do not allow non-authorised users to edit the settings

In case the logged in user does not have manage_sysprefs we should no
display the form in the settings.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 150 Marcel de Rooy 2023-10-07 06:42:05 UTC
Created attachment 156673 [details] [review]
Bug 30708: Pass csrf_token to the Vue app

It's needed since bug 34369 to POST to the syspref route

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 151 Marcel de Rooy 2023-10-07 06:42:08 UTC
Created attachment 156674 [details] [review]
Bug 30708: Fix conflict with 34055 and 34219

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 152 Marcel de Rooy 2023-10-07 06:42:12 UTC
Created attachment 156675 [details] [review]
Bug 30708: Remove c->validation in API controllers

Fixed conflict with bug 33556

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 153 Marcel de Rooy 2023-10-07 06:44:25 UTC
See former comments. Looks good to me. Another set of QA eyes would not hurt but I do not feel that it is a must. Feel free to change status back and have another QA round if so.
Comment 154 Nick Clemens 2023-10-12 14:05:20 UTC
(In reply to Marcel de Rooy from comment #153)
> See former comments. Looks good to me. Another set of QA eyes would not hurt
> but I do not feel that it is a must. Feel free to change status back and
> have another QA round if so.

I didn't read the code, but I ran through the test plan to QA the notice slips, things work as expected and seems like a cool new workflow
Comment 155 David Cook 2023-10-15 23:56:21 UTC
Apologies for coming in this late, but I'm a bit concerned about the use of the term "train" here. 

Jonathan has explained the term at https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30708#c19 and I've briefly read through the "Utilisateurs"/"Users" specifications. The French PDF uses the term "Train" while the English PDF uses the term "Batch", which is a more common term in English and in Koha.

I took a preservation course during my librarian degree and I'd never heard the term "train" used in the context of preservation, so I think librarians with previous preservation experience might be confused/confronted by preservation in Koha.

I imagine that this might also cause some issues for translators? 

I've briefly moved the status from "Passed QA" to "In Discussion" as I'd like to gather some more feedback about this term...

...but at the same time I don't necessarily want to hold up this development.
Comment 156 David Cook 2023-10-16 00:00:43 UTC
Adding in Katrin as she might have some input from the translator perspective
Comment 157 Heather 2023-10-16 16:41:29 UTC
Hi!

I think the fact that the term "train" is a cognate in English and French, two widely used languages worldwide, is a strong argument in its favor.  Although https://wiki.koha-community.org/wiki/Documentation_-_Content_Development_Guide states, "Language - US English (Simplified)," the word "train" is very common.  Moreover, a "truck train" is a commonly understood term for a bunch of trailers attached to one cab--and a preservation "train" is a similar thing, with a bunch of items needing preservation treatments all going off together!

Yes--"batch" is more commonly used in US English preservation work.  And, yes, we are preferring US English in the Koha English interface (e.g., the button says "Cataloging" not "Cataloguing"), but, to me, that doesn't mean that one necessarily needs to select a more common term in a non-automated workflow when automating the workflow.

I think the Preservation Module in Koha will be automating workflows in A LOT of libraries that have not had the opportunity to incorporate automated preservation workflows into their ILS, and so it will be easy to adapt to saying, e.g., "This batch that we used to represent on a spreadsheet will be represented in a Koha Train."  (We all call "developments" "bugs" and got used to that, too!)

(And am I the only one hearing the song, "C'mon N' Ride It (The Train)" every time I think about this bug?  "It's the choo choo!  It's the choo choo!!")

A Koha Train.  Makes sense to me!  But I also would happily stand aside on the issue if others feel strongly about changing the language to "batch"--it's not a big deal for me.
--USian Cataloger Who Also Does Preservation, h2:)
Comment 158 Jonathan Druart 2023-10-16 18:51:54 UTC
(In reply to Heather from comment #157)
> (And am I the only one hearing the song, "C'mon N' Ride It (The Train)"
> every time I think about this bug?  "It's the choo choo!  It's the choo
> choo!!")

I am glad you found THE point nobody will be able to counter-argument! :D

Thanks for your input!
Comment 159 Katrin Fischer 2023-10-16 19:25:20 UTC
Hi Heather, I admit, I also stumbled on the train terminology - for translators I think it might be easier to use batch. I remember someone abbreviated category with 'cat' in the GUI once, and you can imagine how well that ended ;) *meow* 

But: I would not insist on changing it, knowing it's a term used in preservation.
Comment 160 Jonathan Druart 2023-10-16 20:35:40 UTC
Number of lines with "train"
% git grep -i train|grep -vi constraint|wc -l
1443

They are almost all valid. That's the number of lines that I will need to change (not counting the number of files to rename).

This "train" word is public since the beginning of the development, and we make sure to have people with interest in it onboard with us very soon (to avoid those kind of disagreement, lol!).

I don't mind changing everything, and retesting the whole thing. But maybe it would be nice for the everybody's sanity (and especially mine here) to wake up before things have passed the finish line?...

Please take a decision ASAP.

I am in the "train" side (how/when do we vote?).
Comment 161 Katrin Fischer 2023-10-16 20:48:33 UTC
I am ok with keeping it as Heather confirmed as a native speaker that it makes sense to her.
Comment 162 David Cook 2023-10-16 23:17:44 UTC
(In reply to Jonathan Druart from comment #160)
> I don't mind changing everything, and retesting the whole thing. But maybe
> it would be nice for the everybody's sanity (and especially mine here) to
> wake up before things have passed the finish line?...

In the interest of sanity, I think that it's probably too late to make a change from "train" to "batch".

As Heather mentioned, I do think that people can become accustomed to the "train" terminology as being specifically part of Koha. Perhaps the documentation can address it by saying it is synonymous with batch. 

I suppose we'll see how translators go.

> Please take a decision ASAP.
> 
> I am in the "train" side (how/when do we vote?).

I suppose we don't really have a good process for working out situations like this.

But I've posed the question and no one seems to think it's a blocker so I'm moving back to "Passed QA".

I suppose that this train will keep chugging along.
Comment 163 Jonathan Druart 2023-10-17 06:24:36 UTC
I have opened bug 35071 if we want to continue this discussion and find a better solution.
Comment 164 Katrin Fischer 2023-10-17 07:20:36 UTC
So with the amount of testing we got here - Nick also said he ran through the test plan I think - are we ready to push?
Comment 165 Tomás Cohen Arazi 2023-10-18 18:43:49 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 166 Tomás Cohen Arazi 2023-10-20 11:34:25 UTC
Created attachment 157502 [details] [review]
Bug 30708: Add 'preservation' to Makefile.PL

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 167 Tomás Cohen Arazi 2023-10-20 11:44:08 UTC
Created attachment 157503 [details] [review]
Bug 30708: Some spec fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 168 Tomás Cohen Arazi 2023-10-20 11:50:16 UTC
Created attachment 157506 [details] [review]
Bug 30708: Add missing koha_object(s)_class definitions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 169 Jonathan Druart 2023-10-20 12:30:01 UTC
Created attachment 157508 [details] [review]
Bug 30708: Fix API specs
Comment 170 Tomás Cohen Arazi 2023-10-20 13:01:26 UTC
Created attachment 157512 [details] [review]
Bug 30708: Last spec fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 171 Jonathan Druart 2023-10-20 13:19:06 UTC
Created attachment 157514 [details] [review]
Bug 30708: Adjust spec for train_item
Comment 172 Jonathan Druart 2023-10-20 16:04:41 UTC
Created attachment 157557 [details] [review]
Bug 30708: Adjust spec for train_item