@@ -, +, @@ - Do not apply patch - Ensure you have at least one Interlibrary loan created - In OPAC view, go to "your interlibrary loan requests" - => TEST: Observe that the "Request type" column is not populated - Click on "View" for one of the requests - => TEST: Observer that the "Request type" row is not populated - In Staff view, go to "ILL requests" - Click on "Manage request" on a request - => TEST: Observer that the "Request type" row is not populated - Apply patch - In OPAC view, go to "your interlibrary loan requests" - => TEST: Observe that the "Request type" column IS populated - Click on "View" for one of the requests - => TEST: Observer that the "Request type" row IS populated - In Staff view, go to "ILL requests" - Click on "Manage request" on a request - => TEST: Observer that the "Request type" row IS populated --- Koha/Illrequest.pm | 14 ++++++++++++++ .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 4 ++-- .../opac-tmpl/bootstrap/en/modules/opac-illrequests.tt | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) --- a/Koha/Illrequest.pm +++ a/Koha/Illrequest.pm @@ -736,6 +736,20 @@ sub getPrefix { || ""; # "the empty prefix" } +=head3 getType + + my $type = $abstract->getType(); + +Return a string representing the material type of this request + +=cut + +sub getType { + my ($self) = @_; + my $attr = $self->illrequestattributes->find({ type => 'type'}); + return $attr ? $attr->value : 'N/A'; +}; + #### Illrequests Imports =head3 check_limits --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -461,7 +461,7 @@
  • - [% request.medium | html %] + [% request.getType | html %]
  • @@ -570,7 +570,7 @@
    Request type: - [% request.medium | html %] + [% request.getType | html %]
    Cost: --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -134,7 +134,7 @@ [% IF request.metadata.Title %][% request.metadata.Title | html %][% ELSE %]N/A[% END %] [% request.backend | html %] - [% request.medium | html %] + [% request.getType | html %] [% request.capabilities.$status.name | html %] [% request.placed | html %] [% request.updated | html %] @@ -177,7 +177,7 @@
  • - [% request.medium | html %] + [% request.getType | html %]
  • --