diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 13c0b1114d..7158aa519e 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -25,6 +25,7 @@ use File::Basename qw( basename ); use Encode qw( encode ); use Mail::Sendmail; use Try::Tiny; +use DateTime; use Koha::Database; use Koha::Email; @@ -659,6 +660,7 @@ Mark a request as completed (status = COMP). sub mark_completed { my ( $self ) = @_; $self->status('COMP')->store; + $self->completed(DateTime->now)->store; return { error => 0, status => '', diff --git a/Koha/REST/V1/Illrequests.pm b/Koha/REST/V1/Illrequests.pm index 2e428f7527..f8385a7fd2 100644 --- a/Koha/REST/V1/Illrequests.pm +++ b/Koha/REST/V1/Illrequests.pm @@ -43,7 +43,7 @@ sub list { my $args = $c->req->params->to_hash // {}; my $output = []; - my @format_dates = ( 'placed', 'updated' ); + my @format_dates = ( 'placed', 'updated', 'completed' ); # Create a hash where all keys are embedded values # Enables easy checking @@ -127,9 +127,10 @@ sub list { foreach my $p(@{$patron_arr}) { if ($p->{borrowernumber} == $req->borrowernumber) { $to_push->{patron} = { - firstname => $p->{firstname}, - surname => $p->{surname}, - cardnumber => $p->{cardnumber} + patron_id => $p->{borrowernumber}, + firstname => $p->{firstname}, + surname => $p->{surname}, + cardnumber => $p->{cardnumber} }; last; } diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 296103de45..d0ad093a2f 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -350,6 +350,77 @@ modules: cannot_be_toggled: 1 cannot_be_modified: 1 + illrequests: + ill-requests: + ill-requests: + - + columnname: illrequest_id + - + columnname: metadata_author + - + columnname: metadata_title + - + columnname: metadata_article_title + - + columnname: metadata_issue + - + columnname: metadata_volume + - + columnname: metadata_year + - + columnname: metadata_pages + - + columnname: metadata_type + - + columnname: orderid + - + columnname: patron + - + columnname: biblio_id + - + columnname: library_branchname + - + columnname: status + - + columnname: placed + cannot_be_toggled: 1 + cannot_be_modified: 1 + is_hidden: 1 + - + columnname: placed_formatted + - + columnname: updated + cannot_be_toggled: 1 + cannot_be_modified: 1 + is_hidden: 1 + - + columnname: updated_formatted + - + columnname: replied + - + columnname: completed + cannot_be_toggled: 1 + cannot_be_modified: 1 + is_hidden: 1 + - + columnname: completed_formatted + - + columnname: accessurl + - + columnname: cost + - + columnname: comments + - + columnname: notesopac + - + columnname: notesstaff + - + columnname: backend + - + columnname: action + cannot_be_toggled: 1 + cannot_be_modified: 1 + members: fines: account-fines: diff --git a/api/v1/swagger/paths/illrequests.json b/api/v1/swagger/paths/illrequests.json index ac63bc4f55..99ec0dd95b 100644 --- a/api/v1/swagger/paths/illrequests.json +++ b/api/v1/swagger/paths/illrequests.json @@ -50,6 +50,12 @@ "description": "The date the request was considered completed", "required": false, "type": "string" + }, { + "name": "completed_formatted", + "in": "query", + "description": "The date the request was considered complete formatted", + "required": false, + "type": "string" }, { "name": "status", "in": "query", diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt index 53b4e9ed8d..e5f9df444b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt @@ -146,6 +146,12 @@ [% PROCESS pagelist module=modules.coursereserves modulename="coursereserves" %] +

Interlibrary loans

+
+

Interlibrary loans tables

+ [% PROCESS pagelist module=modules.illrequests modulename="illrequests" %] +
+

Patrons

Patrons tables

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 18e7820207..63514107d0 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 @@ -5,6 +5,7 @@ [% USE KohaDates %] [% SET footerjs = 1 %] [% USE AuthorisedValues %] +[% USE ColumnsSettings %] [% INCLUDE 'doc-head-open.inc' %] Koha › ILL requests @@ -62,8 +63,8 @@
  • - - + +
  • @@ -507,20 +508,34 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -544,6 +559,7 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'calendar.inc' %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
    AuthorTitlePatronBibliographic record IDLibraryStatus Date placed Updated onRequest numberCommentsCardnumberRequest IDAuthorTitleArticle titleIssueVolumeYearPagesTypeOrder IDPatronBibliographic recordBranchStatus Placed on Updated onReplied Completed onAccess URLCostCommentsOPAC notesStaff notesBackend