Bug 26205 - News changes aren't logged
Summary: News changes aren't logged
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 28717 28872
  Show dependency treegraph
 
Reported: 2020-08-13 15:22 UTC by Lisette Scheer
Modified: 2023-06-08 22:26 UTC (History)
9 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:
21.11.00,21.05.02
Circulation function:


Attachments
Bug 26205: Add logging of news items (8.70 KB, patch)
2021-05-12 18:26 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 26205: Add logging of news items (8.76 KB, patch)
2021-05-24 14:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26205: Add logging of news items (8.81 KB, patch)
2021-06-03 14:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26205: (QA follow-up) Capitalization: OPAC News (1.25 KB, patch)
2021-06-03 14:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26205: (QA follow-up) Change OPACNEWS to just NEWS (4.17 KB, patch)
2021-06-03 14:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26205: (QA follow-up) Add punctuation and widen pref description a bit (1.08 KB, patch)
2021-06-03 14:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26205: Add logging of news items (8.80 KB, patch)
2021-06-21 14:07 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26205: Add logging of news items (8.80 KB, patch)
2021-06-21 14:35 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26205: (QA follow-up) Capitalization: OPAC News (1.25 KB, patch)
2021-06-21 14:35 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26205: (QA follow-up) Change OPACNEWS to just NEWS (4.17 KB, patch)
2021-06-21 14:35 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26205: (QA follow-up) Add punctuation and widen pref description a bit (1.08 KB, patch)
2021-06-21 14:35 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lisette Scheer 2020-08-13 15:22:18 UTC

    
Comment 1 Lisette Scheer 2020-08-13 15:25:18 UTC
We've moved some HTML preferences into the News tool that used to have their changes logged that are no longer logged. While we could expire an old news item and keep it as a historical log, it doesn't track with current workflows where those changes were logged before, or at least had the option to be logged.
Comment 2 Lucas Gass (lukeg) 2021-02-25 18:26:38 UTC
Since the old sys prefs like OPACHeader did log changes I would not consider this an enhancement
Comment 3 Lucas Gass (lukeg) 2021-03-15 16:30:05 UTC
I think this needs to be higher priority. Combined with Bug 26205 librarians are losing large sections of HTML because the WYSIWYG is doing automatic code clean up. Without logs there is no way to recover the old data.
Comment 4 Lucas Gass (lukeg) 2021-03-17 20:27:32 UTC
This bug is 26205, so what I meant was Bug 26942
Comment 5 Michael Sutherland 2021-03-26 12:24:13 UTC
This is a horrible idea and not an enhancement.  If the idea to clean up code, as the idea behind Bug 26942 suggests, is because users do not know what they're doing writing HTML then they should be able to have a history that they can revert back to when they lose content.
Comment 6 Owen Leonard 2021-03-26 12:29:03 UTC
(In reply to Michael Sutherland from comment #5)
> This is a horrible idea and not an enhancement.

What's a horrible idea? That News changes should be logged (the purpose of this bug) or that TinyMCE shouldn't be doing automatic code changes (which is what Bug 26942 is about).
Comment 7 Michael Sutherland 2021-03-26 13:16:22 UTC
I apologize.  What I meant to say is that moving the ability to edit the HTML out of system preferences and into the news without a way to track changes and the WYSIWYG editor doing automatic code changes is an awful, horrible idea and change.  If this bug is meant to address those issues, then this should be a higher priority and fixed. Especially for those users that do not know HTML and how to recover from lost code.
Comment 8 Esther Melander 2021-03-30 17:27:47 UTC
Our consortium is using Koha in a multi-branch setup. We recently had someone in the consortium go through and clear out nearly all of the news items including the OPAC customizations without knowing the impact it would have. This resulted in the OPAC headers being deleted. We were able to restore things without too much trouble but I foresee it happening again.

I would recommend that OPAC customizations be moved to an entirely new place that is protected with permissions. The ability to accidentally delete something forever from a live web page can be extremely problematic.
Comment 9 Michael Sutherland 2021-03-30 18:35:07 UTC
(In reply to Esther Melander from comment #8)

> I would recommend that OPAC customizations be moved to an entirely new place
> that is protected with permissions. The ability to accidentally delete
> something forever from a live web page can be extremely problematic.

Esther, I believe there is a system setting that protects news with permissions. Someone please correct me if I'm mistaken.  If you go to 'Use all tools', under that branch is the permission 'Write news for the OPAC and staff interfaces (edit_news)'. I have not tested this to see if users may not actually access this if they do not have this permission marked.
Comment 10 Lisette Scheer 2021-03-30 18:43:33 UTC
(In reply to Michael Sutherland from comment #9)
> (In reply to Esther Melander from comment #8)
> 
> > I would recommend that OPAC customizations be moved to an entirely new place
> > that is protected with permissions. The ability to accidentally delete
> > something forever from a live web page can be extremely problematic.
> 
> Esther, I believe there is a system setting that protects news with
> permissions. Someone please correct me if I'm mistaken.  If you go to 'Use
> all tools', under that branch is the permission 'Write news for the OPAC and
> staff interfaces (edit_news)'. I have not tested this to see if users may
> not actually access this if they do not have this permission marked.

This does work for stopping ALL news editing/creation. However we might want to let individual libraries set their own news for their patrons and not give them access to the OPAC customizations. 

Lisette
Comment 11 Michael Sutherland 2021-03-30 18:49:31 UTC
(In reply to Lisette Scheer from comment #10)

> However we might want
> to let individual libraries set their own news for their patrons and not
> give them access to the OPAC customizations. 
> 
> Lisette

I heartily, emphatically agree.
Comment 12 Esther Melander 2021-03-30 19:12:18 UTC
I created a separate bug (Bug 28059) for the separation of news and OPAC customizations since this is a different topic from logging. Though OPAC customizations are also not logged.
Comment 13 David Cook 2021-03-30 22:39:23 UTC
(In reply to Lucas Gass from comment #3)
> I think this needs to be higher priority. Combined with Bug 26942 librarians
> are losing large sections of HTML because the WYSIWYG is doing automatic
> code clean up. Without logs there is no way to recover the old data.

Agreed about it being a higher priority. I had to restore some HTML news from a backup because Bug 26942 had wiped out the CSS that they'd used.
Comment 14 Lucas Gass (lukeg) 2021-05-12 18:26:04 UTC
Created attachment 120895 [details] [review]
Bug 26205: Add logging of news items

To test:

1. Apply patch, updatedatabase, restart_all
2. Make sure the system pref 'NewsLog' is turned on.
3. Go to the Koha News tool and create a new news item.
4. View the logs and display only the OPAC News module
5. You should see your new news, it will include the lang ( OPACheader_en ) and the content of the news item.
6. Filter the logs so the only action is 'Add', your new news item should appear
7. Modify some news items
8. They should appear in the logs now as modification.
9. Make sure you can filter the action to 'Modify' and can confirm it works
10. Delete some news items
11. 8. They should appear in the logs now as deletinon
12. Make sure you can filter the action to 'Delete' and can confirm it works
Comment 15 Owen Leonard 2021-05-24 14:29:47 UTC
Created attachment 121338 [details] [review]
Bug 26205: Add logging of news items

To test:

1. Apply patch, updatedatabase, restart_all
2. Make sure the system pref 'NewsLog' is turned on.
3. Go to the Koha News tool and create a new news item.
4. View the logs and display only the OPAC News module
5. You should see your new news, it will include the lang (
   OPACheader_en ) and the content of the news item.
6. Filter the logs so the only action is 'Add', your new news item
   should appear
7. Modify some news items
8. They should appear in the logs now as modification.
9. Make sure you can filter the action to 'Modify' and can confirm it
   works
10. Delete some news items
11. They should appear in the logs now as deletinon
12. Make sure you can filter the action to 'Delete' and can confirm it
    works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 16 Katrin Fischer 2021-06-03 14:53:27 UTC
Created attachment 121603 [details] [review]
Bug 26205: Add logging of news items

To test:

1. Apply patch, updatedatabase, restart_all
2. Make sure the system pref 'NewsLog' is turned on.
3. Go to the Koha News tool and create a new news item.
4. View the logs and display only the OPAC News module
5. You should see your new news, it will include the lang (
   OPACheader_en ) and the content of the news item.
6. Filter the logs so the only action is 'Add', your new news item
   should appear
7. Modify some news items
8. They should appear in the logs now as modification.
9. Make sure you can filter the action to 'Modify' and can confirm it
   works
10. Delete some news items
11. They should appear in the logs now as deletinon
12. Make sure you can filter the action to 'Delete' and can confirm it
    works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2021-06-03 14:53:32 UTC
Created attachment 121604 [details] [review]
Bug 26205: (QA follow-up) Capitalization: OPAC News

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2021-06-03 14:53:38 UTC
Created attachment 121605 [details] [review]
Bug 26205: (QA follow-up) Change OPACNEWS to just NEWS

As news are usable in OPAC and staff interface, I suggest changing the code
to just be NEWS instead of OPACNEWS.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2021-06-03 14:53:43 UTC
Created attachment 121606 [details] [review]
Bug 26205: (QA follow-up) Add punctuation and widen pref description a bit

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Katrin Fischer 2021-06-03 14:57:40 UTC
I kept the follow-ups independent in case not all are wanted. But I feel it would be a good thing to remove the OPAC bits as the news tool can be used for both interfaces.
Comment 21 Lucas Gass (lukeg) 2021-06-03 15:03:12 UTC
(In reply to Katrin Fischer from comment #20)
> I kept the follow-ups independent in case not all are wanted. But I feel it
> would be a good thing to remove the OPAC bits as the news tool can be used
> for both interfaces.

I completely agree!
Comment 22 Katrin Fischer 2021-06-03 15:10:46 UTC
Thx, Lucas!
Comment 23 Jonathan Druart 2021-06-21 08:42:31 UTC
Please fix author's email and name of the patches.
Comment 24 Kyle M Hall (khall) 2021-06-21 14:07:42 UTC
Created attachment 122229 [details] [review]
Bug 26205: Add logging of news items

To test:

1. Apply patch, updatedatabase, restart_all
2. Make sure the system pref 'NewsLog' is turned on.
3. Go to the Koha News tool and create a new news item.
4. View the logs and display only the OPAC News module
5. You should see your new news, it will include the lang (
   OPACheader_en ) and the content of the news item.
6. Filter the logs so the only action is 'Add', your new news item
   should appear
7. Modify some news items
8. They should appear in the logs now as modification.
9. Make sure you can filter the action to 'Modify' and can confirm it
   works
10. Delete some news items
11. They should appear in the logs now as deletinon
12. Make sure you can filter the action to 'Delete' and can confirm it
    works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 25 Kyle M Hall (khall) 2021-06-21 14:35:29 UTC
Created attachment 122231 [details] [review]
Bug 26205: Add logging of news items

To test:

1. Apply patch, updatedatabase, restart_all
2. Make sure the system pref 'NewsLog' is turned on.
3. Go to the Koha News tool and create a new news item.
4. View the logs and display only the OPAC News module
5. You should see your new news, it will include the lang (
   OPACheader_en ) and the content of the news item.
6. Filter the logs so the only action is 'Add', your new news item
   should appear
7. Modify some news items
8. They should appear in the logs now as modification.
9. Make sure you can filter the action to 'Modify' and can confirm it
   works
10. Delete some news items
11. They should appear in the logs now as deletinon
12. Make sure you can filter the action to 'Delete' and can confirm it
    works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 26 Kyle M Hall (khall) 2021-06-21 14:35:42 UTC
Created attachment 122232 [details] [review]
Bug 26205: (QA follow-up) Capitalization: OPAC News

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 27 Kyle M Hall (khall) 2021-06-21 14:35:45 UTC
Created attachment 122233 [details] [review]
Bug 26205: (QA follow-up) Change OPACNEWS to just NEWS

As news are usable in OPAC and staff interface, I suggest changing the code
to just be NEWS instead of OPACNEWS.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 28 Kyle M Hall (khall) 2021-06-21 14:35:49 UTC
Created attachment 122234 [details] [review]
Bug 26205: (QA follow-up) Add punctuation and widen pref description a bit

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 29 Jonathan Druart 2021-06-23 13:00:45 UTC
This needs to be called "additional contents", see bug 24387. I am inclined to push as it, but keep it in mind for next time.
Comment 30 Jonathan Druart 2021-06-23 13:06:40 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 31 Kyle M Hall (khall) 2021-07-09 12:38:14 UTC
Backported to 21.05.x for 21.05.02
Comment 32 Fridolin Somers 2021-08-02 20:24:04 UTC
Does not apply on 20.11.x , mainly because of Bug 14233.
Comment 33 Jonathan Druart 2021-11-24 11:18:15 UTC
Here we are adding a new syspref "NewsLog" which will use "NEWS" for module.

It will be released in 21.11.00 alongwith bug 24387 that is renaming the whole tool "Additional contents", as well as the syspref NewsToolEditor => AdditionalContentsEditor

I am suggesting to rename the syspref NewsLog => AdditionalContentsLog, and use "ADDITIONAL_CONTENTS" for module in the action_logs table. Would that work for you?
Comment 34 Jonathan Druart 2021-11-24 11:19:00 UTC
Erk, it has been backported.