Bug 24221 - Convert OPACMySummaryNote system preference to news block
Summary: Convert OPACMySummaryNote system preference to news block
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on: 22880 27451
Blocks: 26050
  Show dependency treegraph
 
Reported: 2019-12-11 19:16 UTC by Owen Leonard
Modified: 2022-04-01 10:31 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
OPACMySummaryNote system preference is converted to a news block. Note that its HTML id is now 'OpacMySummaryNote' instead of 'opac-my-summary-note'.
Version(s) released in:
22.05.00


Attachments
Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents (7.67 KB, patch)
2022-03-01 17:35 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents (7.71 KB, patch)
2022-03-10 20:50 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents (7.79 KB, patch)
2022-03-22 12:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24221: Improve atomic update (2.13 KB, patch)
2022-03-22 12:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24221: (follow-up) Remove id opac-my-summary-note (1.22 KB, patch)
2022-03-25 20:44 UTC, Fridolin Somers
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-12-11 19:16:58 UTC
Building on 22318, the OPACMySummaryNote system preference should be converted to a Koha news block.
Comment 1 Lucas Gass 2022-03-01 17:35:38 UTC
Created attachment 131204 [details] [review]
Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents

To test:
1- Before applying the patch add some content to the system preference OPACMySummaryNote
2- Apply patch
3- restart_all and updatedatabase
4. Go to additional-content.pl ( HTML customizations )
5. You should now see your content from the system preference under OpacMySummaryNote in HTML customizations
6. Try searching for the system preference, OPACMySummaryNote. It has been removed and you should not be able to find it.
7. Try changing/removing/adding content from OpacMySummaryNote in HTML customizations
8. Make sure your edits are reflected when you look at the user summary page

Note: The system preference was named OPACMySummaryNote but in to be more consitent with how we have named other additional_contents I have renamed this OpacMySummaryNote.
Comment 2 Shi Yao Wang 2022-03-10 20:00:12 UTC
Patch doesn't apply. At step 7, content doesn't appear when saving the new entry in Additional contents.
Comment 3 Lucas Gass 2022-03-10 20:26:48 UTC
(In reply to shi-yao.wang from comment #2)
> Patch doesn't apply. At step 7, content doesn't appear when saving the new
> entry in Additional contents.

This patch does cleanly apply to current master. As for step 7, I suspect your not adding a title. When I do not add a title to an HTML customization the content does not appear, that is probably a bug but I would request that you file separate bug report. Thanks for testing! 

Resetting this to NSO.
Comment 4 Shi Yao Wang 2022-03-10 20:50:08 UTC
Created attachment 131581 [details] [review]
Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents

To test:
1- Before applying the patch add some content to the system preference OPACMySummaryNote
2- Apply patch
3- restart_all and updatedatabase
4. Go to additional-content.pl ( HTML customizations )
5. You should now see your content from the system preference under OpacMySummaryNote in HTML customizations
6. Try searching for the system preference, OPACMySummaryNote. It has been removed and you should not be able to find it.
7. Try changing/removing/adding content from OpacMySummaryNote in HTML customizations
8. Make sure your edits are reflected when you look at the user summary page

Note: The system preference was named OPACMySummaryNote but in to be more consitent with how we have named other additional_contents I have renamed this OpacMySummaryNote.

Signed-off-by: shiyao <shiyao@inlibro.com>
Comment 5 Lucas Gass 2022-03-10 21:07:03 UTC
Shiyao,

I have created a new bug report for the problem you were experiencing:

See Bug 30272
Comment 6 Jonathan Druart 2022-03-22 12:19:55 UTC
Created attachment 132013 [details] [review]
Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents

To test:
1- Before applying the patch add some content to the system preference OPACMySummaryNote
2- Apply patch
3- restart_all and updatedatabase
4. Go to additional-content.pl ( HTML customizations )
5. You should now see your content from the system preference under OpacMySummaryNote in HTML customizations
6. Try searching for the system preference, OPACMySummaryNote. It has been removed and you should not be able to find it.
7. Try changing/removing/adding content from OpacMySummaryNote in HTML customizations
8. Make sure your edits are reflected when you look at the user summary page

Note: The system preference was named OPACMySummaryNote but in to be more consitent with how we have named other additional_contents I have renamed this OpacMySummaryNote.
Signed-off-by: shiyao <shiyao@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2022-03-22 12:20:00 UTC
Created attachment 132014 [details] [review]
Bug 24221: Improve atomic update

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Fridolin Somers 2022-03-25 20:44:14 UTC
Like other conversions, I've added to DBRev" :
No OpacMySummaryNote preference found. Value was empty or update has already been run.

I add a follow-up to remove the HTML id, like done in Bug 28927 "Fix id opacmainuserblock used twice in OPAC"
Comment 9 Fridolin Somers 2022-03-25 20:44:34 UTC
Created attachment 132264 [details] [review]
Bug 24221: (follow-up) Remove id opac-my-summary-note

Like in other conversions to news block, we do not need an HTML id in
the template, one is created by PROCESS koha_news_block
Comment 10 Fridolin Somers 2022-03-25 21:01:36 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