Bugzilla – Attachment 184601 Details for
Bug 40492
Improvements to the pending offline circulation actions table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40492: Improvements to offline circ actions table
Bug-40492-Improvements-to-offline-circ-actions-tab.patch (text/plain), 6.22 KB, created by
Emily Lamancusa (emlam)
on 2025-07-24 18:32:13 UTC
(
hide
)
Description:
Bug 40492: Improvements to offline circ actions table
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-07-24 18:32:13 UTC
Size:
6.22 KB
patch
obsolete
>From 6e034958d91d8e7e396bd6065ad4aad215cab329 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Thu, 24 Jul 2025 10:30:14 -0400 >Subject: [PATCH] Bug 40492: Improvements to offline circ actions table > >Update the pending offline circulation actions page to link each item >barcode directly to the item details, rather than the biblio record, and >open the links in a new tab. > >Add a column to show the last seen date of the items being processed, >with a warning if the item's last seen date is more recent than the >offline circulation action date. > >To test: >1. Upload a Koha Offline Circulation (koc) file > (the file attached to this bug can be used if you are using a > sandbox or KTD with the standard sample data) > i. Go to Circulation > Upload offline circulation file > ii. Upload the file > iii. Click "Add to offline circulation queue" >2. Go to Circulation > Pending offline circulation actions >3. Click on the item barcodes in the table >--> Note that each barcode links to the biblio record, and navigates > away from the page within the same tab. >4. Apply patch and restart_all >5. Return to (or refresh) the pending offline circulation actions page > and click on the item barcodes again >--> The barcodes now open the item details page in a new tab >--> There is a new column for the item last seen date >6. Without processing the offline circulation actions, check in one of > the items listed in the table >7. Return to the Pending offline circulation actions page >--> Confirm that the last seen date of the item you just checked in is > highlighted in red with a warning icon, since its last seen date is > newer than the offline transaction date >8. Hover over the warning icon >--> Confirm that a tooltip appears with an explanation of why the date > is in red >--- > .../prog/en/modules/offline_circ/list.tt | 27 +++++++++++++++++-- > offline_circ/list.pl | 8 ++++++ > 2 files changed, 33 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt >index b285cf113a..2d2b9c3514 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tt >@@ -46,6 +46,7 @@ > <tr> > <th> </th> > <th>Date</th> >+ <th>Item last seen date</th> > <th>Action</th> > <th>Barcode</th> > <th>Card number or username</th> >@@ -59,6 +60,23 @@ > <td> > <label for="operationid[% operation.operationid | html %]">[% operation.timestamp | $KohaDates with_hours=1 %]</label> > </td> >+ <td> >+ [% UNLESS operation.outdated %] >+ [% operation.datelastseen | $KohaDates with_hours=1 %] >+ [% ELSE %] >+ <span class="error" >+ ><i >+ data-bs-toggle="tooltip" >+ title="This item has been updated since the offline circulation action was taken. Use caution when processing this action." >+ data-bs-placement="right" >+ class="fa fa-exclamation-triangle" >+ style="color:gold" >+ tabindex="0" >+ ></i> >+ [% operation.datelastseen | $KohaDates with_hours=1 %]</span >+ > >+ [% END %] >+ </td> > <td> > [% SWITCH ( operation.action ) -%] > [% CASE "issue" -%] >@@ -72,8 +90,13 @@ > [% END -%] > </td> > <td> >- [% IF ( operation.biblionumber ) %] >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% operation.biblionumber | uri %]" title="[% operation.bibliotitle | html %]">[% operation.barcode | html %]</a> >+ [% IF ( operation.itemnumber ) %] >+ <a >+ href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% operation.biblionumber | uri %]&itemnumber=[% operation.itemnumber | uri %]#item[% operation.itemnumber | uri %]" >+ target="_blank" >+ title="[% operation.bibliotitle | html %]" >+ >[% operation.barcode | html %]</a >+ > > [% ELSE %] > <span class="error">[% operation.barcode | html %]</span> > [% END %] >diff --git a/offline_circ/list.pl b/offline_circ/list.pl >index 6883d98b36..e37fd5419e 100755 >--- a/offline_circ/list.pl >+++ b/offline_circ/list.pl >@@ -27,6 +27,8 @@ use C4::Context; > use C4::Circulation qw( GetOfflineOperations GetOfflineOperation ); > use C4::Members; > use Koha::Patrons; >+use Koha::DateUtils qw( dt_from_string ); >+use DateTime; > > use Koha::Items; > >@@ -49,6 +51,12 @@ for (@$operations) { > my $biblio = $item->biblio; > $_->{'bibliotitle'} = $biblio->title; > $_->{'biblionumber'} = $biblio->biblionumber; >+ $_->{'itemnumber'} = $item->itemnumber; >+ $_->{'datelastseen'} = $item->datelastseen; >+ $_->{'outdated'} = >+ DateTime->compare( dt_from_string( $item->datelastseen ), dt_from_string( $_->{'timestamp'} ) ) == 1 >+ ? 1 >+ : 0; > } > > my $patron = >-- >2.34.1
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 40492
:
184595
|
184596
|
184597
| 184601