Bug 20472

Summary: Add digital scan as optional format to Article Requests
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: CirculationAssignee: Marcel de Rooy <m.de.rooy>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26088
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 20469    
Bug Blocks: 20570    
Attachments: Bug 20472: Add new fields article_requests.format and urls
Bug 20472: Db rev for new preference ArticleRequestsSupportedFormats
Bug 20472: Add format field to the interface
Bug 20472: Add format to sample notices
Bug 20472: Edit URL field on staff form
DO_NOT_PUSH: Change DBIx schema file ArticleRequest
Bug 20472: Update translated AR notices
Bug 20472: Add new fields article_requests.format and urls
Bug 20472: Db rev for new preference ArticleRequestsSupportedFormats
Bug 20472: Add format field to the interface
Bug 20472: Add format to sample notices
Bug 20472: Edit URL field on staff form
DO_NOT_PUSH: Change DBIx schema file ArticleRequest
Bug 20472: Update translated AR notices

Description Marcel de Rooy 2018-03-26 12:25:39 UTC

    
Comment 1 Marcel de Rooy 2018-04-11 13:39:07 UTC
Have this patch set in test stage on 16.11. Plan to move them upwards after the 18.05 release.
Comment 2 Marcel de Rooy 2020-07-29 14:48:24 UTC
Created attachment 107506 [details] [review]
Bug 20472: Add new fields article_requests.format and urls

The field 'format' will allow to make a distinction between requests for
photocopies and digital scans.
The field 'urls' will be used to save the URLs that allow the client to
download the scanned materials.

Test plan:
Run new install or upgrade existing install with atomic update.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2020-07-29 14:48:28 UTC
Created attachment 107507 [details] [review]
Bug 20472: Db rev for new preference ArticleRequestsSupportedFormats

This preference controls which formats are actually offered to patrons of
the library via the Article Request feature.
By default, it only contains PHOTOCOPY. This is default behavior.

The request format SCAN will be made possible by this report and can be
added by changing the preference.

Test plan:
Run the dbrev. Check the new pref on Administration.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2020-07-29 14:48:33 UTC
Created attachment 107508 [details] [review]
Bug 20472: Add format field to the interface

We need to add the format to the forms entering new requests:
  opac/opac-request-article
  circ/request-article
If the pref contains multiple formats like SCAN|PHOTOCOPY, the first listed
format will be preselected on the request form. If there is only one option,
we should not disable the select however. (Possibly hide it.)

If we have no mandatory fields, we should not allow the submit of a complete
empty form (check on OPAC).

And we need to show the format of pending requests on forms:
  opac/opac-user
  circ/request-article (biblio detail tab)
  circ/article-requests (staff form to handle requests)
  members/moremember (Article requests tab at the bottom)
  circ/circulation (Checkout/Article requests tab)
Note: The last two forms use the same include file.

Test plan:
[1] Add an article request via opac or staff. Choose Scan.
[2] Verify that you see the Scan format on opac-user and the
    above-mentioned staff forms.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2020-07-29 14:48:37 UTC
Created attachment 107509 [details] [review]
Bug 20472: Add format to sample notices

NOTE: We are only changing English here. A follow-up will care for
the translated languages. (English is in yml format, the remainder
not yet.)

We need to change the following notices:
AR_SLIP, AR_CANCELED, AR_PROCESSING, AR_PENDING and AR_COMPLETED.
In AR_COMPLETED the last sentence about picking up has been modified
too.

Test plan:
Reinstall Koha. Choose English. Check notice text.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2020-07-29 14:48:42 UTC
Created attachment 107510 [details] [review]
Bug 20472: Edit URL field on staff form

This patch makes the following changes:

Add menu option Edit URLs.
Edit modal form to edit URLs.
Save URLs via ajax call to svc/article_request (Add action update_urls).
Add URL column to pending and processing table.
Allow Edit URLs for pending table too (just as Complete).
Do not allow 'Complete request' if a scan request has no URL(s).

Test plan:
[1] Add a few scan and photocopy requests.
[2] Fill url-A and url-B in two separate scan requests.
[3] Verify that these two urls are really saved (refresh form).
[4] Check that you cannot complete a scan request without URL and that you
    cannot add a URL to a photocopy request.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Marcel de Rooy 2020-07-29 14:48:46 UTC
Created attachment 107511 [details] [review]
DO_NOT_PUSH: Change DBIx schema file ArticleRequest
Comment 8 Marcel de Rooy 2020-07-29 14:48:50 UTC
Created attachment 107512 [details] [review]
Bug 20472: Update translated AR notices

de-DE/mandatory/sample_notices.sql
fr-CA/obligatoire/sample_notices.sql
fr-FR/1-Obligatoire/sample_notices.sql
it-IT/necessari/notices.sql
nb-NO/1-Obligatorisk/sample_notices.sql
pl-PL/mandatory/sample_notices.sql
ru-RU/mandatory/sample_notices.sql
uk-UA/mandatory/sample_notices.sql

