Bug 40037 - Redundant check in `notices_content` hook handling
Summary: Redundant check in `notices_content` hook handling
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on: 39870 37869
Blocks:
  Show dependency treegraph
 
Reported: 2025-05-30 14:33 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-05-30 18:20 UTC (History)
1 user (show)

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


Attachments
Bug 40037: Remove redundant check in `notices_content` hook handling (1.83 KB, patch)
2025-05-30 14:42 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 40037: (follow-up) Remove redundancy in `before_send_messages` (1.15 KB, patch)
2025-05-30 14:42 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 40037: Remove redundant check in `notices_content` hook handling (1.88 KB, patch)
2025-05-30 18:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 40037: (follow-up) Remove redundancy in `before_send_messages` (1.19 KB, patch)
2025-05-30 18:20 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2025-05-30 14:33:17 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2025-05-30 14:42:28 UTC
Created attachment 182862 [details] [review]
Bug 40037: Remove redundant check in `notices_content` hook handling

I reused an implemented hook in C4::Letters and overlooked the
redundancy in it. This patch clears that.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Plugins/Notices_content_hook.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass! No behavior change!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi (tcohen) 2025-05-30 14:42:31 UTC
Created attachment 182863 [details] [review]
Bug 40037: (follow-up) Remove redundancy in `before_send_messages`

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi (tcohen) 2025-05-30 15:07:17 UTC
I did a grep for `@plugins` on the codebase and these seem to be the only places this pattern was used.
Comment 4 David Nind 2025-05-30 18:20:55 UTC
Created attachment 182864 [details] [review]
Bug 40037: Remove redundant check in `notices_content` hook handling

I reused an implemented hook in C4::Letters and overlooked the
redundancy in it. This patch clears that.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Plugins/Notices_content_hook.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass! No behavior change!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-05-30 18:20:57 UTC
Created attachment 182865 [details] [review]
Bug 40037: (follow-up) Remove redundancy in `before_send_messages`

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>