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
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
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>
Can we get unit tests for the new methods?
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
Created attachment 159272 [details] [review] Bug 35107: Add tests prove t/db_dependent/Koha/Illrequest.t
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>
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>
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>
Should we not have date formatting (TT filter) on this one? [% type_disclaimer_date | html %]
Created attachment 163795 [details] [review] Bug 35107: (QA follow-up) Use TT filter
Pushed for 24.05! Well done everyone, thank you!
Not backported to 23.11.x