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.
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!
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!
Created attachment 171795 [details] [review] Bug 37968: Tidy code
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!
Created attachment 171797 [details] [review] Bug 37968: Tidy code