Bug 23794

Summary: Convert OpacMainUserBlock system preference to news block
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, dcook, hayleypelham, jonathan.druart, lucas, m.de.rooy, testopia
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:
20.05.00
Circulation function:
Bug Depends on: 22318, 22880    
Bug Blocks: 26050    
Attachments: Bug 23794: Convert OpacMainUserBlock system preference to news block
Bug 23794: Convert OpacMainUserBlock system preference to news block
Bug 23794: Convert OpacMainUserBlock system preference to news block
Bug 23794: (follow-up) Remove extra carriage return

Description Owen Leonard 2019-10-10 18:37:26 UTC
Building on 22318, the OpacMainUserBlock system preference should be converted to a Koha news block.
Comment 1 Owen Leonard 2020-02-27 14:43:55 UTC
Created attachment 99704 [details] [review]
Bug 23794: Convert OpacMainUserBlock system preference to news block

This patch builds on Bug 22318 to move the OpacMainUserBlock system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the OpacMainUserBlock system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the OpacMainUserBlock system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacMainUserBlock is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opacmainuserblock_en', 'opacmainuserblock_fr-FR',
   'opacmainuserblock_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacMainUserBlock preference has been removed.
Comment 2 Bernardo Gonzalez Kriegel 2020-03-22 22:21:57 UTC
Created attachment 101392 [details] [review]
Bug 23794: Convert OpacMainUserBlock system preference to news block

This patch builds on Bug 22318 to move the OpacMainUserBlock system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the OpacMainUserBlock system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the OpacMainUserBlock system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacMainUserBlock is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opacmainuserblock_en', 'opacmainuserblock_fr-FR',
   'opacmainuserblock_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacMainUserBlock preference has been removed.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works like a charm.
Don't forget to run ./translate update/install for your language(s)
after the patch
Comment 3 Marcel de Rooy 2020-05-01 06:49:57 UTC
Created attachment 104073 [details] [review]
Bug 23794: Convert OpacMainUserBlock system preference to news block

This patch builds on Bug 22318 to move the OpacMainUserBlock system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the OpacMainUserBlock system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the OpacMainUserBlock system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacMainUserBlock is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opacmainuserblock_en', 'opacmainuserblock_fr-FR',
   'opacmainuserblock_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacMainUserBlock preference has been removed.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works like a charm.
Don't forget to run ./translate update/install for your language(s)
after the patch

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Martin Renvoize (ashimema) 2020-05-01 07:20:05 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Martin Renvoize (ashimema) 2020-05-04 07:42:12 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-05-08 22:51:20 UTC
not backported to 19.11
Comment 7 Jonathan Druart 2020-05-13 13:49:29 UTC
There are 2 warnings in the update DB process:

Use of uninitialized value $interface in concatenation (.) or string at /kohadevbox/koha/C4/Languages.pm line 122.
Use of uninitialized value $theme in concatenation (.) or string at /kohadevbox/koha/C4/Languages.pm line 122.
Upgrade to 19.12.00.082 done [13:46:30]: Bug 23794 - Move contents of OpacMainUserBlock preference to Koha news system

That should be fixed for 20.05
Comment 8 Jonathan Druart 2020-05-13 14:02:54 UTC
Created attachment 104847 [details] [review]
Bug 23794: (follow-up) Remove extra carriage return
Comment 9 Martin Renvoize (ashimema) 2020-05-13 15:06:18 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Joy Nelson 2020-05-19 21:54:08 UTC
missing dependency-not backported to 19.11.x