Bug 35107 - ILL - Type disclaimer value and date should be visible under "Request details" in the manage request page
Summary: ILL - Type disclaimer value and date should be visible under "Request details...
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 33716 35094
Blocks: 35108
  Show dependency treegraph
 
Reported: 2023-10-19 13:49 UTC by Pedro Amorim
Modified: 2024-07-25 11:15 UTC (History)
5 users (show)

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


Attachments
Bug 35107: Show type disclaimer value and date in request details (4.48 KB, patch)
2023-10-19 13:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35107: Show type disclaimer value and date in request details (4.53 KB, patch)
2023-10-30 14:54 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35107: (QA follow-up) Use extended_attributes (1.32 KB, patch)
2023-11-27 14:32 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35107: Add tests (2.46 KB, patch)
2023-11-27 14:32 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35107: Show type disclaimer value and date in request details (4.59 KB, patch)
2024-01-16 19:30 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 35107: (QA follow-up) Use extended_attributes (1.38 KB, patch)
2024-01-16 19:30 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 35107: Add tests (2.52 KB, patch)
2024-01-16 19:30 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 35107: (QA follow-up) Use TT filter (1.37 KB, patch)
2024-03-25 10:51 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2023-10-19 13:49:23 UTC
Bug 33716 introduced this new feature.
At the time, testing was done with the FreeForm backend. FreeForm's metadata method returns all available entries from illrequestattributes for a given request.
Some backends may only provide a pre determined list of metadata keys, thus possibly leaving out type_disclaimer_value and type_disclaimer_date.

To reproduce:
1) Install FreeForm and BLDSS backends, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Set ILLModuleDisclaimerByType system preference , visit:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans#interlibrary_loans_Workflow
3) Copy the example code, click the "Click to edit" link to open the text area, and paste the example yaml:
all:
 text: |
  <h2>HTML title</h2>
  <p>This is an HTML paragraph</p>
  <p>This is another HTML paragraph</p>
 av_category_code: YES_NO
article:
 text: copyright text for all article type requests
 av_category_code: YES_NO
 bypass: 1
4) Create a new FreeForm request, visit:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set type "Book", put'9780822370451' in ISBN, put '42' in the cardnumber, and pick a library
6) You should now be in the type disclaimer stage, click "Submit"
7) Notice the disclaimer value and date are displayed under "Details from supplier"
8) Click the top "Switch provider" button and pick BLDSS
9) You should get one result, click the "Request BLL01018665793" link to finish the migration
10) You should now be in the ILL table, click the request that was just migrated to BLDSS
11) Notice the type disclaimer information is no longer visible
Comment 1 Pedro Amorim 2023-10-19 13:53:41 UTC
Created attachment 157438 [details] [review]
Bug 35107: Show type disclaimer value and date in request details

Test plan, k-t-d:
1) Install FreeForm and BLDSS backends, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Set ILLModuleDisclaimerByType system preference , visit:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans#interlibrary_loans_Workflow
3) Copy the example code, click the 'Click to edit' link to open the text area, and paste the example yaml:
all:
 text: |
  <h2>HTML title</h2>
  <p>This is an HTML paragraph</p>
  <p>This is another HTML paragraph</p>
 av_category_code: YES_NO
article:
 text: copyright text for all article type requests
 av_category_code: YES_NO
 bypass: 1
4) Create a new FreeForm request, visit:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set type 'Book', put'9780822370451' in ISBN, put '42' in the cardnumber, and pick a library
6) You should now be in the type disclaimer stage, click 'Submit'
7) Notice the disclaimer value and date are displayed under 'Details from supplier'
8) Click the top 'Switch provider' button and pick BLDSS
9) You should get one result, click the 'Request BLL01018665793' link to finish the migration
10) You should now be in the ILL table, click the request that was just migrated to BLDSS
11) Notice the type disclaimer information is no longer visible
12) Apply patch, restart plack: koha-plack --restart kohadev
13) Refresh the BLDSS request, the information should now be visible in the 'Request details' section
Comment 2 Pedro Amorim 2023-10-30 14:54:19 UTC
Created attachment 158072 [details] [review]
Bug 35107: Show type disclaimer value and date in request details

