Summary: | Display the return claims column in the circulation overdues page (overdue.tt) | ||
---|---|---|---|
Product: | Koha | Reporter: | Jérémy Breuillard <jeremy.breuillard> |
Component: | Circulation | Assignee: | Jérémy Breuillard <jeremy.breuillard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, gmcharlt, jeremy.breuillard, jonathan.druart, kyle.m.hall, lucas, sally.healey, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement adds the "Return claims" column to the circulation overdues page, like it is on a patron's check out and details pages. Display or hide the column using the column settings options. It can also be configured using the table settings options in the administration area - it is hidden by default.
|
Version(s) released in: |
22.11.00
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 31728, 33613 | ||
Attachments: |
Bug 29983: Display the pretend claim column in overdue.tt
Bug 29983: Display the pretend claim column in overdue.tt Bug 29983: Display the pretend claim column in overdue.tt Bug 29983: Display the pretend claim column in overdue.tt Bug 29983: Display the pretend claim column in overdue.tt Bug 29983: Display the pretend claim column in overdue.tt Bug 29983: Display the pretend claim column in overdue.tt Bug 29983: Display the pretend claim column in overdue.tt Bug 29983: Format dates in templates using KohaDates (and display the time part) Bug 29983: Show the column by default but hide if the feature is disabled Bug 29983: Fix xt/author/valid-templates.t |
Description
Jérémy Breuillard
2022-01-31 12:48:20 UTC
Created attachment 130004 [details] [review] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl" Test plan: 1)Use a patron with at least 1 item who should be checked out soon 2)Home > Patron > Patron details for [name] 3)Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4)Now go to Home > Circulation > Overdues 5)Find the patron who has to check out and have a look at the table 6)Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table Please rebase on master! Created attachment 130036 [details] [review] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master. Test plan: 1)Use a patron with at least 1 item who should be checked out soon 2)Home > Patron > Patron details for [name] 3)Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4)Now go to Home > Circulation > Overdues 5)Find the patron who has to check out and have a look at the table 6)Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table Created attachment 130037 [details] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master. Test plan: 1)Use a patron with at least 1 item who should be checked out soon 2)Home > Patron > Patron details for [name] 3)Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4)Now go to Home > Circulation > Overdues 5)Find the patron who has to check out and have a look at the table 6)Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table This seems to be working well except on the checkout page. The "Claim returned" button in the table of checkouts doesn't trigger the modal. Created attachment 130121 [details] [review] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master. Test plan: 1)Use a patron with at least 1 item who should be checked out soon 2)Home > Patron > Patron details for [name] 3)Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4)Now go to Home > Circulation > Overdues 5)Find the patron who has to check out and have a look at the table 6)Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table Bug found and fixed. Let me know if its done correctly Created attachment 130240 [details] [review] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master. Test plan: 1)Use a patron with at least 1 item who should be checked out soon 2)Home > Patron > Patron details for [name] 3)Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4)Now go to Home > Circulation > Overdues 5)Find the patron who has to check out and have a look at the table 6)Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Works as described. Overall this looks great and I am quite happy to see the code has been moved to an include. Some small 'complaints', hopefully all easy to fix: 1) Translation I believe we now need to change this to use the single underscore as it was moved from a .js to an .inc file: + content = __("Unable to claim as returned"); 2) Column configuration The new column should be added to the column configuration for this report. Some libraries are not using the return claims feature and then it's nice when it can be hidden by default and it also helps when you want to print the table to slim it down. 3) QA test tools FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt FAIL valid_template modal-claims-js: not found FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt FAIL filters missing_filter at line 125 ( <span class="badge">[% overdueloo.return_claim_created_on %]</span>) Created attachment 134223 [details] [review] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master. Test plan: 1) Use a patron with at least 1 item who should be checked out soon 2) Home > Patron > Patron details for [name] 3) Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4) Now go to Home > Circulation > Overdues 5) Find the patron who has to check out and have a look at the table 6) Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table Created attachment 136334 [details] [review] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master. Test plan: 1) Use a patron with at least 1 item who should be checked out soon 2) Home > Patron > Patron details for [name] 3) Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4) Now go to Home > Circulation > Overdues 5) Find the patron who has to check out and have a look at the table 6) Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table Signed-off-by: David Nind <david@davidnind.com> Testing notes (using koha-testing-docker): 1. Add a new authorized value for LOST, for example: Authorized value = 5, Description = Claimed returned. 2. Add the authorized value (5) to the ClaimReturnedLostValue system preference. 3. Note that if ClaimReturnedLostValue is not set, then the "Return claims" column is not displayed on the patron's check out and details pages, but can be displayed or hidden using the column settings button. 4. Check out an item to a patron so that it is overdue (when checking out: expand the "Checkout settings" link under the barcode entry field, and specify the due date to an earlier date than today). 5. View the patron's details page and note that the "Return claims" column is displayed. 6. View the overdues page in the circulation module. 7. Note that there is no "Return claims" column, and it doesn't appear in the list of columns that can be displayed or hidden. 8. After the patch is applied, the "Return claims" column can now be displayed or hidden. 9. The column can also be configured using the table settings options in the administration area - the default is for it to be hidden. Why do we display the column if the feature is disabled? And why do we hide the column by default? I am about to submit patches here. Created attachment 138470 [details] [review] Bug 29983: Display the pretend claim column in overdue.tt This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master. Test plan: 1) Use a patron with at least 1 item who should be checked out soon 2) Home > Patron > Patron details for [name] 3) Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column 4) Now go to Home > Circulation > Overdues 5) Find the patron who has to check out and have a look at the table 6) Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 138471 [details] [review] Bug 29983: Format dates in templates using KohaDates (and display the time part) The time part is displayed on the checkout list Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 138472 [details] [review] Bug 29983: Show the column by default but hide if the feature is disabled Prior to this patch there was a blink, the column was displayed then hidden if the column was hidden. Also we could display the column even if the feature was disabled. Now the column is shown by default, and hidden if the feature is disabled. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Jérémy, can you confirm that you agree with the 2 follow-ups please? (In reply to Jonathan Druart from comment #20) > Jérémy, can you confirm that you agree with the 2 follow-ups please? It is better, I agree with that There's a false-positive error detected by QA tools: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt FAIL valid_template modal-claims-js: not found noting here only for documentation purposes. Pushed to master for 22.11. Nice work everyone, thanks! (In reply to Tomás Cohen Arazi from comment #22) > There's a false-positive error detected by QA tools: > > FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt > FAIL valid_template > modal-claims-js: not found It was not a false-positive, xt/author/valid-templates.t is failing now. Created attachment 138801 [details] [review] Bug 29983: Fix xt/author/valid-templates.t # Failed test '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt' # at xt/author/valid-templates.t line 141. # file error - modal-claims-js: not found # Looks like you failed 1 test of 757. > (In reply to Tomás Cohen Arazi from comment #22)
> > There's a false-positive error detected by QA tools:
> >
> > FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
> > FAIL valid_template
> > modal-claims-js: not found
>
> It was not a false-positive, xt/author/valid-templates.t is failing now.
Well, circulation.tt includes checkouts-table.inc, which includes modal-claims.inc
That's why I thought this was a false negative. I'm fine with the follow-up, but it feels the tests are wrong then. Or maybe I'm too tired to think clearly XD
It's how it's working. We have exclusions but I would not add circulation.tt. So yes, the test is not as best as it could be, but his patch is the easiest way to make it pass again. Follow-up pushed, thanks! Enhancement will not be backported to 22.05.x series |