Bug 38872

Summary: Only first 'a' node tested for wrong filters
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to stable --- QA Contact: Matt Blenkinsop <matt.blenkinsop>
Severity: major    
Priority: P5 - low CC: david, matt.blenkinsop
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.04
Circulation function:
Bug Depends on: 21576    
Bug Blocks:    
Attachments: Bug 38872: Add a test
Bug 38872: Parse all 'a' element, not only the first one
Bug 38872: Fix the missing occurrences
Bug 38872: Add a test
Bug 38872: Parse all 'a' element, not only the first one
Bug 38872: Fix the missing occurrences
Bug 38872: Add a test
Bug 38872: Parse all 'a' element, not only the first one
Bug 38872: Fix the missing occurrences
Bug 38872: Add a test
Bug 38872: Parse all 'a' element, not only the first one
Bug 38872: Fix the missing occurrences

Description Jonathan Druart 2025-01-13 13:46:05 UTC
If several 'a' elements are on the same line, only the first one will be tested for wrong filters.
Comment 1 Jonathan Druart 2025-01-13 13:48:41 UTC
Created attachment 176443 [details] [review]
Bug 38872: Add a test
Comment 2 Jonathan Druart 2025-01-13 13:48:43 UTC
Created attachment 176444 [details] [review]
Bug 38872: Parse all 'a' element, not only the first one

Test plan:
Apply the "Add test" commit
% prove t/template_filters.t
=> Fail
Apply this patch
% prove t/template_filters.t
=> Success
% prove xt/find-missing-filters.t
=> Fail
Apply the last patch "Fix occurrences"
% prove xt/find-missing-filters.t
=> Success
Comment 3 Jonathan Druart 2025-01-13 13:48:46 UTC
Created attachment 176445 [details] [review]
Bug 38872: Fix the missing occurrences
Comment 4 Owen Leonard 2025-01-13 14:03:33 UTC
Created attachment 176446 [details] [review]
Bug 38872: Add a test

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Owen Leonard 2025-01-13 14:03:35 UTC
Created attachment 176447 [details] [review]
Bug 38872: Parse all 'a' element, not only the first one

Test plan:
Apply the "Add test" commit
% prove t/template_filters.t
=> Fail
Apply this patch
% prove t/template_filters.t
=> Success
% prove xt/find-missing-filters.t
=> Fail
Apply the last patch "Fix occurrences"
% prove xt/find-missing-filters.t
=> Success

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2025-01-13 14:03:37 UTC
Created attachment 176448 [details] [review]
Bug 38872: Fix the missing occurrences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 David Nind 2025-01-13 20:23:45 UTC
Created attachment 176472 [details] [review]
Bug 38872: Add a test

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2025-01-13 20:23:48 UTC
Created attachment 176473 [details] [review]
Bug 38872: Parse all 'a' element, not only the first one

Test plan:
Apply the "Add test" commit
% prove t/template_filters.t
=> Fail
Apply this patch
% prove t/template_filters.t
=> Success
% prove xt/find-missing-filters.t
=> Fail
Apply the last patch "Fix occurrences"
% prove xt/find-missing-filters.t
=> Success

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2025-01-13 20:23:51 UTC
Created attachment 176474 [details] [review]
Bug 38872: Fix the missing occurrences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 10 David Nind 2025-01-13 20:24:45 UTC
Added my sign off, in case Owen's can count as QA.

Results of running the QA script:

qa
testing 3 commit(s) (applied to 3fc855f '68 Bug 38856: Typo: EmailAddressForPa')

Processing files before patches
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt line 260.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc line 8.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc line 8.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
|========================>| 6 / 6 (100.00%)
Processing files after patches
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt line 260.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc line 8.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc line 8.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 165.
|========================>| 6 / 6 (100.00%)

 OK	koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt

 OK	t/lib/QA/TemplateFilters.pm

 WARN	t/template_filters.t
   WARN	  tidiness
		The file is less tidy than before (bad/messy lines before: 17, now: 19)
Comment 11 Matt Blenkinsop 2025-01-20 10:37:03 UTC
Created attachment 176778 [details] [review]
Bug 38872: Add a test

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 12 Matt Blenkinsop 2025-01-20 10:37:05 UTC
Created attachment 176779 [details] [review]
Bug 38872: Parse all 'a' element, not only the first one

Test plan:
Apply the "Add test" commit
% prove t/template_filters.t
=> Fail
Apply this patch
% prove t/template_filters.t
=> Success
% prove xt/find-missing-filters.t
=> Fail
Apply the last patch "Fix occurrences"
% prove xt/find-missing-filters.t
=> Success

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 13 Matt Blenkinsop 2025-01-20 10:37:08 UTC
Created attachment 176780 [details] [review]
Bug 38872: Fix the missing occurrences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 14 Katrin Fischer 2025-01-21 14:57:24 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 15 Paul Derscheid 2025-04-22 20:28:03 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.04