Bugzilla – Attachment 79918 Details for
Bug 20941
Displaying requests does not display request material type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20941: Add Illrequest->getType method
Bug-20941-Add-Illrequest-getType-method.patch (text/plain), 4.84 KB, created by
Josef Moravec
on 2018-10-04 07:51:36 UTC
(
hide
)
Description:
Bug 20941: Add Illrequest->getType method
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-10-04 07:51:36 UTC
Size:
4.84 KB
patch
obsolete
>From e82dee1903315c11e36a45f79ff70d5a3542f75e Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Thu, 14 Jun 2018 14:26:02 +0100 >Subject: [PATCH] Bug 20941: Add Illrequest->getType method > >This patch adds a method to the Illrequest object enabling it to return >its type, which is stored as an Illrequestattribute object > >To observe broken state: > >- 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 > >To Test: > >- 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 > >Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > 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(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 99b97bd..104df11 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -724,6 +724,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 : '<span>N/A</span>'; >+}; >+ > #### 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 b188945..f6c6a19 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 >@@ -437,7 +437,7 @@ > </li> > <li class="medium"> > <label class="medium">Request type:</label> >- [% request.medium | html %] >+ [% request.getType | html %] > </li> > <li class="cost"> > <label class="cost">Cost:</label> >@@ -537,7 +537,7 @@ > </div> > <div class="medium"> > <span class="label medium">Request type:</span> >- [% request.medium | html %] >+ [% request.getType | html %] > </div> > <div class="cost"> > <span class="label cost">Cost:</span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >index 838f827..a94a168 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >@@ -128,7 +128,7 @@ > <td>[% request.metadata.Author || 'N/A' | html %]</td> > <td>[% request.metadata.Title || 'N/A' | html %]</td> > <td>[% request.backend | html %]</td> >- <td>[% request.medium | html %]</td> >+ <td>[% request.getType | html %]</td> > <td>[% request.capabilities.$status.name | html %]</td> > <td>[% request.placed | html %]</td> > <td>[% request.updated | html %]</td> >@@ -167,7 +167,7 @@ > </li> > <li> > <label for="medium">Request type:</label> >- [% request.medium | html %] >+ [% request.getType | html %] > </li> > <li> > <label for="placed">Request placed:</label> >-- >2.1.4
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 20941
:
76052
|
79577
|
79825
|
79865
|
79918
|
79919
|
79920
|
79921
|
79945
|
79999
|
80112
|
80113
|
80114
|
80115
|
80116
|
80117
|
80127
|
80128
|
80129
|
80130
|
80131
|
80132
|
80212
|
81688
|
81689
|
81690
|
81691
|
81692
|
81693
|
81694