Bug 38872 - Only first 'a' node tested for wrong filters
Summary: Only first 'a' node tested for wrong filters
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Matt Blenkinsop
URL:
Keywords:
Depends on: 21576
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-13 13:46 UTC by Jonathan Druart
Modified: 2025-04-22 20:28 UTC (History)
2 users (show)

See Also:
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:


Attachments
Bug 38872: Add a test (1.45 KB, patch)
2025-01-13 13:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38872: Parse all 'a' element, not only the first one (1.13 KB, patch)
2025-01-13 13:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38872: Fix the missing occurrences (13.51 KB, patch)
2025-01-13 13:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38872: Add a test (1.50 KB, patch)
2025-01-13 14:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38872: Parse all 'a' element, not only the first one (1.18 KB, patch)
2025-01-13 14:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38872: Fix the missing occurrences (13.55 KB, patch)
2025-01-13 14:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38872: Add a test (1.54 KB, patch)
2025-01-13 20:23 UTC, David Nind
Details | Diff | Splinter Review
Bug 38872: Parse all 'a' element, not only the first one (1.22 KB, patch)
2025-01-13 20:23 UTC, David Nind
Details | Diff | Splinter Review
Bug 38872: Fix the missing occurrences (13.59 KB, patch)
2025-01-13 20:23 UTC, David Nind
Details | Diff | Splinter Review
Bug 38872: Add a test (1.61 KB, patch)
2025-01-20 10:37 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 38872: Parse all 'a' element, not only the first one (1.29 KB, patch)
2025-01-20 10:37 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 38872: Fix the missing occurrences (13.67 KB, patch)
2025-01-20 10:37 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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