Bugzilla – Attachment 171835 Details for
Bug 27919
Split claims return from LOST
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27919: (QA follow-up): Add alerts to the UI to show there are return claims
Bug-27919-QA-follow-up-Add-alerts-to-the-UI-to-sho.patch (text/plain), 9.65 KB, created by
Nick Clemens (kidclamp)
on 2024-09-20 15:41:34 UTC
(
hide
)
Description:
Bug 27919: (QA follow-up): Add alerts to the UI to show there are return claims
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-09-20 15:41:34 UTC
Size:
9.65 KB
patch
obsolete
>From 78b2d28d79a977ebfa222ad935d106b4695b7ff0 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 1 Jul 2024 09:50:45 +0000 >Subject: [PATCH] Bug 27919: (QA follow-up): Add alerts to the UI to show there > are return claims > >This patch adds info to the UI to show when there is a return claim. It also reconciles the behaviour for allowing the lost status to be changed. Previously the lost status could not be changed if there was a return claim. This is now possible and a message is shown highlighting the fact that there is a return claim as well as the new lost status. > >Test plan: >1) Add a return claim to an item. >2) Check the holdings table on the record page and observe that the "Status" column now shows that there is a return claim >3) Click on the barcode for that item in the table to get to the item editing page >4) Observe that the select for the item lost status is not disabled >5) Change the status and save - the form should save correctly and display both the new status as well as a message showing that there is a return claim. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > api/v1/swagger/paths/biblios.yaml | 1 + > catalogue/moredetail.pl | 3 ++ > .../prog/css/src/staff-global.scss | 6 ++++ > .../tables/items/catalogue_detail.inc | 7 ++++ > .../prog/en/modules/catalogue/moredetail.tt | 32 ++++++++----------- > 5 files changed, 30 insertions(+), 19 deletions(-) > >diff --git a/api/v1/swagger/paths/biblios.yaml b/api/v1/swagger/paths/biblios.yaml >index 005d75ec231..a00e85cbf52 100644 >--- a/api/v1/swagger/paths/biblios.yaml >+++ b/api/v1/swagger/paths/biblios.yaml >@@ -479,6 +479,7 @@ > - cover_image_ids > - item_group_item.item_group.description > - serial_item.serial >+ - return_claims > collectionFormat: csv > - $ref: "../swagger.yaml#/parameters/match" > - $ref: "../swagger.yaml#/parameters/order_by" >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index 5e122011efb..10a1d4fe0f4 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -229,6 +229,9 @@ foreach my $item (@items){ > $item_info->{paidfor} = { patron => $patron, created_on => $payment_offset->created_on }; > } > } >+ >+ my $return_claim = $item->return_claim; >+ $item_info->{has_return_claim} = 1 if $return_claim; > } > > if (C4::Context->preference("IndependentBranches")) { >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index b708bd36bf7..e31197dc00a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1814,6 +1814,12 @@ i { > font-style: italic; > } > >+// style for return claim detail in catalogsearch >+.claimed_returned { >+ display: block; >+ font-style: italic; >+} >+ > #closewindow { > margin-top: 2em; > text-align: center; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index 099cfdd6fd1..d2a35b2801a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -226,6 +226,9 @@ > [% IF Koha.Preference('UseCourseReserves') %] > embed.push('course_item.course_reserves.course'); > [% END %] >+ [% IF Koha.Preference('ClaimReturnedLostValue') %] >+ embed.push('return_claims'); >+ [% END %] > > [% IF Koha.Preference('EasyAnalyticalRecords') %] > // For host records >@@ -472,7 +475,11 @@ > > if ( row.lost_status ) { > let lost_lib = av_lost.get(row.lost_status.toString()) || _("Unavailable (lost or missing"); >+ const hasReturnClaims = row.return_claims.filter(rc => !rc.resolution).length > 0 ? true : false > nodes += '<span class="lost">%s</span>'.format(escape_str(lost_lib)); >+ if(hasReturnClaims) { >+ nodes += '<span class="claimed_returned">(Claimed returned)</span>'; >+ } > } > > if ( row.withdrawn ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 3a73ab02291..b977f7cf50c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -211,31 +211,25 @@ > <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" /> > <input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" /> > >- [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %] >- <select name="itemlost" disabled="disabled"> >- [% ELSE %] >- <select name="itemlost"> >- [% END %] >- <option value="">Choose</option> >- [% FOREACH itemlostloo IN itemlostloop %] >- [% IF itemlostloo.authorised_value == ITEM_DAT.itemlost %] >- <option value="[% itemlostloo.authorised_value | html %]" selected="selected">[% itemlostloo.lib | html %]</option> >- [% ELSIF ClaimReturnedLostValue && itemlostloo.authorised_value == ClaimReturnedLostValue #Filter claims returned status from pulldown %] >- <option value="[% itemlostloo.authorised_value | html %]" disabled="disabled" title="Return claims must be processed from the patron details page">[% itemlostloo.lib | html %]</option> >- [% ELSE %] >- <option value="[% itemlostloo.authorised_value | html %]">[% itemlostloo.lib | html %]</option> >- [% END %] >+ <select name="itemlost"> >+ <option value="">Choose</option> >+ [% FOREACH itemlostloo IN itemlostloop %] >+ [% IF itemlostloo.authorised_value == ITEM_DAT.itemlost %] >+ <option value="[% itemlostloo.authorised_value | html %]" selected="selected">[% itemlostloo.lib | html %]</option> >+ [% ELSIF ClaimReturnedLostValue && itemlostloo.authorised_value == ClaimReturnedLostValue #Filter claims returned status from pulldown %] >+ <option value="[% itemlostloo.authorised_value | html %]" disabled="disabled" title="Return claims must be processed from the patron details page">[% itemlostloo.lib | html %]</option> >+ [% ELSE %] >+ <option value="[% itemlostloo.authorised_value | html %]">[% itemlostloo.lib | html %]</option> > [% END %] >+ [% END %] > </select> > <input type="hidden" name="withdrawn" value="[% ITEM_DAT.withdrawn | html %]" /> > <input type="hidden" name="damaged" value="[% ITEM_DAT.damaged | html %]" /> > >- [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %] >- <input type="submit" name="submit" class="submit" value="Set status" disabled="disabled"/> >+ <input type="hidden" name="op" value="cud-set_lost" /> >+ <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Set status" /> >+ [% IF ClaimReturnedLostValue && ITEM_DAT.has_return_claim %] > <p class="help-block">Item has been claimed as returned.</p> >- [% ELSE %] >- <input type="hidden" name="op" value="cud-set_lost" /> >- <input type="submit" name="submit" class="btn btn-primary btn-xs" value="Set status" /> > [% END %] > </form> > [% ELSE %] >-- >2.39.5
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 27919
:
167443
|
167496
|
167527
|
168309
|
168310
|
171833
|
171834
| 171835 |
171836
|
173124