Bug 28909 - Allow interlibrary loans illview method to use backend template
Summary: Allow interlibrary loans illview method to use backend template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords: Academy
Depends on:
Blocks: 30484
  Show dependency treegraph
 
Reported: 2021-08-27 10:51 UTC by Andrew Isherwood
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 28909: Allow illview to use backend template (3.81 KB, patch)
2021-08-27 11:01 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 28909: Fix handling if backend doesn't support (1.68 KB, patch)
2021-08-31 09:08 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 28909: Fix handling if backend doesn't support (1.69 KB, patch)
2021-08-31 11:11 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 29809: Rename item relation accessor from itemnumber (23.77 KB, patch)
2022-01-06 16:39 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29809: Update stockration tool to reflect method name change (7.85 KB, patch)
2022-01-06 16:39 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28909: (follow-up) Update test for warning and rename variable (1.76 KB, patch)
2022-01-06 16:39 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28909: Allow illview to use backend template (3.86 KB, patch)
2022-08-08 20:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28909: Fix handling if backend doesn't support (1.75 KB, patch)
2022-08-08 20:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30484: Add ILL update notice (11.46 KB, patch)
2022-08-08 21:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28909: Allow illview to use backend template (3.93 KB, patch)
2022-08-09 15:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28909: Fix handling if backend doesn't support (1.81 KB, patch)
2022-08-09 15:22 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Isherwood 2021-08-27 10:51:44 UTC
A number of the various "stages" of an ILL request allow the request's backend to add additional template to be displayed. It would be useful for the "illview" stage to be able to do this.
Comment 1 Andrew Isherwood 2021-08-27 11:01:21 UTC
Created attachment 124174 [details] [review]
Bug 28909: Allow illview to use backend template

This commit allows illview to use an intranet template supplied by the backend, as
per other stages. The template must be named illview.inc

Test plan:
- Apply the patch
- Install FreeForm backend (https://github.com/PTFS-Europe/koha-ill-freeform)
- Create a request
- On the resulting "Manage ILL request" note the display is normal
- Create a new file in the FreeForm backend directory: /intra-includes/illview.inc
  with the following content:

  [% BLOCK backend_jsinclude %]
  <script>(function() { alert("Working!"); })()</script>
  [% END %]

- Restart Plack if enabled
- Reload the page
=> TEST: Observe that the alert specified in the template is displayed
Comment 2 Katrin Fischer 2021-08-28 12:38:45 UTC
Hi Andrew,

I tried to test this and it's well possible I misunderstood something, but I am stuck with:

Template process failed: file error - : not found at /home/vagrant/kohaclone/C4/Templates.pm line 121

I've triple checked the contents of my illview.inc and I just can't spot any error. Also did multiple restart_all, so Plack should not be the issue.

Any ideas?
Comment 3 Andrew Isherwood 2021-08-31 09:08:25 UTC
Created attachment 124270 [details] [review]
Bug 28909: Fix handling if backend doesn't support

If a backend hasn't been updated to support this functionality, we need
to handle that gracefully

Also, this commit fixes some indentation.
Comment 4 Andrew Isherwood 2021-08-31 09:09:36 UTC
Arghhh, sorry Katrin, my mistake. I'd forgotten to push up the patches to the FreeForm backend that makes this work! I now have done so, so if you pull the latest backend, it should be fine.

I've also fixed the problem you saw, if a backend hasn't been updated to support this new functionality, it shouldn't break in the way you saw!
Comment 5 Katrin Fischer 2021-08-31 09:26:28 UTC
Hi Andrew, thx! I'll try to come back to this, but it might take a few days.
Comment 6 Andrew Isherwood 2021-08-31 11:11:25 UTC
Created attachment 124271 [details] [review]
Bug 28909: Fix handling if backend doesn't support

If a backend hasn't been updated to support this functionality, we need
to handle that gracefully

Also, this commit fixes some indentation.
Comment 7 Nick Clemens 2022-01-06 16:39:15 UTC Comment hidden (obsolete)
Comment 8 Nick Clemens 2022-01-06 16:39:18 UTC Comment hidden (obsolete)
Comment 9 Nick Clemens 2022-01-06 16:39:21 UTC Comment hidden (obsolete)
Comment 10 Andrew Isherwood 2022-01-07 09:46:35 UTC
Hi Nick, I think you've attached your patches to the wrong bug
Comment 11 Katrin Fischer 2022-01-08 21:55:10 UTC
I am really sorry I lost sight of this one, Andrew. I'll do better. Could you please rebase?

124271 - Bug 28909: Fix handling if backend doesn't support

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 28909: Fix handling if backend doesn't support
error: sha1 information is lacking or useless (Koha/Illrequest.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 28909: Fix handling if backend doesn't support
Comment 12 Andrew Isherwood 2022-04-05 13:19:13 UTC
Hi Katrin

It looks like one of the patches got obsoleted at some point, no idea how that happened! Anyway, it should apply now. I'm just working on a development that depends on this bug, and it applied cleanly, so hopefully you won't have any problems.
Comment 13 Katrin Fischer 2022-08-08 20:10:28 UTC
Created attachment 138856 [details] [review]
Bug 28909: Allow illview to use backend template

This commit allows illview to use an intranet template supplied by the backend, as
per other stages. The template must be named illview.inc

Test plan:
- Apply the patch
- Install FreeForm backend (https://github.com/PTFS-Europe/koha-ill-freeform)
- Create a request
- On the resulting "Manage ILL request" note the display is normal
- Create a new file in the FreeForm backend directory: /intra-includes/illview.inc
  with the following content:

  [% BLOCK backend_jsinclude %]
  <script>(function() { alert("Working!"); })()</script>
  [% END %]

- Restart Plack if enabled
- Reload the page
=> TEST: Observe that the alert specified in the template is displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2022-08-08 20:10:33 UTC
Created attachment 138857 [details] [review]
Bug 28909: Fix handling if backend doesn't support

If a backend hasn't been updated to support this functionality, we need
to handle that gracefully

Also, this commit fixes some indentation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2022-08-08 21:00:30 UTC
Created attachment 138858 [details] [review]
Bug 30484: Add ILL update notice

Adds a new ILL_REQUEST_UPDATE notice which is to be used for the
formation of notices informing users of updates to ILL requests.

Commit includes database updates and template changes for messaging
preferences

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Martin Renvoize 2022-08-09 15:22:53 UTC
Created attachment 138922 [details] [review]
Bug 28909: Allow illview to use backend template

This commit allows illview to use an intranet template supplied by the backend, as
per other stages. The template must be named illview.inc

Test plan:
- Apply the patch
- Install FreeForm backend (https://github.com/PTFS-Europe/koha-ill-freeform)
- Create a request
- On the resulting "Manage ILL request" note the display is normal
- Create a new file in the FreeForm backend directory: /intra-includes/illview.inc
  with the following content:

  [% BLOCK backend_jsinclude %]
  <script>(function() { alert("Working!"); })()</script>
  [% END %]

- Restart Plack if enabled
- Reload the page
=> TEST: Observe that the alert specified in the template is displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize 2022-08-09 15:22:57 UTC
Created attachment 138923 [details] [review]
Bug 28909: Fix handling if backend doesn't support

If a backend hasn't been updated to support this functionality, we need
to handle that gracefully

Also, this commit fixes some indentation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 18 Tomás Cohen Arazi 2022-08-09 16:29:34 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 19 Katrin Fischer 2023-01-13 12:56:34 UTC
This is marked as an enhancement - I am marking RESOLVED FIXED. But it also seems to have escaped RMaint review?