Test plan, k-t-d:
1) Install FreeForm and BLDSS backends, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Set ILLModuleDisclaimerByType system preference , visit:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans#interlibrary_loans_Workflow
3) Copy the example code, click the 'Click to edit' link to open the text area, and paste the example yaml:
all:
 text: |
  <h2>HTML title</h2>
  <p>This is an HTML paragraph</p>
  <p>This is another HTML paragraph</p>
 av_category_code: YES_NO
article:
 text: copyright text for all article type requests
 av_category_code: YES_NO
 bypass: 1
4) Create a new FreeForm request, visit:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set type 'Book', put'9780822370451' in ISBN, put '42' in the cardnumber, and pick a library
6) You should now be in the type disclaimer stage, click 'Submit'
7) Notice the disclaimer value and date are displayed under 'Details from supplier'
8) Click the top 'Switch provider' button and pick BLDSS
9) You should get one result, click the 'Request BLL01018665793' link to finish the migration
10) You should now be in the ILL table, click the request that was just migrated to BLDSS
11) Notice the type disclaimer information is no longer visible
12) Apply patch, restart plack: koha-plack --restart kohadev
13) Refresh the BLDSS request, the information should now be visible in the 'Request details' section

Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Comment 3 Kyle M Hall (khall) 2023-11-17 18:08:33 UTC
Can we get unit tests for the new methods?
Comment 4 Pedro Amorim 2023-11-27 14:32:28 UTC
Created attachment 159271 [details] [review]
Bug 35107: (QA follow-up) Use extended_attributes

Addressing the warning:
illrequestattributes is DEPRECATED in favor of extended_attributes

No functional behaviour change here
Comment 5 Pedro Amorim 2023-11-27 14:32:30 UTC
Created attachment 159272 [details] [review]
Bug 35107: Add tests

prove t/db_dependent/Koha/Illrequest.t
Comment 6 Kyle M Hall (khall) 2024-01-16 19:30:27 UTC
Created attachment 161073 [details] [review]
Bug 35107: Show type disclaimer value and date in request details

Test plan, k-t-d:
1) Install FreeForm and BLDSS backends, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Set ILLModuleDisclaimerByType system preference , visit:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans#interlibrary_loans_Workflow
3) Copy the example code, click the 'Click to edit' link to open the text area, and paste the example yaml:
all:
 text: |
  <h2>HTML title</h2>
  <p>This is an HTML paragraph</p>
  <p>This is another HTML paragraph</p>
 av_category_code: YES_NO
article:
 text: copyright text for all article type requests
 av_category_code: YES_NO
 bypass: 1
4) Create a new FreeForm request, visit:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set type 'Book', put'9780822370451' in ISBN, put '42' in the cardnumber, and pick a library
6) You should now be in the type disclaimer stage, click 'Submit'
7) Notice the disclaimer value and date are displayed under 'Details from supplier'
8) Click the top 'Switch provider' button and pick BLDSS
9) You should get one result, click the 'Request BLL01018665793' link to finish the migration
10) You should now be in the ILL table, click the request that was just migrated to BLDSS
11) Notice the type disclaimer information is no longer visible
12) Apply patch, restart plack: koha-plack --restart kohadev
13) Refresh the BLDSS request, the information should now be visible in the 'Request details' section

Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall (khall) 2024-01-16 19:30:39 UTC
Created attachment 161074 [details] [review]
Bug 35107: (QA follow-up) Use extended_attributes

Addressing the warning:
illrequestattributes is DEPRECATED in favor of extended_attributes

No functional behaviour change here

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall (khall) 2024-01-16 19:30:41 UTC
Created attachment 161075 [details] [review]
Bug 35107: Add tests

prove t/db_dependent/Koha/Illrequest.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Katrin Fischer 2024-03-22 13:08:45 UTC
Should we not have date formatting (TT filter) on this one?

[% type_disclaimer_date | html %]
Comment 10 Pedro Amorim 2024-03-25 10:51:35 UTC
Created attachment 163795 [details] [review]
Bug 35107: (QA follow-up) Use  TT filter
Comment 11 Katrin Fischer 2024-03-25 16:34:44 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 12 Fridolin Somers 2024-05-23 08:43:53 UTC
Not backported to 23.11.x