Bug 31626

Summary: Add letter ID to the message queue table
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: NoticesAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: andrew, caroline.cyr-la-rose, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 31627    
Attachments: Bug 31626: Add letter id to the message queue table
Bug 31626: Update Schema Files [DO NOT PUSH]
Bug 31626: Add letter id to the message queue table
Bug 31626: Update Schema Files [DO NOT PUSH]
Bug 31626: Add letter id to the message queue table
Bug 31626: Update Schema Files [DO NOT PUSH]
Bug 31626: Add letter id to the message queue table
Bug 31626: (QA follow-up) Make db_rev robust

Description Kyle M Hall (khall) 2022-09-26 15:47:17 UTC
It can be useful to know exactly what template was used to generate a notice. To this end, it would be useful to store the letter id as a foreign key in the message queue table.
Comment 1 Kyle M Hall (khall) 2022-09-26 16:07:33 UTC
Created attachment 140996 [details] [review]
Bug 31626: Add letter id to the message queue table

It can be useful to know exactly what template was used to generate a notice. To this end, it would be useful to store the letter id as a foreign key in the message queue table.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Run an action that will send a notice to a patron
5) Note the letter id is now in the message_queue table for that notice!
Comment 2 Owen Leonard 2022-09-26 16:12:12 UTC
(In reply to Kyle M Hall from comment #1)
> 2) Run updatedatabase.pl

It seems to be missing an atomic update file
Comment 3 Kyle M Hall (khall) 2022-09-26 16:27:59 UTC
(In reply to Owen Leonard from comment #2)
> (In reply to Kyle M Hall from comment #1)
> > 2) Run updatedatabase.pl
> 
> It seems to be missing an atomic update file

Thanks! Will fix!
Comment 4 Kyle M Hall (khall) 2022-09-26 16:33:12 UTC
Created attachment 140999 [details] [review]
Bug 31626: Update Schema Files [DO NOT PUSH]
Comment 5 Kyle M Hall (khall) 2022-09-26 16:33:24 UTC
Created attachment 141001 [details] [review]
Bug 31626: Add letter id to the message queue table

It can be useful to know exactly what template was used to generate a notice. To this end, it would be useful to store the letter id as a foreign key in the message queue table.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Run an action that will send a notice to a patron
5) Note the letter id is now in the message_queue table for that notice!
Comment 6 ByWater Sandboxes 2022-09-26 19:26:11 UTC
Created attachment 141005 [details] [review]
Bug 31626: Update Schema Files [DO NOT PUSH]

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 7 ByWater Sandboxes 2022-09-26 19:26:14 UTC
Created attachment 141006 [details] [review]
Bug 31626: Add letter id to the message queue table

It can be useful to know exactly what template was used to generate a notice. To this end, it would be useful to store the letter id as a foreign key in the message queue table.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Run an action that will send a notice to a patron
5) Note the letter id is now in the message_queue table for that notice!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 8 Katrin Fischer 2022-10-16 14:07:14 UTC
My first thought was: isn't the letter code not enough? But indeed... it isn't. we can have the same code for different branches, while it's not the same text.
Comment 9 Katrin Fischer 2022-10-16 14:22:13 UTC
Created attachment 141942 [details] [review]
Bug 31626: Update Schema Files [DO NOT PUSH]

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2022-10-16 14:22:18 UTC
Created attachment 141943 [details] [review]
Bug 31626: Add letter id to the message queue table

It can be useful to know exactly what template was used to generate a notice. To this end, it would be useful to store the letter id as a foreign key in the message queue table.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Run an action that will send a notice to a patron
5) Note the letter id is now in the message_queue table for that notice!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Tomás Cohen Arazi (tcohen) 2022-10-18 12:49:26 UTC
Created attachment 142054 [details] [review]
Bug 31626: (QA follow-up) Make db_rev robust

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Tomás Cohen Arazi (tcohen) 2022-10-18 13:31:04 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 13 Lucas Gass (lukeg) 2022-12-05 20:42:23 UTC
Enhancement will not be backported to 22.05.x series
Comment 14 Caroline Cyr La Rose 2023-05-05 19:37:48 UTC
Not sure what needs documenting, seems to be only backend stuff. Closing, but feel free to reopen with details if needed.