Bug 22002

Summary: Each message_transport_type in the letters table is showing as a separate notice in Tools > Notices and slips
Product: Koha Reporter: Barton Chittenden <barton>
Component: NoticesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: catalog, george, jesse, jonathan.druart, katrin.fischer, lucas, margaret, martin.renvoize, nick
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:
19.05 18.05.11
Bug Depends on: 21621    
Bug Blocks:    
Attachments: Screenshot showing multiple rows for PREDUE notice
Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it
Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it
Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it
Bug 22002: (QA follow-up) Remove some debugging code from template
[18.05.X] Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it

Description Barton Chittenden 2018-12-14 16:10:03 UTC
Created attachment 83225 [details]
Screenshot showing multiple rows for PREDUE notice

Each message type (email, phone, print, sms) has a separate row on Home › Tools › Notices & slips.

To replicate:

1) Go to Home › Tools › Notices & slips
2) Choose a letter to edit, e.g. PREDUE. Note that there is only a single row.
3) Click the edit button on the notice.
4) Expand the 'Print' section. Put text into the Message subject and Message body text areas.
5) Click save, this will take you back to the 'Notices & slips' page.
6) An extra row shows for this notice.
Comment 1 Jonathan Druart 2018-12-16 14:02:44 UTC
Caused by
  commit 0cffb0f7589aa52d65bda9a8a4934790a141f3a0
  Bug 21621: Remove incorrect GROUP BY from tools/letter.pl

The test plan was not complete enough.
Comment 2 Jonathan Druart 2018-12-16 14:05:55 UTC
Created attachment 83253 [details] [review]
Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it

Caused by
  commit 0cffb0f7589aa52d65bda9a8a4934790a141f3a0
  Bug 21621: Remove incorrect GROUP BY from tools/letter.pl
The test plan was not complete enough.

Test plan:
1) Go to Home › Tools › Notices & slips
2) Choose a letter to edit, e.g. PREDUE. Note that there is only a
single row.
3) Click the edit button on the notice.
4) Expand the 'Print' section. Put text into the Message subject and
Message body text areas.
5) Click save, this will take you back to the 'Notices & slips' page.
6) Clone PREDUE for a specific library
7) The 'all libraries' option must list the templates for all libraries,
but without duplicate
8) Select a library in the dropdown list: only the templates for the
given library is listed, without duplicate
Comment 3 ByWater Sandboxes 2018-12-18 15:52:11 UTC
Created attachment 83368 [details] [review]
Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it

Caused by
  commit 0cffb0f7589aa52d65bda9a8a4934790a141f3a0
  Bug 21621: Remove incorrect GROUP BY from tools/letter.pl
The test plan was not complete enough.

Test plan:
1) Go to Home › Tools › Notices & slips
2) Choose a letter to edit, e.g. PREDUE. Note that there is only a
single row.
3) Click the edit button on the notice.
4) Expand the 'Print' section. Put text into the Message subject and
Message body text areas.
5) Click save, this will take you back to the 'Notices & slips' page.
6) Clone PREDUE for a specific library
7) The 'all libraries' option must list the templates for all libraries,
but without duplicate
8) Select a library in the dropdown list: only the templates for the
given library is listed, without duplicate

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Comment 4 Katrin Fischer 2019-01-13 21:27:18 UTC
Created attachment 83854 [details] [review]
Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it

Caused by
  commit 0cffb0f7589aa52d65bda9a8a4934790a141f3a0
  Bug 21621: Remove incorrect GROUP BY from tools/letter.pl
The test plan was not complete enough.

Test plan:
1) Go to Home › Tools › Notices & slips
2) Choose a letter to edit, e.g. PREDUE. Note that there is only a
single row.
3) Click the edit button on the notice.
4) Expand the 'Print' section. Put text into the Message subject and
Message body text areas.
5) Click save, this will take you back to the 'Notices & slips' page.
6) Clone PREDUE for a specific library
7) The 'all libraries' option must list the templates for all libraries,
but without duplicate
8) Select a library in the dropdown list: only the templates for the
given library is listed, without duplicate

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2019-01-13 21:27:22 UTC
Created attachment 83855 [details] [review]
Bug 22002: (QA follow-up) Remove some debugging code from template

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2019-01-13 21:27:40 UTC
Sorry for missing the issue before!
Comment 7 Nick Clemens 2019-01-18 20:58:45 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Barton Chittenden 2019-01-20 01:17:24 UTC
I would very much like to get this back-ported to 18.05.
Comment 9 Martin Renvoize 2019-01-23 12:45:55 UTC
Pushed to 18.11.x for 18.11.03
Comment 10 Jesse Maseto 2019-01-23 19:21:45 UTC
Merge conflicts while trying to backport to 18.05. Can not be backported until rebased to 18.05.
Comment 11 Jonathan Druart 2019-02-15 12:21:28 UTC
Created attachment 85159 [details] [review]
[18.05.X] Bug 22002: (bug 21621 follow-up) Re-add GROUP BY in letter.pl and fix it

Caused by
  commit 0cffb0f7589aa52d65bda9a8a4934790a141f3a0
  Bug 21621: Remove incorrect GROUP BY from tools/letter.pl
The test plan was not complete enough.

Test plan:
1) Go to Home › Tools › Notices & slips
2) Choose a letter to edit, e.g. PREDUE. Note that there is only a
single row.
3) Click the edit button on the notice.
4) Expand the 'Print' section. Put text into the Message subject and
Message body text areas.
5) Click save, this will take you back to the 'Notices & slips' page.
6) Clone PREDUE for a specific library
7) The 'all libraries' option must list the templates for all libraries,
but without duplicate
8) Select a library in the dropdown list: only the templates for the
given library is listed, without duplicate

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Lucas Gass 2019-03-19 22:48:09 UTC
backported to 18.05.x for 18.05.11

Thanks everyone!