Bug 23794 - Convert OpacMainUserBlock system preference to news block
Summary: Convert OpacMainUserBlock system preference to news block
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 22318 22880
Blocks: 26050
  Show dependency treegraph
 
Reported: 2019-10-10 18:37 UTC by Owen Leonard
Modified: 2021-12-13 21:08 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 23794: Convert OpacMainUserBlock system preference to news block (8.65 KB, patch)
2020-02-27 14:43 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23794: Convert OpacMainUserBlock system preference to news block (8.77 KB, patch)
2020-03-22 22:21 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 23794: Convert OpacMainUserBlock system preference to news block (8.90 KB, patch)
2020-05-01 06:49 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23794: (follow-up) Remove extra carriage return (1.16 KB, patch)
2020-05-13 14:02 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 2020-05-01 07:20:05 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Martin Renvoize 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 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