Test plan:
Reinstall notices for one of the languages above.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Have run all sql files thru mysql on the command line.
Comment 9 Marcel de Rooy 2020-07-29 14:50:22 UTC
(In reply to Marcel de Rooy from comment #1)
> Have this patch set in test stage on 16.11. Plan to move them upwards after
> the 18.05 release.

The plan changed ;) This patch set has run in production on 16.11 and 18.05. And I rebased for 19.11 and master now.
Comment 10 Marcel de Rooy 2020-07-29 14:55:36 UTC
Adding bug 26088 as a see also (for now) on this report in order to address financial follow-up for such a service.
Comment 11 Owen Leonard 2020-07-29 17:09:00 UTC
Can you explain more about how the URL field is supposed to be used? Where do the URLs come from?
Comment 12 Marcel de Rooy 2020-07-29 17:50:19 UTC
(In reply to Owen Leonard from comment #11)
> Can you explain more about how the URL field is supposed to be used? Where
> do the URLs come from?

Good question. I leave some room for customization here too. (We use the AR slip and OCR to tag scanned files with the article request number. And then use opac/svc/requests (see bug 20570 follow-up) to add a Dropbox link to the request.) But bug 20570 also contains complete_article_requests.pl to match uploaded files in Koha with article requests.

Apart from bug 20570, this development here allows you to manually add links (without saying how they were created indeed).
Comment 13 Marcel de Rooy 2020-10-12 08:00:20 UTC
Created attachment 111473 [details] [review]
Bug 20472: Add new fields article_requests.format and urls

The field 'format' will allow to make a distinction between requests for
photocopies and digital scans.
The field 'urls' will be used to save the URLs that allow the client to
download the scanned materials.

Test plan:
Run new install or upgrade existing install with atomic update.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 14 Marcel de Rooy 2020-10-12 08:00:25 UTC
Created attachment 111474 [details] [review]
Bug 20472: Db rev for new preference ArticleRequestsSupportedFormats

This preference controls which formats are actually offered to patrons of
the library via the Article Request feature.
By default, it only contains PHOTOCOPY. This is default behavior.

The request format SCAN will be made possible by this report and can be
added by changing the preference.

Test plan:
Run the dbrev. Check the new pref on Administration.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 15 Marcel de Rooy 2020-10-12 08:00:30 UTC
Created attachment 111475 [details] [review]
Bug 20472: Add format field to the interface

We need to add the format to the forms entering new requests:
  opac/opac-request-article
  circ/request-article
If the pref contains multiple formats like SCAN|PHOTOCOPY, the first listed
format will be preselected on the request form. If there is only one option,
we should not disable the select however. (Possibly hide it.)

If we have no mandatory fields, we should not allow the submit of a complete
empty form (check on OPAC).

And we need to show the format of pending requests on forms:
  opac/opac-user
  circ/request-article (biblio detail tab)
  circ/article-requests (staff form to handle requests)
  members/moremember (Article requests tab at the bottom)
  circ/circulation (Checkout/Article requests tab)
Note: The last two forms use the same include file.

Test plan:
[1] Add an article request via opac or staff. Choose Scan.
[2] Verify that you see the Scan format on opac-user and the
    above-mentioned staff forms.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 16 Marcel de Rooy 2020-10-12 08:00:35 UTC
Created attachment 111476 [details] [review]
Bug 20472: Add format to sample notices

NOTE: We are only changing English here. A follow-up will care for
the translated languages. (English is in yml format, the remainder
not yet.)

We need to change the following notices:
AR_SLIP, AR_CANCELED, AR_PROCESSING, AR_PENDING and AR_COMPLETED.
In AR_COMPLETED the last sentence about picking up has been modified
too.

Test plan:
Reinstall Koha. Choose English. Check notice text.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 17 Marcel de Rooy 2020-10-12 08:00:41 UTC
Created attachment 111477 [details] [review]
Bug 20472: Edit URL field on staff form

This patch makes the following changes:

Add menu option Edit URLs.
Edit modal form to edit URLs.
Save URLs via ajax call to svc/article_request (Add action update_urls).
Add URL column to pending and processing table.
Allow Edit URLs for pending table too (just as Complete).
Do not allow 'Complete request' if a scan request has no URL(s).

Test plan:
[1] Add a few scan and photocopy requests.
[2] Fill url-A and url-B in two separate scan requests.
[3] Verify that these two urls are really saved (refresh form).
[4] Check that you cannot complete a scan request without URL and that you
    cannot add a URL to a photocopy request.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 18 Marcel de Rooy 2020-10-12 08:00:49 UTC
Created attachment 111478 [details] [review]
DO_NOT_PUSH: Change DBIx schema file ArticleRequest
Comment 19 Marcel de Rooy 2020-10-12 08:00:57 UTC
Created attachment 111479 [details] [review]
Bug 20472: Update translated AR notices

de-DE/mandatory/sample_notices.sql
fr-CA/obligatoire/sample_notices.sql
fr-FR/1-Obligatoire/sample_notices.sql
it-IT/necessari/notices.sql
nb-NO/1-Obligatorisk/sample_notices.sql
pl-PL/mandatory/sample_notices.sql
ru-RU/mandatory/sample_notices.sql
uk-UA/mandatory/sample_notices.sql

Test plan:
Reinstall notices for one of the languages above.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Have run all sql files thru mysql on the command line.
Comment 20 Marcel de Rooy 2020-10-12 08:05:43 UTC
Rebased. Please test ! Last submit waited three months.