Bugzilla – Attachment 158072 Details for
Bug 35107
ILL - Type disclaimer value and date should be visible under "Request details" in the manage request page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35107: Show type disclaimer value and date in request details
Bug-35107-Show-type-disclaimer-value-and-date-in-r.patch (text/plain), 4.53 KB, created by
Pedro Amorim
on 2023-10-30 14:54:19 UTC
(
hide
)
Description:
Bug 35107: Show type disclaimer value and date in request details
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-10-30 14:54:19 UTC
Size:
4.53 KB
patch
obsolete
>From e4c99b38d0fe5208092f04e3572b43c2659f111c Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 19 Oct 2023 13:53:29 +0000 >Subject: [PATCH] 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> >--- > Koha/Illrequest.pm | 30 +++++++++++++++++++ > .../prog/en/modules/ill/ill-requests.tt | 10 +++++++ > 2 files changed, 40 insertions(+) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 831d6fa52d..c69915896f 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -1103,6 +1103,36 @@ sub get_type { > return $attr->value; > }; > >+=head3 get_type_disclaimer_value >+ >+ my $type = $abstract->get_type_disclaimer_value(); >+ >+Return the value submitted in the type disclaimer workflow stage >+ >+=cut >+ >+sub get_type_disclaimer_value { >+ my ($self) = @_; >+ my $attr = $self->illrequestattributes->find( { type => 'type_disclaimer_value' } ); >+ return if !$attr; >+ return $attr->value; >+} >+ >+=head3 get_type_disclaimer_date >+ >+ my $type = $abstract->type_disclaimer_date(); >+ >+Return the time the disclaimer was submitted in the type disclaimer workflow stage >+ >+=cut >+ >+sub get_type_disclaimer_date { >+ my ($self) = @_; >+ my $attr = $self->illrequestattributes->find( { type => 'type_disclaimer_date' } ); >+ return if !$attr; >+ return $attr->value; >+} >+ > #### Illrequests Imports > > =head3 check_limits >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 87d73fc747..130e24b032 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -683,6 +683,16 @@ > [% type = request.get_type %] > [% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %] > </li> >+ <li class="type_disclaimer_value"> >+ <span class="label type_disclaimer_value">Type disclaimer value:</span> >+ [% type_disclaimer_value = request.get_type_disclaimer_value %] >+ [% IF type_disclaimer_value %][% type_disclaimer_value | html %][% ELSE %]<span>N/A</span>[% END %] >+ </li> >+ <li class="type_disclaimer_date"> >+ <span class="label type_disclaimer_date">Type disclaimer date:</span> >+ [% type_disclaimer_date = request.get_type_disclaimer_date %] >+ [% IF type_disclaimer_date %][% type_disclaimer_date | html %][% ELSE %]<span>N/A</span>[% END %] >+ </li> > <li class="cost"> > <span class="label cost">Cost:</span> > [% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35107
:
157438
|
158072
|
159271
|
159272
|
161073
|
161074
|
161075
|
163795