Bug 37968

Summary: Add ability to store branchcode for messages in the queue and send by branchcode
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: mspinney
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 37968 - Add ability to store branchcode for messages in the queue and send by branchcode
Bug 37968: Add ability to store branchcode for messages in the queue and send by branchcode
Bug 37968: Tidy code
Bug 37968: Add ability to store branchcode for messages in the queue and send by branchcode
Bug 37968: Tidy code

Description Kyle M Hall (khall) 2024-09-19 18:43:20 UTC
We should be able to specify in the message queue who "owns" a message, and filter based on that data. We should limit it to the patron's branchcode for now, with the option to add sysprefs to control who "owns" each notice on a per-notice basis as a later enhancement as each notice has different things associated with it.
Comment 1 Kyle M Hall (khall) 2024-09-19 19:01:08 UTC
Created attachment 171793 [details] [review]
Bug 37968 - Add ability to store branchcode for messages in the queue and send by branchcode

We should be able to specify in the message queue who "owns" a message, and filter based on that data.
We should limit it to the patron's branchcode for now, with the option to add sysprefs to control who "owns"
each notice on a per-notice basis as a later enhancement as each notice has different things associated with it.

Test Plan:
1) Run updatedatabase.pl
2) Enqueue some messages
3) Inspect the database table, note the message qeueue branchcode column
   contains the patron's home branch
4) Try using process_message_queue.pl with the new --branch filter
5) Note only the message for the selected branch are sent!
Comment 2 Kyle M Hall (khall) 2024-09-19 19:04:55 UTC
Created attachment 171794 [details] [review]
Bug 37968: Add ability to store branchcode for messages in the queue and send by branchcode

We should be able to specify in the message queue who "owns" a message, and filter based on that data.
We should limit it to the patron's branchcode for now, with the option to add sysprefs to control who "owns"
each notice on a per-notice basis as a later enhancement as each notice has different things associated with it.

Test Plan:
1) Run updatedatabase.pl
2) Enqueue some messages
3) Inspect the database table, note the message qeueue branchcode column
   contains the patron's home branch
4) Try using process_message_queue.pl with the new --branch filter
5) Note only the message for the selected branch are sent!
Comment 3 Kyle M Hall (khall) 2024-09-19 19:05:01 UTC
Created attachment 171795 [details] [review]
Bug 37968: Tidy code
Comment 4 Kyle M Hall (khall) 2024-09-19 19:06:29 UTC
Created attachment 171796 [details] [review]
Bug 37968: Add ability to store branchcode for messages in the queue and send by branchcode

We should be able to specify in the message queue who "owns" a message, and filter based on that data.
We should limit it to the patron's branchcode for now, with the option to add sysprefs to control who "owns"
each notice on a per-notice basis as a later enhancement as each notice has different things associated with it.

Test Plan:
1) Run updatedatabase.pl
2) Enqueue some messages
3) Inspect the database table, note the message qeueue branchcode column
   contains the patron's home branch
4) Try using process_message_queue.pl with the new --branch filter
5) Note only the message for the selected branch are sent!
Comment 5 Kyle M Hall (khall) 2024-09-19 19:06:35 UTC
Created attachment 171797 [details] [review]
Bug 37968: Tidy code