Bug 31728 - Duplicate claims modal template markup
Summary: Duplicate claims modal template markup
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 29983
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-10 16:15 UTC by Owen Leonard
Modified: 2023-06-08 22:28 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31728: Remove duplicate claims modal template markup (3.22 KB, patch)
2022-10-10 16:47 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31728: Remove duplicate claims modal template markup (3.27 KB, patch)
2022-10-10 18:10 UTC, David Nind
Details | Diff | Splinter Review
Bug 31728: Remove duplicate claims modal template markup (3.33 KB, patch)
2022-10-15 17:41 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-10-10 16:15:32 UTC
Return claims uses a modal dialog for handling the resolution process. The modal markup is currently duplicated in the templates, once in modal-claims.inc and once in checkouts-table.inc.

I think this was a mistake in Bug 29983, which added the modal include without removing the markup in checkouts-table.inc.
Comment 1 Owen Leonard 2022-10-10 16:47:54 UTC
Created attachment 141579 [details] [review]
Bug 31728: Remove duplicate claims modal template markup

This patch removes some markup which duplicates markup now in a
separate include file. modal-claims.inc contains the same
markup for #claims-returned-modal as checkouts.table.inc.

To test, apply the patch and make sure a LOST authorized value code
is defined in the  ClaimReturnedLostValue system preference.

- Check an item out to a patron, e.g. item 39999000001334 to patron
  23529000179433.
- In the table showing the patron's checkouts, click the "Claim
  returned" button.
- A "Claim returned" modal should appear.
- Click "Make claim."
- Switch to the "Claims" tab. You should see the item listed there.
- Check out another item, e.g. 39999000013313, to the patron and test
  the return claim process again from the patron detail page.
- Check out another item, e.g. 39999000018691, to the patron with a due
  date specified which is in the past.
- Go to Circulation -> Overdues. You should see the item in the list of
  overdues. Test that the "Claim returned" button works correctly on
  this page too.
Comment 2 David Nind 2022-10-10 18:10:03 UTC
Created attachment 141580 [details] [review]
Bug 31728: Remove duplicate claims modal template markup

This patch removes some markup which duplicates markup now in a
separate include file. modal-claims.inc contains the same
markup for #claims-returned-modal as checkouts.table.inc.

To test, apply the patch and make sure a LOST authorized value code
is defined in the  ClaimReturnedLostValue system preference.

- Check an item out to a patron, e.g. item 39999000001334 to patron
  23529000179433.
- In the table showing the patron's checkouts, click the "Claim
  returned" button.
- A "Claim returned" modal should appear.
- Click "Make claim."
- Switch to the "Claims" tab. You should see the item listed there.
- Check out another item, e.g. 39999000013313, to the patron and test
  the return claim process again from the patron detail page.
- Check out another item, e.g. 39999000018691, to the patron with a due
  date specified which is in the past.
- Go to Circulation -> Overdues. You should see the item in the list of
  overdues. Test that the "Claim returned" button works correctly on
  this page too.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2022-10-15 17:33:06 UTC
Please don't forget to set assignee!
Comment 4 Katrin Fischer 2022-10-15 17:41:56 UTC
Created attachment 141926 [details] [review]
Bug 31728: Remove duplicate claims modal template markup

This patch removes some markup which duplicates markup now in a
separate include file. modal-claims.inc contains the same
markup for #claims-returned-modal as checkouts.table.inc.

To test, apply the patch and make sure a LOST authorized value code
is defined in the  ClaimReturnedLostValue system preference.

- Check an item out to a patron, e.g. item 39999000001334 to patron
  23529000179433.
- In the table showing the patron's checkouts, click the "Claim
  returned" button.
- A "Claim returned" modal should appear.
- Click "Make claim."
- Switch to the "Claims" tab. You should see the item listed there.
- Check out another item, e.g. 39999000013313, to the patron and test
  the return claim process again from the patron detail page.
- Check out another item, e.g. 39999000018691, to the patron with a due
  date specified which is in the past.
- Go to Circulation -> Overdues. You should see the item in the list of
  overdues. Test that the "Claim returned" button works correctly on
  this page too.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2022-10-20 14:44:48 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!